I am recently learning powershell scripting, how can I write scripts to successfully access adv permissions, I tried to pass y after set adv, but it didn't work, I don't know how to solve this problem, hope someone can help modify my script my script # Set connection information $ONTAPHost = Read-Host "Enter the IP address of the ONTAP cluster" $User = Read-Host "Enter username" $Password = Read-Host "Enter password" $OutputFile = "commands_output.txt" # Output file path # Import Posh-SSH module from removable drive, need to change the drive letter Import-Module F:\Posh-SSH # Create an SSH session and pass credentials $securePassword = $Password | ConvertTo-SecureString -AsPlainText -Force $credential = New-Object System.Management.Automation.PSCredential($User, $securePassword) # Define command array $commands = @( "cluster show", "set adv", "system node image show" ) # Try to connect to the ONTAP cluster try { # Creating an SSH Session $session = New-SSHSession -ComputerName $ONTAPHost -Credential $credential -ErrorAction Stop Write-Host "SSH session established successfully." # If the file already exists, clear the file contents if (Test-Path $OutputFile) { Clear-Content -Path $OutputFile } # Loop through the array of commands and execute them in turn foreach ($command in $commands) { Write-Host "`nExecuting command: $command" try { # Execute the current command and get the result $result = Invoke-SSHCommand -SessionId $session.SessionId -Command $command -ErrorAction Stop # Record the command execution to a file Add-Content -Path $OutputFile -Value "`n::> $command" # Output the result of the command if ($result.Output) { $result.Output -split "`n" | ForEach-Object { Add-Content -Path $OutputFile -Value $_ } } else { Add-Content -Path $OutputFile -Value "No output received for '$command'." } } catch { Write-Host "Error executing command: $command" Add-Content -Path $OutputFile -Value "Error executing command: $command - $_" } } } catch { Write-Host "Failed to establish SSH session or execute command: $_" Add-Content -Path $OutputFile -Value "Failed to establish SSH session or execute command: $_" exit } finally { # Make sure to close the SSH session at the end of the script if ($session) { Remove-SSHSession -SessionId $session.SessionId Write-Host "SSH session closed." } } outputfile ::> cluster show Last login time: 11/25/2024 16:21:20 Node Health Eligibility --------------------- ------- ------------ FAS2720-01 true true FAS2720-02 true true 2 entries were displayed. ::> set adv Last login time: 11/25/2024 16:22:14 ::> system node image show Last login time: 11/25/2024 16:22:14 Error: "image" is not a recognized command
... View more
Could someone point me to a document that clear states mixed stack limits? I know that pure SSD stack is restricted to 4 shelves, but at least one document claims 6 shelves in mixed stack (it is internal document so I'm happy to discuss it offline if appropriate). HWU shows limits for SAS/SATA/SSD separately, but again is silent about mixed usage.
I would say HWU should explicitly describe limits in this case.
... View more
Is it possible to do a manual OnTAP upgrade from 8.2.4P3 to OnTAP 9.1, or does the upgrade need to be done in phases? And where would I find documentation for performing the manual upgrade process, to make sure I don't s
... View more
I am looking to retrieve and update snapmirror Load Sharing Mirror relationships using ONTAP REST APIs, please advise if there is a way, thanks.
... View more
Hello all, I'm performing some test in my lab storage. I wanted to create "orphan" disks and try to found a way to recover the fail aggregate. I have been able to got orphaned disk but don't found how to recover. If someone has a lead or any clue, it will be much appreciate. Aggregate aggr_test_orphan (failed, raid_dp, partial) (block checksums) Plex /aggr_test_orphan/plex0 (offline, failed, inactive) RAID group /aggr_test_orphan/plex0/rg0 (partial, block checksums) RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks) --------- ------ ------------- ---- ---- ---- ----- -------------- -------------- dparity FAILED N/A 560000/ - parity 4a.125L57 4a 11 4 FC:B 0 SAS 15000 560000/1146880000 560879/1148681096 data FAILED N/A 560000/ - data 4a.125L60 4a 11 7 FC:B 0 SAS 15000 560000/1146880000 560879/1148681096 data FAILED N/A 560000/ - data 4a.125L63 4a 11 10 FC:B 0 SAS 15000 560000/1146880000 560879/1148681096 data 4a.125L64 4a 11 11 FC:B 0 SAS 15000 560000/1146880000 560879/1148681096 data 4a.125L53 4a 11 0 FC:B 0 SAS 15000 560000/1146880000 560879/1148681096 Raid group is missing 3 disks. Unassimilated aggr_test_orphan disks RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks) --------- ------ ------------- ---- ---- ---- ----- -------------- -------------- orphaned 4a.125L62 4a 11 9 FC:B 0 SAS 15000 560000/1146880000 560879/1148681096 NetApp Release 8.2.5P5 7-Mode Thank you
... View more