Hey Experts, in the script below, a log file is created with the file name that relates to the date the script is ran (Stale_Users_%Year%_%Dayof
Year%). What I would like to see is the Month Day Hour Minute (1208_1114) if the script was ran Dec 8th at 11:14am. The year isn't necessary. I tried the %m%d%H%M and -uFormat with the $date variable but I just haven't been able to make it happen. Any help would be appreciated.
$logPath = "C:\Tools\Logs\Stale_Users_" #directory to log output
$date = Get-Date
$todaysLog = $logPath + $date.Year + "_" + $date.DayOfYear + ".log"