From 12242593fb2325577bce63d4046c837c7cfefc67 Mon Sep 17 00:00:00 2001 From: Andrei Date: Thu, 7 Sep 2023 16:29:09 +1000 Subject: [PATCH] Update attr --- IAM/MIM/get-Users.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/IAM/MIM/get-Users.ps1 b/IAM/MIM/get-Users.ps1 index 9f41d50..443dd30 100644 --- a/IAM/MIM/get-Users.ps1 +++ b/IAM/MIM/get-Users.ps1 @@ -3,16 +3,18 @@ Write-Host "Importing the LithnetRMA module..." Import-Module LithnetRMA # Define the output file name based on the current date and time -$OutputLogFileName = "C:\Users\z14809z\Desktop\" + (Get-Date -Format "yyyyMMdd-HHmmss") + ".csv" +$OutputLogFileName = "C:\Users\username\Desktop\" + (Get-Date -Format "yyyyMMdd-HHmmss") + ".csv" Write-Host "Output file name: $OutputLogFileName" # Search for user objects in LithnetRMA Write-Host "Searching for user objects..." -$users = Search-Resources -XPath "/Person" -AttributesToGet @("ObjectID","AccountName") -SortAttributes @("AccountName") +$users = Search-Resources -XPath "/Person" -AttributesToGet @("ObjectID","toyUID","toyWorkforceID","DisplayName","AccountName","title","FirstName","MiddleName","LastName","Domain","ebusBirthDate","JobTitle","ebusStartDate","ebusTerminationDate","Manager","TelephoneNumber","MobilePhone","Email","Company","City","Address","Region","Locale","msidmPamLinkedUser","ebusRoles","siteLocation","sourceou","toyIsK","toyIsDealer","toyCN","toyDealerCompanyRef","toyOUreference","toywmMasterOfGroups","eBusVirtualEntity") +-SortAttributes @("AccountName") + Write-Host "Found $($users.Count) user objects." # Specify the properties you want to export to the CSV file -$properties = @("ObjectID","AccountName") +$properties = @("ObjectID","toyUID","toyWorkforceID","DisplayName","AccountName","title","FirstName","MiddleName","LastName","Domain","ebusBirthDate","JobTitle","ebusStartDate","ebusTerminationDate","Manager","TelephoneNumber","MobilePhone","Email","Company","City","Address","Region","Locale","msidmPamLinkedUser","ebusRoles","siteLocation","sourceou","toyIsK","toyIsDealer","toyCN","toyDealerCompanyRef","toyOUreference","toywmMasterOfGroups","eBusVirtualEntity") # Create an array to hold the data $data = @()