More Useful PowerShell Commands

Some more PowerShell commands I’ve found useful… Enjoy!

Get process start time

Get-Process -Id [PID] | FL StartTime

Emulate “Press Any Key”

Write-Host "Press any key to continue ..."
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")

Download the Latest IIS Log from a bunch of servers

foreach ($server in $serverlist) {
get-childitem -path \$serverc$iislogssite1 | 
where-object { -not $_.PSIsContainer } | 
sort-object -Property $_.CreationTime | 
select-object -last 1 | 
copy-item -Destination (join-path $path "$server-latest.log") }

Random Helpful Linux Commands

For the past few months, I’ve been working with Linux a lot more than I used to. With that increased exposure has come some helpful commands that I’ve come across, so I thought I’d share a few of them here. I’m sure many of them are fairly common knowledge, but I’ll share them nonetheless…

Continue reading “Random Helpful Linux Commands”