mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 22:02:55 +01:00
Move website files to /website/
This commit is contained in:
parent
430d8e6e17
commit
d9013a86c4
191 changed files with 9 additions and 9 deletions
30
website/index/samples/sample.powershell.txt
Normal file
30
website/index/samples/sample.powershell.txt
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
$SelectedObjectNames=@();
|
||||
$XenCenterNodeSelected = 0;
|
||||
#the object info array contains hashmaps, each of which represent a parameter set and describe a target in the XenCenter resource list
|
||||
foreach($parameterSet in $ObjInfoArray)
|
||||
{
|
||||
if ($parameterSet["class"] -eq "blank")
|
||||
{
|
||||
#When the XenCenter node is selected a parameter set is created for each of your connected servers with the class and objUuid keys marked as blank
|
||||
if ($XenCenterNodeSelected)
|
||||
{
|
||||
continue
|
||||
}
|
||||
$XenCenterNodeSelected = 1;
|
||||
$SelectedObjectNames += "XenCenter"
|
||||
}
|
||||
elseif ($parameterSet["sessionRef"] -eq "null")
|
||||
{
|
||||
#When a disconnected server is selected there is no session information, we get null for everything except class
|
||||
}
|
||||
$SelectedObjectNames += "a disconnected server"
|
||||
else
|
||||
{
|
||||
Connect-XenServer -url $parameterSet["url"] -opaqueref $parameterSet["sessionRef"]
|
||||
#Use $class to determine which server objects to get
|
||||
#-properties allows us to filter the results to just include the selected object
|
||||
$exp = "Get-XenServer:{0} -properties @{{uuid='{1}'}}" -f $parameterSet["class"], $parameterSet["objUuid"]
|
||||
$obj = Invoke-Expression $exp
|
||||
$SelectedObjectNames += $obj.name_label;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue