In ONTAP Cli ,
we can use diag account to perform the system shell command,
If the powershell can do that?
how to perform the system shell command by powershell tool kit?
Thanks
Hi Allen,
Here is an example:
[Array]$command = @("set diag;volume", "show", "-fields", "tiering-minimum-cooling-days") Try{ $api = $("<system-cli><args><arg>" + ($command -join "</arg><arg>") + "</arg></args></system-cli>") Write-Host $("Executed Command`: " + $([String]::Join(" ", $command))) $response = Invoke-NcSystemApi -Request $api -ErrorAction Stop }Catch{ Write-Warning -Message $("Failed Executing Command`: " + $([String]::Join(" ", $command)) Break; } $response.results."cli-output"
Hope that helps
/Matt