Microsoft, Powershell, Windows Server 2008, trying to modify a local user, getttting "Exception calling "SetInfo" ...( Exception from HRESULT: 0x8007007B)"

I am trying to run the simplest of Powershell scripts in Windows Server 2008.
I an trying to change the FullName property of a local user. This script
works fine on XP (the local user "testuser" exists on the on WS2K8 server I'm
running on):

$user = [ADSI]"WinNT://./testuser,user"
$user.Fullname="Test User"
$user.SetInfo()

When I hit the SetInfo() line, I get this error:

Exception calling "SetInfo" with "0" argument(s): "The filename, directory
name, or volume label syntax is incorrect. (
Exception from HRESULT: 0x8007007B)"

If i do $user.psbase.properties, it dumps the list of properties and values
with the new value reflected, i just cant actually write the info.

Googling had turned up nothing useful.
$user = [ADSI]"WinNT://./testuser,user" 
$user.Fullname="Test User" 
$user.SetInfo()

Open in new window

Bessemer-HDAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BSonPoshCommented:
that works perfectly for me... are you logged in as administrator or using an elevated shell?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bessemer-HDAuthor Commented:
That was it.  Even though I am an admin on the box, I had to launch PowerShell via "ru nas administrator".  Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.