Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# For servers in list, check if the folder exists
# Useful for detecting user folders, installed programs, etc.
Get-Content C:\Users\UserName\Desktop\DetectFolder\servers.txt | `
Select-Object @{Name='ComputerName';Expression={$_}},@{Name='FolderExist';Expression={ Test-Path "\\$_\c$\program files"}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment