Hello Guys I was looking for a way to add multiple entries: $APS = $APE.CreatePolicySetting() $APS.Name = 83 $APS.Value = "$GroupGUID" $APE.AddPolicySetting($APS) How can I add multiple GUIDS here.

$APS = $APE.CreatePolicySetting()
$APS.Name = 83
$APS.Value = "$GroupGUID"
$APE.AddPolicySetting($APS)

How can I add multiple GUIDS here.

Parents Reply
  • Hi Stu, when I have tried an array, the error returned is "Unable to case object of type System.Object[] to type System.String".

    I have also tried a ForEach loop but this doesn't result in multiple '83' entries ($APS.Name = 83) being added to the policy, it seems to just continue overriding the single entry until the last GUID is processed, resulting in only one '83' entry.

Children