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
$ThreadTimeout = 300 | |
#Check for jobs we can timeout | |
$RunningJobs = get-job -State Running | |
foreach($RunningJob in $RunningJobs) | |
{ | |
$CurrentTime = get-date | |
$TimeoutTime = $RunningJob.PSBeginTime | |
$TimeoutTime = $TimeoutTime.AddSeconds($ThreadTimeout) |
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
#Make new CSV File | |
$CSVFileName = "\\networkshare\folder\filename.csv" | |
"CSV,Header,With,Well,Named,Data,Columns" > $CSVFileName | |
$Timestamp = get-date -format o | |
#Log file | |
$LogFileName = "\\networkshare\folder\logfile_$Timestamp.log" | |
#Function to do stuff with IP address |