Category: Powershell

Windows PowerShell Get-Alias

Introduction to Windows PowerShell Get-Alias PowerShell has a whole family of Aliases.  One group of these aliases provides shorthand for the regular cmdlets; instead of typing thirteen keystrokes for Get-Childitem, just use a PowerShell alias and type the three letters: gci. However, I am going to concentrate on the other group …

PowerShell ConvertTo-CSV

PowerShell ConvertTo-CSV Let me say right off the bat that wherever possible I prefer to use Export-Csv.  This because I usually want to view the results in Excel, rather than to study them at PowerShell’s command line. Topics for PowerShell’s ConvertTo-CSV Introduction to ConvertTo-CSV Example 1: Simple ConvertTo-Csv Cmdlet Example …

PowerShell Get-Date and DateTime

Windows PowerShell Get-Date Format Manipulating dates is always tricky.  However, PowerShell’s Get-Date cmdlet does a wonderful job of interpreting the different international formats for day / month / year.  As a result, whatever your computer’s country locale, it will be easy to calculate how many days there are to Christmas. …

PowerShell Function Parameters

Creating Windows PowerShell Functions Regular PowerShell command(s) + named parameters = Function. I see a Parameter in PowerShell as similar to a -in a  DOS command.  In both cases the user gets extra options for the basic command. Topics for PowerShell Parameters Benefits of Microsoft PowerShell Parameters Key Concepts for …

PowerShell Show-BalloonTip Function

How PowerShell Can Display a Notification Balloon This is just a fun project to learn about PowerShell functions; in particular, how to make use of .Net objects such as Windows.Forms. Show-BalloonTip Function Planning the Show-BalloonTip Function Code for the Show-BalloonTip Function Researching Windows.Forms Properties  ♣ Planning the Show-BalloonTip Function The …

Windows PowerShell WinRm and WSMan

Windows PowerShell WinRm and WSMan To get PowerShell’s remoting capability working fully, you need an extra ‘shell’, which is supplied by the WinRm.  Even after the WinRm service install completes successfully, you need to tweak its config settings before the remote sessions become operational. Remoting With PowerShell WinRm and WSMan …