SSIS 2014 – map NFS

We are migrating SSIS from SQL 2008 to SQL2014.

  • Old OS: WINDOWS 2008 R2 SP1
  • New OS: WINDOWS 2012 R2

I use the Execute Process Task to map an NFS share to a drive.

  • Executable: C:\Windows\System32\net.exe
  • Arguments: use Q: :/vol/

When I execute this command in a normal CMD (64bit) then it works.

When I run it from SSIS then it fails with error code “2”.

After some digging I found that when I run the “net use” command from a 32bit CMD or 32bit powershell that it also fails.

So it seems to only work from 64bit.

I have googled and checked SSIS and the flag “Run64BitRuntime” is set to “True”.
Also the “Integration service” is installed on the new machine.

NFS Client is of course also installed.

I can’t find a difference between the package on the old and the package on the new server as we copied the whole project from one server to the other one.

I hope that someone can help me to find a solution.
the “net use” command is not required in the solution.

If there is another maybe better way to access the NFS share then I will try it.


I have found a workaround.

In the SSIS “Execute Process Task”:

  • Executable: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
  • Arguments: C:\path\to\script\CreateMapping.ps1

In the “CreateMapping.ps1”:

& (join-path ($pshome -replace "syswow64", "sysnative") powershell.exe) -Command { net use Q: <IP>:/vol/.... }

What it actually does:

  1. Run the script from SSIS in a powershell enviroment.
  2. Open a new Powershell session but make the new one 64bit
  3. Run the “Net use” command from the 64bit version.

Also I read some other commands to accomplisch the 64bit powershell from a 32bit powershell but this was the only one that worked for me.

Source : Link , Question Author : Boeykes , Answer Author : Boeykes

Leave a Comment