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

Posted on 2008-11-14
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 $, 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

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

    Author Comment

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

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Why would I want to create a function for tracking messages? I am glad you asked. As with most monotonous/routine tasks, human error tends to creep in after doing the same task over and over again. By creating a function, you load the function once…
    "Migrate" an SMTP relay receive connector to a new server using info from an old server.
    This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
    To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

    728 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now