Showing results for 
Search instead for 
Did you mean: 
Nintex Newbie

Invoke-command NWAdmin.exe -o detachdatabase error

I'm trying to give my SQL server administrators the ability to detach and attach a database through a powershell script. Since they do the backups on the SQL server I want them to be able to run a local script that will execute NWAdmin.exe on the remote SharePoint Application server. I'm trying to pass the content database name and the computer name as parameters.I execute the script and get an error:

PS C:\> .\Scripts\DetachNintexContentDB.ps1 -contentDatabase 'wf_content_sales' -computername'
Command line execution error: System.NullReferenceException: Object reference not set to an instance of an object.
   at Nintex.Workflow.Administration.ConfigurationDatabase.ReadConfigValue()

I've replaced the parameter variable in the script with the actual database name and get the same error. Is there a particular reason the command cannot find the database when being executed remotely with Invoke-command?

Labels: (2)
0 Kudos