From 836355a8795ab96123007a90df0705edb0f54088 Mon Sep 17 00:00:00 2001 From: eeckert Date: Fri, 2 Feb 2024 10:12:48 -0700 Subject: [PATCH] cleanup --- New-User.ps1 | 18 ------------------ UsersCountry.ps1 | 16 ---------------- 2 files changed, 34 deletions(-) delete mode 100644 New-User.ps1 delete mode 100644 UsersCountry.ps1 diff --git a/New-User.ps1 b/New-User.ps1 deleted file mode 100644 index 87febb2..0000000 --- a/New-User.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -<# -Script to generate new users - -#> - - - - -$UserFirstName -$UserLastName -$UserOffice -$UserEmail -$UserMobilePhone -$userOfficePhone -$UserExtension -$UserJobTitle -$UserDesignation -$UserOrgUnit diff --git a/UsersCountry.ps1 b/UsersCountry.ps1 deleted file mode 100644 index eef9eae..0000000 --- a/UsersCountry.ps1 +++ /dev/null @@ -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 - } - - -}