Attempting to script a remote shutdown of an SCv3020 running 7.3+. I believe I need Dell EMC Storage Manager Data Collector running, load the Powershell module, and initiate the command. I checked Powershell SDK cookbook and see no mention of shutdown command.
Once you run the shut down command it will shut the system off in less than 20 seconds. I would suggest to run this from a physical server for this reason. There is no way to run the command and have it wait for 240 seconds.
I had previously answered this in the post you mentioned. I had scripted this in DELL STORAGE POWERSHELL API, and verified the commands. Here it shows the output of the get-help NAME Stop-DellStorageCenter SYNOPSIS Shuts down the Storage Center -Warning- This method may modify data on your system. SYNTAX Stop-DellStorageCenter -Instance -Connection [ ] ----- StorageCenterShutdown ----- Stop-DellStorageCenter -Connection $conn -Instance $instance
REMARKS To see the examples, type: "get-help Stop-DellStorageCenter -examples". For more information, type: "get-help Stop-DellStorageCenter -detailed". For technical information, type: "get-help Stop-DellStorageCenter -full".
NAME Stop-DellScController SYNOPSIS Shuts down the controller -Warning- This method may modify data on your system. SYNTAX Stop-DellScController -Instance -Connection [ ] ----- ScControllerShutdown ----- Stop-DellScController -Connection $conn -Instance $instance REMARKS To see the examples, type: "get-help Stop-DellScController -examples". For more information, type: "get-help Stop-DellScController -detailed". For technical information, type: "get-help Stop-DellScController -full".
This is great thanks. Is it possible to pipe the Sleep command into the SCv3020? So send the command with Sleep. This way I can run it from a virtual machine and then initiate the final VM shutdown after sending the delayed shutdown to the SC. Let me know thanks.
A very simple script to perform this shut down. Import-Module "{Install Path}\DellStorage.ApiCommandSet.psd1 # you need to import the module every time the script is run $user = "Admin" # user name for data collector $em = "172.18.144.18" # IP for data collector $pass = ConvertTo-SecureString "Compellent04" -AsPlainText -Force #password for data collector $conn = Connect-DellApiConnection -HostName $em -User $user -password $pass #connection to SC $chassis = 61038 #SSN of system Start-Sleep -s 240 #sleep command for 240 seconds Stop-DellStorageCenter -Instance $chassis -Connection $conn -Confirm:$false #shuts down BOTH controllers
OR, you can put the start-sleep command after the stop command. Please make certain that by running this from a Virtual Machine that the VM does not crash when the storage center is shut down. Please note: Each script will have to be customized, and its required functionality should be well understood and tested prior to deploying in a production environment.
Thanks! I have the Data Collector installed and configured, the Dell API powershell command set loaded and am able to connect to the DC and send commands.
You indicated :
Please make certain that by running this from a Virtual Machine that the VM does not crash when the storage center is shut down.
This is why I need the delay. The problem is that I don't want to run the Data Collector from a physical Host - it has memory / resource overhead. Can I pipe the Start-Sleep command, or send a function/script to run to the DC? Basically - I want to send the command from the Virtual Machine - Stop-DellStorageCenter, then complete the Virtual Machine, and cluster shutdown prior to the SCv3020 initiating its shutdown on delay. Is this possible? Thanks!
I will move this 1 VM to local storage then, so it is not reliant on the SAN to stay up. I think this is all I need to get the auto-shutdown working. Would be great to have a feature request for a delay with that stop command. Thank you!
If you do not include the -Confirm option the script will create a pop-up (when using PowerShell ISE) and wait for you to confirm that you want to shut down the controller.
DELL-Bob Mi
2 Intern
•
230 Posts
6685
0
Posted February 6th, 2019 10:00
Once you run the shut down command it will shut the system off in less than 20 seconds. I would suggest to run this from a physical server for this reason. There is no way to run the command and have it wait for 240 seconds.