Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

winrm nested key=value pairs

Closed Thread
 
Thread Tools Display Modes
Old 05-08-2008   #1 (permalink)
Simon
Guest
 
Posts: n/a

winrm nested key=value pairs

Hi,

Is there a way to nest key-value pairs when using winrm. For example,
I know this works @{key="value";key2="value2"} and produces something
along these lines:

<p:key>value</p:key>
<p:key2>value2</p:key2>

But what if I wanted something along these lines:

<p:key>
<p:key2>value2</p:key2>
</p:key>

Is there a way to do this using the winrm command?

Thanks,

Simon
 
Old 05-08-2008   #2 (permalink)
MaxTrinidad
Guest
 
Posts: n/a

RE: winrm nested key=value pairs

I was just wondering, in CTP V2, have you try using the
PS> Invoke-Expression -runspace $rs1 -Command YourcommandHere ...

To see if you get the same result. ?


--
"To go where no scripter has gone before..."


"Simon" wrote:
Quote:

> Hi,
>
> Is there a way to nest key-value pairs when using winrm. For example,
> I know this works @{key="value";key2="value2"} and produces something
> along these lines:
>
> <p:key>value</p:key>
> <p:key2>value2</p:key2>
>
> But what if I wanted something along these lines:
>
> <p:key>
> <p:key2>value2</p:key2>
> </p:key>
>
> Is there a way to do this using the winrm command?
>
> Thanks,
>
> Simon
>
 
Old 05-08-2008   #3 (permalink)
Marco Shaw [MVP]
Guest
 
Posts: n/a

Re: winrm nested key=value pairs

Quote:

> Is there a way to do this using the winrm command?
I've just emailed the winrm team to see if they have any feedback.

Marco
 
Old 05-09-2008   #4 (permalink)
Simon
Guest
 
Posts: n/a

Re: winrm nested key=value pairs

Thanks Marco.

Simon
 
Old 05-12-2008   #5 (permalink)
Marco Shaw [MVP]
Guest
 
Posts: n/a

Re: winrm nested key=value pairs

Quote:

> <p:key>
> <p:key2>value2</p:key2>
> </p:key>
>
> Is there a way to do this using the winrm command?
Response from the WinRM team:

"Cannot be achieved by providing the key, value pairs on the command
line. The only way to do this is using the -File option..."

Marco
 
 
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
winrm in powershell vs. in cmd.exe Simon PowerShell 2 05-08-2008 10:21 AM
Converting String Pairs to IDictionary? coconet .NET General 3 04-30-2008 04:58 PM
Help configuring WinRM ssg31415926 PowerShell 20 03-06-2008 09:03 AM
WinRM Pablo Vista installation & setup 0 12-03-2007 03:31 PM
WinRM from PowerShell Chris Warwick PowerShell 2 11-06-2007 02:19 PM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49