VMware Solutions Discussions

SM-VI script credentials

mg
NetApp

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

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

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public