2012-09-24 05:23 AM
I'm working on a script to be run after SMVI backup job. The script itself is a very simple batch file that calls a Powershell script :
set > "%SCRIPTDIR%"\env.txt
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -File "%SCRIPTDIR%"\PS\vfdr-smvi.ps1"
exit /b 0
Now in the PS script, I'm using Ontap Powershell toolkit to perform several actions, and I would like to rely on RPC authentication.
Problem is that the script is run using computer's account instead of the users' credentials I've set in VSC.
Extract from "set" command output:
I've tried using "smvi servercredential set" command but it seems it works only for local users. Should I assume the credentials set in VSC-SMVI are only used when SMVI itself uses ZAPI calls? Should I run SMVI server service under a different account?
Thanking you in advance for your feedback,
2012-09-27 02:25 AM
I ran into a similar credential problem trying to update snapvaults after an SMVI job using a Powershell script.
You can add credentials for filers to the credential cache of the Powershell tookit and make them "system" wide. That way any authenticated user can connect to a filer using powershell.
Not very secure but it gets the job done.
More info: get-help Add-NaCredential -full