0
我試圖從平面文件源連接中獲取字段列表。我嘗試了下面的PowerShell命令。從SSIS XML文件中提取信息?
[xml]$p = cat .\package.dtsx
$p.Executable.ConnectionManager
,並返回
Property ObjectData -------- ---------- {DelayValidation, ObjectName, DTSID, Description...} ObjectData {DelayValidation, ObjectName, DTSID, Description...} ObjectData {DelayValidation, ObjectName, DTSID, Description...} ObjectData {DelayValidation, ObjectName, DTSID, Description...} ObjectData {DelayValidation, ObjectName, DTSID, Description...} ObjectData {DelayValidation, ObjectName, DTSID, Description...} ObjectData {DelayValidation, ObjectName, DTSID, Description...} ObjectData ......
如何找到名稱的特定連接?我嘗試了以下,但它不起作用。
# Find the connection which name is "XXX"
$p.Executable.ConnectionManager | % { $_.Property } | ? { $_.ObjectName -eq "XXX" }