windows - Powershell pass user input to icacls -
currently writing powershell script automate security measures , have run small problem.
icacls mydirectory /inheritance:r /grant:r 'administrators:f' $mygroup + ':f' will fail $mygroup gets tacked onto icacls call , fails add permissions both groups. on windows 7 , context of powershell.
the parser sees $mygroup + ':f' 3 individual arguments. can use either:
"${mygroup}:f" or
($mygroup + ':f') to provide info parser 1 argument.
Comments
Post a Comment