Powershell V2 CTP 2 – Where did that object come from ?

One of the biggest features of PS V2 is the ability to do remoting. It’s great to be able to run a ScriptBlock against a bunch of computers.

In the first version of the CTP, one issue I had was that I couldn’t tell which object came from which computer.

It looks like CTP2 has a resolution to this. They tack on a ComputerName property to objects that are returned from a remote connection.

Notice that if I do a get-process on a local computer there is no ComputerName attribute.

image

However, if I get an object back from a remote system I can get a ComputerName attribute.

image

I am using the icm alias for the invoke-command cmdlet against a runspace that has 3 remote computers, Powershell-dev1, Powershell-dev2, and Powershell-dev3.

What I think would be nice is to have ComputerName be a default property that gets displayed automatically when you list a remote object. That way you wouldn’t have to explicitly use select object or format-table/format-list to see the attribute.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: