Hi All,
I have the following code that is working just fine.
[font=Consolas][size=2][font=Consolas][size=2]txtDiskActivity.Text = RunScript([/size][/font][/size][/font][font=Consolas][size=2][color=#a31515][font=Consolas][size=2][color=#a31515][font=Consolas][size=2][color=#a31515]"Invoke-Command -ComputerName "[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] + txtPC.Text + [/size][/font][/size][/font][font=Consolas][size=2][color=#a31515][font=Consolas][size=2][color=#a31515][font=Consolas][size=2][color=#a31515]" -ScriptBlock {Get-Counter -counter '\\LogicalDisk(C:)\\Avg. Disk sec/Write'}"[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2]);[/size][/font][/size][/font]
The output is the following (view attachment):
"\\PC\logicaldisk(c:\avg. disk sec/write :
0.000180439778201115"
What I would like is to show only the number values and not the string. I read on "cookvalue" but had no luck implementing it.
Any help is appreciate.
Regards,