I am trying to grant MS Lync policies based on AD group membership. So far I have arrived at the following command but it fails to execute as desired.
Get-ADGroupMember -Identity "Name_Of_AD_Security_Group" | Grant-CsPersistentChatPolicy -PolicyName "Name_Of_Policy"
I know that the Grant-Cs...
command will take a pipeline input but I suspect the AD output does not match the required input for the Lync command.
Would anyone have a better command of know of a way to transform the output into the correct input format?
I don't have access to Lync Powershell modules, but I noticed that the command you're wanting to run accepts output from Get-CsUser on its TechNet page.
See if this works:
If it doesn't, try:
Based on which works(if either do):
or