Running sql server in srm. The server is running sql 2012 on top of Windows 2012 R2 core. Powercli is loaded after the requirements for it have been loaded. The Z drive contains the tempdb and other folders and will not be replicated to save bandwidth. I have recovery sql server to the remote site, with the z drive non-replicated and detached. At the remote site, everything comes up and the server does not have the z drive. I copy a version of the z drive into the same folder, to be re-attached after the recovery. Running on srm server, post power on, I run:
C:\windows\syswow64\windowspowershell\v1.0\powershell.exe -file c:\scripts\addvmdk.ps1
The addvmdk.ps1 file is:
add-pssnapin VMware.VimAutomation.Core
Connect-VIServer -Server ccf-vc01.isac.org -WarningAction SilentlyContinue
New-HardDisk -vm Dfld-DRTest -Persistent IndependentPersistent -DiskPath "[ESXi-PRD1] Dfld-DRTest(4)/Dfld-DRTest_3.vmdk"
Running this at the command prompt live, I get the drive reattached as drive Z, with no errors. However, when ran as part of the recovery process, I get:
Error - The command 'c:\windows\syswow64\windowspowershell\v1.0\powershell.exe' returned a non-zero value: -196608
The account I am running under has full rights within vm. Any idea where I went wrong?
Tim Orosz
Illinois Student Assistance Commission