簡體   English   中英

如何在寫入主機cmdlet中檢索PowerShell變量的成員

[英]How to retrieve a member of a PowerShell variable in a write-host cmdlet

我有一個名為$ DB的PowerShell變量,它有一個名為Tables的成員,我想在以下Cmdlet中檢索它:

Write-host "The table is $DB.table"

但是,它不會檢索輸出中的表。

像這樣:

Write-Host "The table is $($DB.table)"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM