I just started with powershell. And created a script to monitor my server. But, I also need to monitor my harddisks and raid configuration from my server. This only can be done with software from HP.
So what I want:
I have a command line utility from HP, which I can use to monitor the array and disks.
when I start this utility, I get this:
PS C:\Program Files (x86)\Compaq\Hpacucli\Bin> .\hpacucli.exe controller slot=3 physicaldrive "1I:0:1 (port 1I:box 0:bay 1, 750 GB)" show status | out-host
physicaldrive 1I:0:1 (port 1I:box 0:bay 1, 750 GB): OK
I just want this output as a variable to use it further in my script.
How can this be done.
I tried:
$disk1 = "c:\program files (x86)\Compaq\hpacucli\bin\hpacucli.exe controller slot=3 physicaldrive "1I:0:1 (port 1I:box 0:bay 1, 750 GB)" show status | out-host"
But this was not working
So I just want to have physicaldrive 1I:0:1 (port 1I:box 0:bay 1, 750 GB): OK
as variable.
I hope someone can help me. So I can learn to use powershell further.
Thanks allready. dennis