VMware Solutions Discussions

SM-VI script credentials

mg
NetApp
2,405 Views

Hello,

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=%WRAPPER_WORKING_DIR%\scripts

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:

USERDOMAIN=NALUXLAB

USERNAME=NALUXWINVC01$

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,

Kind regards,

Michel

1 REPLY 1

oldyck
2,405 Views

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

Public