PowerShell Arrays and Generic Lists

In PowerShell the most common method of storing data is to store it in an ‘Array’.Arrays can be initialized using a simple syntax: Array

as you can see we can store just about any type of data in an array which can be good and bad. This can lead to errors in situations where […]

Creating Reports in Excel Using PowerShell

Create an Inventory of the Local Computer   Getting Computer Services

  The Output should look like this   PS C:\> VERBOSE: Select-SLWorkSheet :     Worksheet ‘Services’ is now selected VERBOSE: Set-SLTableStyle : Setting TableStyle ‘Medium15′ on CellRange – StartRow/StartColumn ‘5’:’2′ & EndRow/EndColumn ‘184’:’16’ VERBOSE: Save-SLDocument : Document has been Saved to ‘c:\temp\excel\Localhost-Inventory.xlsx’   Check […]

Understanding The PowerShell Help System: Get-Help

CMDLET Name : Get-Help What it does: Displays information about how to use a particular cmdlet or function. Most people when they start out with PowerShell are not aware of the extensive help that PowerShell ships with and as such may perceive PowerShell to be a difficult language. In reality the truth couldn’t be any […]

Update-FormatData

In the last article we learnt how to extend a Type with Update-TypeData today we will learn how to get the output to look just the way we want using Update-FormatData CMDLET Name : Update-FormatData What it does: This cmdlet lets you update the formatting data without restarting Windows PowerShell. When you run Get-Service without […]

Extending Win32_PhysicalMemory with Update-TypeData

CMDLET Name : Update-TypeData What it does: Let’s you add new properties, modify existing properties, add new methods, define a key property to sort databy, define exactly what properties you want to see when the cmdlet is typed without any select statements. Every object in PowerShell has a Type associated with it that defines the object. […]

WMIX – PowerShell WMI extensions Part 2

In Part –1 we learnt how to obtain and install the ‘WMIX’ module. In this part we will spend some time using some of the functions from the module.   Get-ComputerSystem PS C:\> Get-ComputerSystem     Domain              : WORKGROUP Manufacturer        : VMware, Inc. Model               : VMware Virtual Platform Name                : VM1 PrimaryOwnerName    : Kiran TotalPhysicalMemory […]