Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Change User Account Type

Reply
Thread Tools Display Modes

Change User Account Type

 
 
Pete Gomersall
Guest
Posts: n/a

 
      09-22-2009
Hi,
Does anyone know how to programmatically (VBScript and PowerShell) change an
account type from roaming to local?
The equivalent of System Tool > Advanced > User Profiles > Account Name >
Change Type.
Pete

 
Reply With Quote
 
 
 
 
Justin Rich
Guest
Posts: n/a

 
      09-25-2009
you probably want to compare what that does in user management, but im
guessing it changes the profile location?
if you go to computer management and the user account, its likely that it
modifies stuff on the profile tab.

if that is the case you can use ADSI to make those changes pretty easily..

either way im sure you can do it with ADSI you just need to figure out what
exactly is changing when you do that..

you can get the user account in to an object like so

$user = [ADSI]"WinNT://joe-pc/joe" (didnt test this, just yanked it
off the net but should work fine)

a quick google of 'powershell adsi' will get you a good about of info



"Pete Gomersall" <> wrote in message
news:%...
> Hi,
> Does anyone know how to programmatically (VBScript and PowerShell) change
> an account type from roaming to local?
> The equivalent of System Tool > Advanced > User Profiles > Account Name >
> Change Type.
> Pete


 
Reply With Quote
 
Pete Gomersall
Guest
Posts: n/a

 
      09-29-2009
All Found solution:
In each user key in SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
there is SubKey - Preference.
Set DWORD entry UserPreference to 0
Pete
"Pete Gomersall" <> wrote in message
news:#...
> Hi,
> Does anyone know how to programmatically (VBScript and PowerShell) change
> an account type from roaming to local?
> The equivalent of System Tool > Advanced > User Profiles > Account Name >
> Change Type.
> Pete


 
Reply With Quote
 
Thomas Lee
Guest
Posts: n/a

 
      10-01-2009
In message <>, Pete Gomersall
<> writes
>All Found solution:
>In each user key in SOFTWARE\Microsoft\Windows
>NT\CurrentVersion\ProfileList there is SubKey - Preference.
>Set DWORD entry UserPreference to 0


Have you tried this?
--
Thomas Lee

PowerShell MVP
 
Reply With Quote
 
Pete Gomersall
Guest
Posts: n/a

 
      10-02-2009
Hi Thomas,
This works.
Some background: we have a lab of W7 x64 machines and we set roaming profile
path in a GPO with system/User Profiles - Set roaming profile path for all
users logging onto this computer. This causes the system to sync local
profiles to the profile server, which we do not want.

Created a vbscript to find Administrators sub-key in profile list, add the
Preference sub-key if it didn't exist and set DWORD value to 0,
When I then logged on as Administrator, I was not bugged by cannot sync your
roaming profile and looking in the UI the profile was set to Local, not
Roaming.

On a related point, however, I found out yesterday that the GPO setting I
mention at the start of this message doesn't work as I think it should.
We have a path set like this:
\\servername\sharename\%USERNAME%.%USERDOMAIN%. However %USERDOMAIN%, is
incorrctly applied. The domain of the computer account is always applied not
the users domain. This is a problem for us as we have identical usernames in
multiple domains.
I have posted to the windows.group_policy forum, but have not heard back
from anyone.
http://social.technet.microsoft.com/...3-8195e4492ad1
I would be interesed if you know anything?
Pete
Pete Gomersall
IT Systems Manager, College of Engineering, Forestry and Natural Sciences
Northern Arizona University
MCSA Windows 2003, MCSE (Windows NT4, 2000 & 2003), MCDBA & MCT

"Thomas Lee" <> wrote in message
news:...
> In message <>, Pete Gomersall
> <> writes
>>All Found solution:
>>In each user key in SOFTWARE\Microsoft\Windows
>>NT\CurrentVersion\ProfileList there is SubKey - Preference.
>>Set DWORD entry UserPreference to 0

>
> Have you tried this?
> --
> Thomas Lee
>
> PowerShell MVP


 
Reply With Quote
 
Thomas Lee
Guest
Posts: n/a

 
      10-03-2009
In message <#>, Pete Gomersall
<> writes
>Hi Thomas,
>This works


Cool - I thought this was done in the AD, not the registry. Which is why
I asked!


>I would be interesed if you know anything?


Not really.

--
Thomas Lee

PowerShell MVP
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change jpg file type for power user Sammie Windows Small Business Server 1 11-07-2008 03:41 PM
Change user account type to admin Bud Windows Vista Administration 6 07-25-2007 08:20 AM
Parental Controls and user account type rj Windows Vista General Discussion 4 06-23-2007 04:44 PM
R2 w/ISA 'User' type account cannot use my company's internal website Gary J. Dikkema [Vista X64] Windows Small Business Server 13 08-21-2006 10:49 AM
RE: change Exchange user type Ray Fong [MSFT] Windows Small Business Server 0 08-17-2004 10:00 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59