简体   繁体   中英

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

I've a PowerShell variable called $DB and it has a member called Tables, and I want to retrieve it in the following Cmdlet:

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

But, It does not retrieve the table in the output.

像这样:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM