daily pastebin goal
5%
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 62 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. $adusers = Import-Csv "c:tempadusers.csv" -Delimiter ";"
  2.  
  3. foreach ($item in $adusers) {
  4. # Map variables from CSV
  5. $adusers = $item.'ADUsers'
  6. $Servers = $item.'Domain'
  7.  
  8.  
  9. Get-ADUser -identity $adusers -Properties flags -Server $Servers | Select-
  10. Object -Property samaccountname, userprincipalname, flags | export-csv
  11. c:tempfdfdrff.csv -Encoding Unicode
  12.  
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top