Tag Archives: Invoke-Command

Using Start-Job as a Scheduled Task

Here’s a technique you might want to use for ad hoc troubleshooting or reporting. Even though it is possible to set up scheduled tasks to run PowerShell commands or scripts, it is cumbersome and time consuming. PowerShell v3 offers a … Continue reading

Posted in PowerShell v2.0, Scripting | Tagged , , , , | 1 Comment

Ping IP Range

Last week I came across a post on using PowerShell, or more specifically a .NET Framework class, to ping a range of computers in an IP subnet. The original post by Thomas Maurer is here. I added a comment. And … Continue reading

Posted in PowerShell, PowerShell v2.0 | Tagged , , , , , , , , | 1 Comment

Get Local Administrators with WMI and PowerShell

Earlier this week I was helping someone out on a problem working with the local administrators group. There are a variety of ways to enumerate the members of a local group. The code he was using involved WMI. I hadn’t … Continue reading

Posted in PowerShell v2.0, Scripting, WMI | Tagged , , , , , , , | 12 Comments

ScriptBlocks On the Fly

I’m always preaching about writing PowerShell scripts and functions with reuse and modularization in mind. You should never have to write the same block of code twice. But what about in the shell during your daily grind? Perhaps today you’re … Continue reading

Posted in PowerShell, Scripting | Tagged , , , | 1 Comment

Get Your TCP Ports Here!

Once again, the PowerShell forum at ScriptingAnswers.com has undone me. I was answering a question about running Netstat in a PowerShell session on a remote computer which got me thinking about a PowerShell function to turn NETSTAT.EXE output into objects. … Continue reading

Posted in CommandLine, PowerShell v2.0, Windows 7, Windows Server | Tagged , , , , | 2 Comments