Lurking:
My Threads on Microsoft Connect
Business Card:
My Electronic Business Card
Transcript Card:
My Electronic Transcript Card 977723 jongurgul
Jon Gurgul with SQL Server...and occasionally something else.
My Threads on Microsoft Connect
Business Card:
My Electronic Business Card
Transcript Card:
My Electronic Transcript Card 977723 jongurgul
Hello Jon
I have a Question that belongs to your great DELL Service Tag script:
http://gallery.technet.microsoft.com/scriptcenter/Dell-Service-Tag-21a72a1f
I have one Problem, how did i get only Special values from the XML Output?
i tried a lot of functions and stuff but i dont get it 🙁
Can you give me a tipp?
Thanks in advanced.
regards, sebastian
Hi Sebastian,
What special values were you looking for?
Hi Jon
Thanks for your reply 🙂
I’am searching for:
, ,
Are there any chances to get only that values?
Thanks in advanced.
regards, sebastian
I see that there was a Problem with the Values, so again without the tags: StartDate, EndDate, DaysLeft
Get-DellAssetInformation "6ZL84R1" | Select-Xml -XPath "/ArrayOfAsset/Asset/ns:Entitlements/ns:EntitlementData" -Namespace @{ns="http://support.dell.com/WebServices/"} | Select -expand node | Select StartDate,EndDate,DaysLeft;Thanks Jon
really thanks for your help!
I put the Output on a var, and with [1] i get only the first 3 values StartDate, EndDate, DaysLeft. Normaly i get this lines 3 times.
But how can i cut/trim/edit the string in just the values?
“@{StartDate=2011-02-10T00:00:00; EndDate=2014-02-11T00:00:00; DaysLeft=327}”
thats the Output at the Moment.
I want each value in an extra variable, is that possible?
A variable example looping thru each returned entry:
Get-DellAssetInformation "6ZL84R1" | Select-Xml -XPath "/ArrayOfAsset/Asset/ns:Entitlements/ns:EntitlementData" -Namespace @{ns="http://support.dell.com/WebServices/"} | Select -expand node |%{$StartDateVariable = $.StartDate;
$EndDateVariable = $.EndDate;
$DaysLeftVariable = $_.DaysLeft;
Write-Host "Started on "$StartDateVariable" End on "$EndDateVariable" "$DaysLeftVariable" day(s) remaining";
}
Thanks for your help Jon
Now its perfect! 🙂
Really a great script.
Greetings from Germany.
Have a nice day.
regards, sebastian
No problem glad I could help. 🙂