Skip to content

Instantly share code, notes, and snippets.

@BeanBagKing
Created April 7, 2016 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save BeanBagKing/6d39943c498b69b5c12a06dc2048fc3d to your computer and use it in GitHub Desktop.
Save BeanBagKing/6d39943c498b69b5c12a06dc2048fc3d to your computer and use it in GitHub Desktop.
# 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