79379137

Date: 2025-01-22 20:34:38
Score: 1.5
Natty:
Report link

Thank you Santiago. Here is the exact syntax I used: Note: I'm only posting for clarity for Powershell rookies like me. I have no idea if this exact syntax changes from what Santiago gave me. I wager they both work.

Import-Module Activedirectory

$Attribcsv=Import-csv "C:\Temp\ADUsers_BulkEdit.csv"

ForEach ($User in $Attribcsv)

{

Get-ADUser -Identity $User.samAccountName | set-ADUser -replace @{costCenter=$($User.costCenter)}

}

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Travis