Created
November 2, 2018 15:07
-
-
Save vexx32/04765a62977dc2ef9316aa43f49fb3d3 to your computer and use it in GitHub Desktop.
Trim the header row of a CSV
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Properties = 'GivenName', 'Surname', 'Department', 'EmailAddress', 'Office' | |
Get-ADUser -Filter 'Department -like "*"' -Properties $Properties | | |
Select-Object -Property $Properties | | |
ConvertTo-Csv -NoTypeInformation | # Convert to CSV string data without the type metadata | |
Select-Object -Skip 1 | # Trim header row, leaving only data columns | |
Set-Content -Path "c:\emailaddress.csv" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This worked perfect!!, Thanks for the help!!