How can I retrieve a value from the SSIS package file using PowerShell?


Sql Server Integration Services packages are stored as xml files with a dtsx extension. I need to be able to extract their build numbers with Powershell. The relevant part at the top of the file looks like-

<?xml version="1.0"?>
<DTS:Executable xmlns:DTS="">
<DTS:Property DTS:Name="PackageFormatVersion">2</DTS:Property>
<DTS:Property DTS:Name="VersionMajor">1</DTS:Property>
<DTS:Property DTS:Name="VersionMinor">0</DTS:Property>
<DTS:Property DTS:Name="VersionBuild">265</DTS:Property>

I need to extract the VersionBuild number, but the DTS namespace is confusing me. After I do the get-content, how can I get at the value?

As part of SQL Server Powershell Extensions CodePlex project there an SSIS module. Where you can do something like this:

import-module SSIS
$package = Get-ISPackage -path "C:\Program Files\Microsoft SQL Server\100\DTS\Packages\sqlpsx1.dtsx"