I’m preparing my demo’s for a MS6235A SSIS training I will be teaching in a couple of days. In one of the demo’s I just copy a SSIS package from the file system to SQL Server using the DTUtil from the command prompt with this command:

DTUTIL /FILE <Path to package>.dtsx /COPY SQL;<Packagename>

As expected this works like a charm:

But on my demo machine I had a PowerShell window open and started from there. I first tried if the DTUtil command is recognized:

DTUtil /?

And seeing the output it is:

So I used the same command as in the CMD-prompt to copy the package:

DTUTIL /FILE <Path to package>.dtsx /COPY SQL;<Packagename>

But now I got the error message that “Packagename” was not recognized as the name of a cmdlet, function, script file, or operable program.

Looking at the code I realized that there was a semicolon right before the “Packagename” and apparently, just like in T-SQL, the semicolon is a statement seperator in PowerShell.

So when I put the DTUtil parameters between double quotes it should work:

DTUTIL "/FILE <Path to package>.dtsx /COPY SQL;<Packagename>"

And it does:

The conclusion is that it’s perfectly possible to use DTUtil from PowerShell and it’s very interesting to learn this new technology by using it for known tasks but keep in mind what Ted said in his post Forgotten art of using what you know. I didn’t use the formula but writing the DTUtil command from the CMD-line took me about a minute. Writing it in PowerShell made me “lose” more than an hour (including writing this post).