maxime12345

Untitled

Apr 1st, 2020
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $users_list = Get-ADUser -Filter *
  2.  
  3. If (-not (Test-Path "C:\WorkingDirectory")) { New-Item -ItemType Directory -Path "C:\WorkingDirectory" }
  4.  
  5. foreach($user in $users_list)
  6. {
  7.     $repos = $user.SamAccountName
  8.     New-Item -ItemType Directory -Path "C:\WorkingDirectory\$repos"
  9. }
Advertisement
Add Comment
Please, Sign In to add comment