Skip to content

Commit

Permalink
Update attr
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei committed Sep 7, 2023
1 parent b66a59a commit 1224259
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions IAM/MIM/get-Users.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 = @()
Expand Down

0 comments on commit 1224259

Please sign in to comment.