PowerShell New-PSDrive
PowerShell's Way of Mapping a Network Drive The modern method for mapping a network drive is to use New-PSDrive. PowerShell 3.0 introduces the -Persist parameter so that we can not only see the name of your new drive in Windows explorer, but also know it's still there the next time …
Introduction to Scripting PowerShell Function As you may expect from a top-notch scripting language, PowerShell supports functions. There are several advantages of investing time in creating functions. One benefits of a function is that once you get it working, it’s easy to call the commands later in the same script; …
Techniques for PowerShell Parameters On this page I want to show you methods for researching PowerShell parameters. Exploit a Cmdlet’s Help File Find Cmdlets that Use a Particular Parameter List Positional PowerShell Parameters PowerShell Declaring Function Parameters ♦ Exploit a Cmdlet’s Help File Each PowerShell cmdlet (or function) has it’s …
A Windows PowerShell Tutorial My mission is to two fold. Firstly, to encourage a new generation of script writers to learn PowerShell; secondly I want to provide experienced scripters with a bank of example scripts so that they can convert to PowerShell. To newbies I want to say: ‘It really …
PowerShell 3 -PassThru Parameter PowerShell’s -PassThru parameter has found signficantly more uses in PowerShell 3.0. In a nutshell -PassThru shows you the results of a command that would otherwise be silent. Example 1: Out-GridView -PassThru Launching PowerShell 3.0 in Windows 8 What Else Is New In PowerShell 3.0? ♦ Example …
Combining Get-ChildItem and Get-ItemProperty It can be tricky to get a list of values from the registry using PowerShell. The secret is to combine two cmdlets, Get-ChildItem and Get-ItemProperty. How to View Registry Values with PowerShell Part 1 – List the Windows Services Part 2 – List the ImagePath Values …
PowerShell -Query Parameter PowerShell’s -query parameter looks for a WMI Query Language (WQL) statement. Invariably, the statement is introduced by a "Select * from …." construction. In truth, "Select * from" was most useful in VBScript, but in PowerShell many a time the simpler statement works just as efficiently and …