Browse by Tags

All Tags » Objects (RSS)

Joining objects

PowerShell doesn’t have the equivalent of an SQL Union statement that lets you join objects together. What you can do is use New-Object to create the joined output. As an example that recently came up on a forum $outputs = @( ) Get-WmiObject -Class Win32_NetworkAdapterConfiguration...
Posted by RichardSiddaway | with no comments

Scripting Games Comments VIII: Creating Objects

One thing we have to do quite frequently is create an object and populate some variables.  In PowerShell v1 we would do something like this 001 002 003 004 005 006 007 008 $r   =   Get-WmiObject   -Class   Win32_OperatingSystem...

Combining Output

A recent question of the PowerShell forum asked how the output of two scripts could be combined. The scripts in question were using Get-ChildItem and Get-Acl to pull back two sets of information related to the file. PowerShell produces objects. .NET objects...
Posted by Richard's space
Filed under: , ,