Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Current Date output of export file

$
0
0

Hi

I am using below script to get HR samaccount from AD. Now I want to output should come with date name when the script run.

Also can send that current date output to my email address.

========================

Import-Module Activedirectory
Get-ADUser -Filter {(SamAccountName -like "*HR*") -and (enabled -eq"True") -and (pager -like "*")} -Properties * | select name,SamAccountName,pager | Export-Csv C:HR.csv -NoTypeInformation

================


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>