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

Posted on 2008-11-14
Medium Priority
Last Modified: 2012-05-05
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"

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" 

Open in new window

Question by:Bessemer-HD
LVL 18

Accepted Solution

BSonPosh earned 500 total points
ID: 22967358
that works perfectly for me... are you logged in as administrator or using an elevated shell?

Author Comment

ID: 22975617
That was it.  Even though I am an admin on the box, I had to launch PowerShell via "ru nas administrator".  Thanks!

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
Resolving an irritating Remote Desktop connection that stops your saved credentials from being used.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question