SHARE
TWEET

Untitled

a guest Jun 19th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Set-AzureADUserExtension -ObjectId test@test.com -ExtensionName extensionattribute1 -ExtensionValue "stuff"
  2.  Set-AzureADUserExtension -ObjectId test@test.com -ExtensionName extensionattribute2 -ExtensionValue "things"
  3.  Set-AzureADUserExtension -ObjectId test@test.com -ExtensionName extensionattribute3 -ExtensionValue "stuff"
  4.  Set-AzureADUserExtension -ObjectId test@test.com -ExtensionName extensionattribute4 -ExtensionValue "things"
  5.  Set-AzureADUserExtension -ObjectId test@test.com -ExtensionName extensionattribute5 -ExtensionValue "test"
  6.  Set-AzureADUserExtension -ObjectId test@test.com -ExtensionName extensionattribute6 -ExtensionValue "test"
  7.  Set-AzureADUserExtension -ObjectId test@test.com -ExtensionName extensionattribute7 -ExtensionValue "test"
  8.  Set-AzureADUserExtension -ObjectId test@test.com -ExtensionName extensionattribute8 -ExtensionValue "florida"
  9.  Set-AzureADUserExtension -ObjectId test@test.com -ExtensionName extensionattribute9 -ExtensionValue "12444"
  10.  Set-AzureADUserExtension -ObjectId test@test.com -ExtensionName extensionattribute10 -ExtensionValue "stuff"
  11.  Set-AzureADUserExtension -ObjectId test@test.com -ExtensionName extensionattribute11 -ExtensionValue "things"
  12.  Set-AzureADUserExtension -ObjectId test@test.com -ExtensionName extensionattribute12 -ExtensionValue "test"
  13.  Set-AzureADUserExtension -ObjectId test@test.com -ExtensionName extensionattribute13 -ExtensionValue "test"
  14.  Set-AzureADUserExtension -ObjectId test@test.com -ExtensionName extensionattribute14 -ExtensionValue "test"
  15.  Set-AzureADUserExtension -ObjectId test@test.com -ExtensionName extensionattribute15 -ExtensionValue "test"
  16.      
  17. $users = import-csv "C:tempwomp.csv"
  18.  
  19. $users | ForEach-Object{
  20.  
  21. Set-AzureADUserExtension -ObjectId $_.extensionattribute1 (Get-AzureADUser -ObjectID $_.UserPrincipalName).objectID
  22. Set-AzureADUserExtension -ObjectId $_.extensionattribute2 (Get-AzureADUser -ObjectID $_.UserPrincipalName).objectID
  23. Set-AzureADUserExtension -ObjectId $_.extensionattribute3 (Get-AzureADUser -ObjectID $_.UserPrincipalName).objectID
  24. Set-AzureADUserExtension -ObjectId $_.extensionattribute4 (Get-AzureADUser -ObjectID $_.UserPrincipalName).objectID
  25. Set-AzureADUserExtension -ObjectId $_.extensionattribute5 (Get-AzureADUser -ObjectID $_.UserPrincipalName).objectID
  26.  
  27. }
  28.      
  29. Set-AzureADUserExtension : A positional parameter cannot be found that accepts argument
  30.      
  31. Get-AzureADUser : Error occurred while executing GetUser Code: Request_ResourceNotFound
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