Results for a Powershell command
James Stack
I need to know if a certain file is in a certain location on hundreds of desktops. I'm able to successfully send the Powershell command and I do get a response but I have to open the output log to see the results. This has to be done for every host I sent the command to and is very time consuming. Is there a way to get the results without checking each output log?
1
Comments
I recommend setting up a File Scanner for that: https://documentation.pdq.com/PDQInventory/19.0.40.0/file_scanner_settings.htm
I appreciate the quick response but that solution would still require me to open each device to find the status of the folder.
You can create Collections to see which computers do and do not have the file.
If you want to stay in Deploy, you can make your PowerShell script throw a non-zero exit code if the file is missing.
if ( -Not ( Test-Path "C:\Path\To\TheFile.txt" ) ) {Exit 10
}