We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1107ea9 commit 09f5d3fCopy full SHA for 09f5d3f
1 file changed
Powershell/General Functions/Set-UserRights.ps1
@@ -68,7 +68,7 @@
68
69
Author: Blake Drumm (blakedrumm@microsoft.com)
70
First Created on: January 5th, 2022
71
- Last Modified on: April 23rd, 2022
+ Last Modified on: October 12th, 2022
72
#>
73
param
74
(
@@ -223,7 +223,13 @@ PROCESS
223
$sids = (Select-String $export -Pattern "$right").Line
224
if ($ActionType -eq 'Adding')
225
{
226
- $sidList = "$sids,*$sid"
+ # If right has no value it needs to be added
227
+ if($sids -eq $null) {
228
+ $sids = "$right = *$sid"
229
+ $sidList = $sids
230
+ } else {
231
+ $sidList = "$sids,*$sid"
232
+ }
233
}
234
elseif ($ActionType -eq 'Removing')
235
0 commit comments