1
我正在編寫一個com +腳本,但我遇到了一些我不清楚的東西。 如何通過參數化方法找出暴露的值?我認爲這必須是一個哈希表或其他東西。Powershell公開參數化屬性的值
$comAdmin = New-Object -com ("COMAdmin.COMAdminCatalog.1")
$applications = $comAdmin.GetCollection("Applications")
$applications.Populate()
foreach ($application in $applications) {
$components = $applications.GetCollection("Components",$application.key)
$components.Populate()
foreach ($component in $components)
{
# What other values are available besides "DLL"
$dllName = $component.Value("DLL")
}
}
PS C:\Users\myself> $component|gm -MemberType ParameterizedProperty TypeName: System.__ComObject#{6eb22871-8a19-11d0-81b6-00a0c9231c29} Name MemberType Definition ---- ---------- ---------- Value ParameterizedProperty Variant Value (string) {get} {set}