Category: Powershell

PowerShell Start-Process

Introduction PowerShell Start-Process Here are neat examples of how Start-Process can be used to launch executables and other files. Topics for PowerShell Start-Process Cmdlet Example 1: Launch a Program Such as Notepad Example 2: Launch Internet Explorer Help with Start-Process Invoke-Item An Alternative to Start-Process Summary of PowerShell Get-Process  ♣ …

PowerShell Start-Job Background

PowerShell Background Jobs The purpose of this cmdlet is to set off a chain of instructions that form a PowerShell background job.  Start-Job requires a scriptblock containing a file reference or normal PowerShell code. Windows PowerShell Start-Job Topics Understanding the Start-Job Cmdlet Example 1: List System Events Example 2: Start-Job …

PowerShell 3.0 Workflow

Getting Started with Workflow in PowerShell 3.0 This technique for understanding PowerShell’s Workflow is very much my own making.  It is designed to illustrate the three keywords ‘Workflow, Parallel and Sequence’. Note 1: You need PowerShell version 3 or later. Example 1: Simple PowerShell v3 Workflow Example 2a: To Create …

PowerShell WMI SystemRestore

Introduction to PowerShell WMI SystemRestore This real-life task for PowerShell is to control your desktop computer’s system restore points. We will employ the WMI SystemRestore class to enable, or disable, the protection settings for restore points. (Screenshot of Control Panel, System, Advanced Tab) Topics for SystemRestore WMI Class SystemRestore Set-SysRestore …

PowerShell Restart-Service Cmdlet

Windows PowerShell Restart-Service The most efficient way for PowerShell to cure a hung service is with the verb 'restart'.  Restart-Service xyz is just simpler and more efficient than stop-Service xyz, followed by start-Service xyz.  If you are new to PowerShell Restart-Service, then I suggest that you begin with my Get-Service …

PowerShell Module Directory

Introduction to PowerShell Modules PowerShell modules are like mini-apps, they have instructions to deliver useful gismos.  Configuring the path for the Import-Module cmdlet requires moderately complex preparation, and the purpose of this page is just get readers started. PowerShell Modules Topics Creating the Special PowerShell Module Folder Import-Module Get-Module Load …

PowerShell v3 Ipconfig Select-String

PowerShell v3 Ipconfig and Select String The purpose of this page is control the output of Ipconfig with PowerShell’s Select-String. PowerShell v3 Ipconfig Introduction to PowerShell and Ipconfig Example 1: To List Just IP Addresses Example 2: To Display the Default Gateway Troubleshooting Ipconfig  ♣ Introduction to PowerShell and Ipconfig …