Activating and deactivating Computers

Activates or deactivates the specified Computer object or sets the Computer's OperationMode to "Prepare for Reinstall".


Examples:


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


Activate the Computer named "XP01" using the method Activate():


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

$MyComputer.Activate()


Activate the Computer named "XP01" through setting the OperationMode property and a subsequent call to the method Update():


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

$MyComputer.OperationMode = "Active"

$MyComputer.Update()


Hint: The localized display labels shown by the DSMC are also valid values for the property "OperationMode".


Deactivate the Computer named "XP01" using the method Deactivate():


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

$MyComputer.Deactivate()


Deactivate the Computer name "XP01" through setting the OperationMode property and a subsequent call to the method Update():


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

$MyComputer.OperationMode = "Inactive"

$MyComputer.Update()


Prepare the Computer named "XP01" for reinstallation using the method PrepareForReinstall():


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

$MyComputer.PrepareForReinstall()


Prepare the Computer named "XP01" for reinstallation through setting the OperationMode property and a subsequent call to the method Update():


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

$MyComputer.OperationMode = "PrepareForReinstall"

$MyComputer.Update()