Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

Email attachment CSV with only specific colums

$
0
0

I’ve been tasked with running a weekly report that shows accounts expiring. I’ve been using this (https://blogs.technet.microsoft.com/makeiteasy/2012/11/23/auto-mail-expiring-domain-accounts/) pretty successfully but need to limit the columns the report outputs. For now, the report just sends to myself and these are the columns I get in my CSV file. (AccountExpirationDate DistinguishedName Enabled LastLogonDate LockedOut Name ObjectClass ObjectGUID PasswordExpired PasswordNeverExpires SamAccountName SID UserPrincipalName)

Any way I can limit the report to just show me 3 or 4 of the column headings above? Please let me know if there is anything I can clarify and as always, thanks for the help!

Cheers.

submitted by /u/thecrankysysadmin
[link] [comments]

The post Email attachment CSV with only specific colums appeared first on How to Code .NET.


Viewing all articles
Browse latest Browse all 8793

Latest Images

Trending Articles



Latest Images