Explorar o código

cast uidnumber to int

Tobias Simetsreiter %!s(int64=2) %!d(string=hai) anos
pai
achega
4bcbe032e1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      bin/Add-LindevUser.ps1

+ 1 - 1
bin/Add-LindevUser.ps1

@@ -26,7 +26,7 @@ if (-not $userInGroup) {
 }
 
 if ($null -eq $newUser.uidNumber) {
-    $nextUid = ($users | Measure-Object -Property "uidNumber" -Maximum).Maximum + 1
+    $nextUid = [int](($users | Measure-Object -Property "uidNumber" -Maximum).Maximum + 1)
     "Setting User ID to Group $nextUid" | Out-Host
     
     Set-ADUser -Identity $newUser -add @{