找出变量的值而不是地址

时间:2017-02-14 19:46:59

标签: powershell-v2.0

这是来自PowerShell的示例代码:

$SPNAME = Read-Host "Please enter Server name with org-root/ls-<SNAME>"
$SN = Get-UcsBlade -AssignedToDn $SPNAME | select Serial
$ChassisID = Get-UcsBlade -AssignedToDn $SPNAME | select ChassisId
Write-Host $SN
Write-Host $ChassisID
$ChassisName = Get-UcsChassis $ChassisID | select UsrLbl
Write-Host $ChassisName

此处ChassisID的输出显示为1.我希望它显示变量值而不是ID值。

0 个答案:

没有答案