I think I understand what this script does.

It identifies what type of session has been created by the client and there are three possible types. Presumably you would map a different printer based on what kind of session is set up.

In our environment we only use one type of connection out of the possible three there are in the script - RDP.

So the script needs to map the right printer based on the client IP rather than the session type.

I want to map the printer that is in the same classroom as the linux-based thin clients.