I have following command to add AD group in PowerShell script but AD group has space in name and that is causing an issue.
Set-Variable -Name APP_GROUP -Value My AD Group
Add-LocalGroupMember -Group "Administrators" -Member "MyDomain\"$APP_GROUP
Error: CategoryInfo: NotSpecified: RemoteException
+ FullyQualifiedErrorId : NativeCommandError