PowerShell Live - being retired

Please go to http://www.shelltools.net for more information

Welcome to PowerShell Live - being retired Sign in | Join | Help
Home Main Site Blogs Forums Videos Chat Customer Support

Function for changing the name and description of a remote computer?

  •  08-30-2007, 12:31 PM

    Function for changing the name and description of a remote computer?

    I'm looking for a method for changing the name and description of remote computer.  I've been looking at WMI and the win32_operatingsystem, uh, class (?)  I'm not sure of the terminology there.  Anyway, there appears to be everything I need in that class.  I had been playing around with this:

    $c = get-wmi -class win32_operatingsystem -computer <whatever>

    $c.csname = <new name>

    $c.description = <new description>

    $c.reboot()

    But this doesn't appear to be working.  I seem to vaguely remember something about having to "flush" the changes you make via WMI to remote computers before those changes will applied.  Is that what I'm missing, or am I just totally on the wrong track?  TIA

    Tony
     

    Filed under:
View Complete Thread