compdigit44
asked on
PowerCli 6 Script Questions
I am not very good in PowerShell yet and create the following script to check the values listed below. Ideally I would like all results displayed in one out-gridview with the name of the host listed to the right or left of each value and be able to use a variable in my host name so I can scan multiple host but having problems getting a variable to work. I think I am 50% there and was hoping for some additional guidance.
get-advancedsetting -entity server1 -name datamover.hardwareAcceleratedMove | out-gridview
get-advancedsetting -entity server1 -name DataMover.HardwareAcceleratedInit | out-gridview
get-advancedsetting -entity server1 -name VMFS3.HardwareAcceleratedLocking | out-gridview
get-advancedsetting -entity server1 -name VMFS3.EnableBlockDelete | out-gridview
get-advancedsetting -entity server1 -name DataMover.MaxHWTransferSize | out-gridview
get-vmhost -name server1 | esxcli storage nmp satp rule list | out-gridview
ASKER
This is very interesting ....
I understand that $filter is a variable but what is the purpose of the @ syn.. Also after the Get-VMhost I could add -name to add a list of specific host correct.
I understand that $filter is a variable but what is the purpose of the @ syn.. Also after the Get-VMhost I could add -name to add a list of specific host correct.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much.. I am going to read up more on PowerShell arrays and will give the scripts a try tomorrow..
ASKER
Wow great advance as always!!!
ASKER
You script works really well... IS there any way to else include the SATP list output with in the Grid... I am just checking to see it a rule is present for a storage device starting with "PURE"
SATP query cannot be added in same script block, but if the script is broken down in functions then might be possible to get output in HTML.
this kind of scripts take time to develop.
this kind of scripts take time to develop.
May be you will have to run both of them seperately.
Assuming you have multiple Hosts and want to retrieve values for all of them try the scipt below.
NOTE: Each code block is doing the same thing, its just the different way to get the results.
Output without Formatting
Open in new window
Output formatted TableOpen in new window
Output GridOpen in new window
Output to a .CSV file (remember to change the -path)Open in new window