Activating Policies

The activation status of a Policy is reflected by the property IsActive of the Policy object. You can assign the values $True resp. $False to the property to activate or deactivate the Policy, which is equivalent to the "Stop rollout" and "Start rollout" actions inside the DSMC. Subsequently you have to invoke the method Update() to propagate the changes to the DSMDB.


Examples:


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


Deactivate the Policy created in section Creating Polices:


$MyPolicy = Get-EmdbPolicy "emdb:\rootDSE\Managed Users & Computers\solys.local\Adobe Reader 9.0 systems" | Where-Object {$_.AssignedObjectName -eq "Adobe Reader 9.0"}

$MyPolicy.IsActive = $False

$MyPolicy.Update()


To activate the Policy again, that is starting the rollout, assign $True to the property:


$MyPolicy = Get-EmdbPolicy "emdb:\rootDSE\Managed Users & Computers\solys.local\Adobe Reader 9.0 systems" | Where-Object {$_.AssignedObjectName -eq "Adobe Reader 9.0"}

$MyPolicy.IsActive = $True

$MyPolicy.Update()