Posts Tagged ‘cli’

sc queryex type=service state=all
Find by specific name pattern:
| find /i "srvcname"
Also by PowerShell:
Get-Service | Where-Object {$_.displayName.StartsWith("NATION-")} | Select name

Advertisements

Let’s take this scenario. You’ve uploaded a new version of software to the Server. You didn’t push the “Unblock” putton in file Properties… . The application upgraded itself, and for now you’ve a thousands of files in hundreds of folders which are “Blocked”, but can be readable… how can you repair this? With PowerShell 3!

dir c:\mydir -Recurse | Unblock-File

Debug:

dir c:\mydir -Recurse | Unblock-File -WhatIf

Easy, huh?