Update 'Update_Departments_By_Cost_Center_ID.ps1'
This commit is contained in:
parent
ef79d32b19
commit
64564e7ffd
@ -32,7 +32,7 @@ foreach ($dept in $deptCodes) {
|
|||||||
|
|
||||||
#loop through all users. Set department, Office, VP attribute. Export CSV logging changes for each user
|
#loop through all users. Set department, Office, VP attribute. Export CSV logging changes for each user
|
||||||
foreach ($user in $users) {
|
foreach ($user in $users) {
|
||||||
if ($user.nkchDeptCode -eq $deptCode) {
|
if ($user.DeptCode -eq $deptCode) {
|
||||||
# If user department name != correct department name OR user office name != correct office name OR user VP != current department VP
|
# If user department name != correct department name OR user office name != correct office name OR user VP != current department VP
|
||||||
if ($user.Department -ne $dept.DEPARTMENT -or $user.Office -ne $dept.DEPARTMENT -or $user.VP -ne $vp) {
|
if ($user.Department -ne $dept.DEPARTMENT -or $user.Office -ne $dept.DEPARTMENT -or $user.VP -ne $vp) {
|
||||||
if ($vp -is [array]) {
|
if ($vp -is [array]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user