Category: Powershell

PowerShell Get-Counter Cmdlet

 PowerShell Get-Counter PowerShell's Get-Counter provides an alternative technique to employing Perfmon.  Normally it’s easy to be enthusiastic about PowerShell, but in the case of Get-Counter, I would not attempt to create scripts until I had a working knowledge of Performance Monitoring. Topics for PowerShell's Get-Counter Our Mission Example 1: Check …

PowerShell 3.0 Network Cmdlets

Network Cmdlets in Windows PowerShell 3.0 PowerShell 3.0 brings lots of handy new network cmdlets – I say cmdlets, but to be precise they are functions, but with the familiar Verb-Noun pairing. Research PowerShell Network Commands Show-Command with Get-NetIPAddress Example 1: Get-NetIPAddress Script Example 2: Get-NetIPInterface PowerShell 3.0 in Windows …

Windows PowerShell – WMI Services

Windows PowerShell WMI Services PowerShell provides two distinct ways of scripting Windows services.  For lists of services I employ Get-WmiObject win32_service.  However, when I want to deal with a particular service I choose Get-Service followed by nameOfService. Topics for PowerShell Get-WmiObject win32_service Our Mission Preliminary Check of the Properties with …

PowerShell Help About_ Files

Windows PowerShell Help Files PowerShell has a selection of about_ files. It’s a pity that stay these trees-of-wisdom stay in the shadows of the help for Verb-Noun cmdlets.  The purpose of this page is to alert you to the interesting information in these lesser known about_Topic files. Topics for PowerShell …

Spreadsheet PowerShell Export-CSV

Spreadsheet PowerShell Export-CSV Comma separated values are the ideal format for translating lines of text into rows in a spreadsheet.  Since much of PowerShell’s output is in columns, all we need is a cmdlet which will export CSV data, then we can exploit Excel’s mathematical capability. PowerShell Export-CSV Topics Example …

PowerShell 3.0 Schedule Task

How To Schedule Tasks for PowerShell Scripts The situation: You have a PowerShell 3.0 script that you want to run every day, or every week.  Alternatively, you want to execute PowerShell 3.0 commands after a particular event occurs. My advice is don’t re-Invent the wheel; take advantage of the built-in …

PowerShell Restore-Computer

Restore Your Computer With PowerShell My mission on this page is to explain how to restore your computer’s system settings using two PowerShell commands, Restore-Computer and firstly, Get-ComputerRestorePoint While you could do this via the Control Panel, I will show you how PowerShell can not only perform the restore, but …

PowerShell Clear-WinEvent

How to Delete Windows Event Log Messages Our mission is to 'zero' those dozens of Windows event logs that don't respond to PowerShell's native command: Clear-Eventlog. To avoid disaster by being too gung-ho, I recommend that you practice with Get-WinEvent and Clear-Eventlog before you try my examples on this page. …