Spring til indhold
For the complete documentation index, see llms.txt. This page is also available as Markdown.

PowerCLI advanced troubleshooting

Remote Desktop Manager kalder PowerCLI's cmdlets og presents resultaterne i dens bruger interface.

Her er trin til hjælp isolate issues når integration er ikke working som expected.

Script A: Get listen af virtual maskiner

GETVMS.PS1

Param(
    [Parameter(Mandatory=$true)]
    [string]$viServer,
    [Parameter(Mandatory=$true)]
    [string]$userName,
    [Parameter(Mandatory=$true)]
    [string]$password
) #end param

$VMHost = Connect-VIServer $($viServer) -User $userName -Password $password
if ($VMHost -eq $null ) { throw "Connection to server failed!";}
try
{
    Get-View -ViewType VirtualMachine |  select -Property Name, {$_.Moref.Value};
}
catch
{
    write-host $ErrorMessage
}
Disconnect-VIServer $VMHost -Force -Confirm:$false

Eksempel brug

.\GetVMs.ps1 [SERVER_NAME] [USER_NAME] [PASSWORD]

Navn $_.Moref.Value ---- -------------- MACHINE1 18 MACHINE2 19

Script B -:Launching vmrc

CONNECTVMRCFROMPOWERCLI.PS1

Eksempel brug

De skal send MoRef.Value som var hentet ved hjælp af Script A, i vores eksempel, start MACHINE2 som har 19 for ID.

VMRC bør appear og allow De til interact med den.

Sidst opdateret

Var dette nyttigt?