Hi,
I am a newbie to powershell nd would like some help with the below if please.
We have active roles 6.7.
I have a managed unit called delegation unit,
only security group objects exist in it.
what I am trying to achieve is for each group in the managed unit, count members in it and the write this number on the description of the group.
the script work's from a quest powershell command window, however if I import the script into active roles as a scheduled task script and then schedule it it get's an error.
script is as below.
$testgroups = Get-QADGroup -proxy -SearchRoot "Configuration/Managed Units/DelegateMU/Test_GroupsCount"
Foreach ($Testgroup in $TestGroups)
{
$Counter = @(Get-qadgroupmember $VDETestgroup -enabled).count
Set-qadgroup -proxy $Testgroup -description "$counter : Enabled users in group"
}
Thank you in advance
M.