Setting and retrieving Computer properties

Retrieves or sets properties of the specified Computer object.


Examples:


Hint: The execution of these examples requires a connected PowerShell drive.


Retrieve the values of all properties of the Computer named "XP01" and displays them as a list:


$MyComputer = Get-EmdbComputer "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\ITService\Workstations\XP01"

$MyComputer | Format-List *


Retrieve and display the value of the property ComputerType of the Computer named "XP01":


$MyComputer = Get-EmdbComputer "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\ITService\Workstations\XP01"

$MyComputer.ComputerType


Set the value of the property ComputerType of the Computer named "XP01" to "Laptop" and propagate the change to the DSMDB using the method Update():


$MyComputer = Get-EmdbComputer "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\ITService\Workstations\XP01"

$MyComputer.ComputerType = "Laptop"

$MyComputer.Update()