Creating Shop-Policy-Instances

Creates Policy-Instances for the specified Computers and Shop-Policies.


Examples:


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


In the first example, the Shop-Policy for "7-Zip 22.01" pointing to the static group "7-ZIP" is retrieved and then a Shop-Policy-Instance for the $MyComputer is added for it.


$MyShopPolicy = Get-EmdbPolicy "emdb:\rootDSE\Managed Users & Computers\solys.local\Software Assignments\Software-Shop\7-ZIP"

$MyComputer = Get-EmdbComputer "WIN10-02" -Recurse

New-EmdbShopPolicyInstance -Policy $MyShopPolicy -Computer $MyComputer


The Policy and Computer object parameters can also be piped. For example, the following can be implemented, where a Shop-Policy-Instance is created for each computer in the list file:


Get-Content "C:\Temp\MyComputerList.txt" | Get-EmdbComputer -Recurse | New-EmdbShopPolicyInstance -Policy $MyShopPolicy