I've written a data update script that works really well, it deletes a target feature class and uses the feature class to feature class geoprocessing tool to copy data from SQL 2012 into it's predecessors location.

The script works when run via python shell or scheduled via cmd. However our preferred workflow tool uses powershell 2012 (remotely). Invoking-command in powershell for our ArcPy script errors in several places.My main concern is the feature class to feature class tool:

ERROR 000732: Input Features: Dataset \bacon.sde\tasty_Prod.dbo\v_cheese does not exist or is not supported Failed to execute (FeatureClassToFeatureClass).

Why would the feature class to feature class tool work via python shell and cmd and not via powershell?

PowerShell Example

The same script uses table to table (updating tables) and it works in powershell.. only things that have geometry have issues..

  • 2
    This might be better addressed on StackOverflow, it doesn't sound like an arcpy problem.. Be sure the database connection files exist for the user credentials that's executing the power shell remotely, it might be a missing connection file or a permission problem. Commented May 12, 2016 at 5:01
  • 1
    Is your connection to the database using Windows authentication? Commented May 14, 2016 at 20:51

1 Answer 1


This is a double hop problem. In other words, a client machine is executing a script from a remote server. Received guidance on this from the following link.

The following command should be executed on the remote server:


Enable-WSManCredSSP -Role Server

The following commands should be executed on the local client:

set-item wsman:localhost\client\trustedhosts -value *
Enable-WSManCredSSP -Role Client –DelegateComputer *

Use gpedit.msc to enable Delegating Fresh Credentials to WSMAN/*:

  1. Expand Local Computer Policy, expand Computer Configuration, expand Administrative Templates, expand System, and then click Credential Delegation.
  2. In the Settings pane, double-click Allow Delegating Fresh Credentials with NTLM-only Server Authentication.
  3. In the Allow Delegating Fresh Credentials with NTLM-only Server Authentication dialog box, do the following:

    • Click Enabled.
    • In the Options area, click Show.
    • In Value, type WSMAN/* and then click OK. Make sure that concatenate OS defaults with input above is selected, and then click OK.

After setting up Secure Service Provider credentials, in order to use this within an automated job a credential object will need to be created. Follow the instructions in this post to learn how to do that: https://blogs.msdn.microsoft.com/koteshb/2010/02/12/powershell-how-to-create-a-pscredential-object/

Your command should be constructed like this:

icm -ComputerName $dev_app_svr -FilePath "$gisdb\Weekly\Weekly_DBTasks_1.0.ps1" -Authentication CredSSP -Credential $svrcreds

The powershell script Weekly_DBTasks_1.0.ps1 will then reference your python script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.