Problem solve Get help with specific problems with your technologies, process and projects.

Automate switch from roaming to MANDATORY roaming profiles

Had it with users mucking up NT 4.0 roaming profiles? Make some or all mandatory in just five minutes with this tip.

If you've had it with users mucking up NT 4.0 roaming profiles, and have decided to make some or all mandatory, here's how I did it in 5 minutes (code took longer.) Usrmgr.exe allows you to ctrl-select individual users and change the profile directory location for the selected users (something I've not enjoyed with the Win2k Users and Groups MMC).

Ctrl-select the desired users, and in the profile path field change the profile path to:


Then play with the following code according to your configuration.

Perl Code:

#script to rename profile folders and ntuser.dat to *.man 12.5.01

#create profile list where folder=%username%
system ("dir /B [driveletter]:[profileshare]profiles > proflist.txt");

# if you want to pick which profiles to
# make mandatory, stop the script here by uncommenting this line:
# and edit proflist.txt, deleting the
# folder names you don't want to make
# mandatory. Then comment out the above system command
# and let the steps below run.

# open for input
open(MYINPUTFILE, "proflist.txt");

# read file into list
my(@profiles) = <MYINPUTFILE>;

for $x (0 .. $#profiles) {

#remove the trailing carriage return
chomp $profiles[$x];

#add .man to the profile folder
system ("rename [driveletter]:profiles$profiles[$x] $profiles[$x].man");

#change ntuser.dat to
system ("rename [driveletter]:profiles$profiles[$x].manntuser.dat");



Dig Deeper on Windows Server storage management

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.