This commit is contained in:
Erik Eckert 2024-02-02 10:12:48 -07:00
parent 001bb952c6
commit 836355a879
2 changed files with 0 additions and 34 deletions

View File

@ -1,18 +0,0 @@
<#
Script to generate new users
#>
$UserFirstName
$UserLastName
$UserOffice
$UserEmail
$UserMobilePhone
$userOfficePhone
$UserExtension
$UserJobTitle
$UserDesignation
$UserOrgUnit

View File

@ -1,16 +0,0 @@
$cred=Get-Credential
$countryHash = @{
# canada is 124
countryCode = 0124
}
$User=Get-ADUser -Filter * -SearchBase 'OU=MPEUsers,DC=mpe,DC=ca' -Properties c,co,countryCode | Where-Object countryCode -NE 124
foreach ($u in $User){
$u | Set-ADUser -Country 'CA' -Credential $cred
if ($u.countryCode -eq 0 ) {
Write-Output $u.Name
$u | set-adobject -Add $countryHash -Credential $cred -ErrorAction SilentlyContinue
}
}