# Finding Every Get-Nc* Command that has a -Node switch
#########################
## Function FindSwitch ##
#########################
Function FindSwitch {
foreach ($switch in $switches){
$nameOfSwitch = $switch.name
If($nameOfSwitch.Contains("Node")){
$getNcName
return
}
}
}
####################
### MAIN PROGRAM ###
####################
$getNcs = get-nchelp get-nc*
foreach ($getNc in $getNcs){
$getNcName = $getNc.Name
$helpContents = get-help $getNcName
$switches = $helpContents.parameters.parameter
FindSwitch
}
No comments:
Post a comment