Moving users automatically after logging into new platform.

So in a thread on Microsoft Social. A user asked for help moving users to a directory after they had logged on to a Windows 7 workstation. This is my suggestion.

So first lets create a list of who has logged on to the new platform. A simple script that saves a file with the name of the logged in user in a folder. We will then execute this using Task Scheduler on logon or logon script of the user. Remember to grant rights for all users to create files in that share.

So now we have a share with files of all users that has logged on. Lets do something with them.

So after running the second script we have moved the users.. Yeay.

 

Comments

  1. Paul Dexter says:

    Oscar, could we do something with the part that gets the user so that it queries the OS first and places a text file in a relevant ‘XP’ or ‘7’ folder. I could also do with the ‘move’ script removing the username files after it runs

  2. virot says:

    So wonder where my last comment went.. :/ I know I wrote one.
    Well. I dont really think removing the username gives us anything, it will increase the strain (more files created and deleted) on the server with not many benefits.
    You could add the following to the loggedonuserfolder
    [System.Environment]::OSVersion.Version.Major.toString()
    That would be 5 on Windows 2000 and XP and 6 on Vista, Windows 7 and Windows 8.

Leave a Reply