Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Powershell hash of hashes
$entries = @{}
import-csv $csv | % {
$entries.add(($adpentry.EEfile_Number),(@{
fname = $_."First Name"
lname = $_."Last Name"
department = $_.Department
location = $_.Location
manager = $_.Manager
title = $_."Job Title"
}))
}
$user = Get-ADUser -Properties employeeID -Filter { employeeID -like "*1804" }
write-host "employeeID:" $user.employeeID
Write-Host "fname :" ($entries.(($user.employeeID).trimstart('0'))).fname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment