Creating Image Objects

Image Object are "virtual" objects in the DSMDB, that contain information about the state of a Computer - that is, its Software-Packages and their Compliance-state.


Typically you will not create Image Objects via the PowerShell Extensions, because these objects are created automatically when executing NIPREP on a managed client. Nevertheless, creating Image Objects is possible with DSM versions less than 2015.1 and may be advantageous in one or the other situation.


Note: Starting with DSM 2015.1 the SOAP API CreateImageFromComputerState is removed. Therefore no Image objects can be created using PSX with this and higher versions.


Creating of Image Object is done via the New-EmdbStateImage cmdlet, that requires at least a Computer Object as a parameter. 


Examples:


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


In the following example, an Image Object is created from the managed client "Win7-01". The name of the Image is set automatically to the name of the reference machine.


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

Cd "emdb:\rootDSE\Global Software Library\Image Library"

New-EmdbStateImage -Computer $MyMasterClient


In order to provide an individual name for the Image, you use the ImageName-parameter. If an Image-Group should be created at the same time, the switch CreateImageGroup has to be used.


New-EmdbStateImage -Computer $MyMasterClient -ImageName "Win7 Master Image" -CreateImageGroup



If an Image-Group is created, Policies are implicitly created for all Software-Packages assigned to the reference computer. The default setting, however, is to not create Policies for Patch-Packages and PnP-Driver Packages. You can force the creation of Policies for these package types, by specifying the switches CreatePoliciesForPatchMgmt and / or CreatePoliciesForPnP.


Before creating the Image Object, the Business Logic Server checks, if all Policy-Instances of the reference computer are compliant. If Policy-Instances exist, that have a Compliance State of "not compliant", the Image Object is not created. This can be forced - as shown in the following example - by specifying the Force switch.


New-EmdbStateImage -Computer $MyMasterClient -ImageName "Win7 Master Image" -CreateImageGroup -CreatePoliciesForPatchMgmt -CreatePoliciesForPnP -Force