Skip to content

Instantly share code, notes, and snippets.

@brccabral
Last active March 19, 2024 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brccabral/c2cdcd3d225475bbb735928a06f26d1f to your computer and use it in GitHub Desktop.
Save brccabral/c2cdcd3d225475bbb735928a06f26d1f to your computer and use it in GitHub Desktop.
Windows Customizations

Windows Customizations

$FileOrFolderPath = "D:\jboss"
if ((Test-Path -Path $FileOrFolderPath) -eq $false) {
Write-Warning "File or directory does not exist."
} else {
$LockingProcess = CMD /C "openfiles /query /fo table | find /I ""$FileOrFolderPath"""
Write-Host $LockingProcess
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment