PowerShell: Setting all offline disks online with single command
In Exchange, if you have created a large number of disks to cater for your DAG or multiple DAG's, setting them online one by one can be a very time consuming job.
With PowerShell you can set all the offline disks online and then create your mount points but we will look at the first option.
http://everything-powershell.com/wp-content/uploads/2019/01/offline1.png
Here is the command to run:
- Get-Disk | Where-Object IsOffline -Eq $True | Set-Disk -IsOffline $False
http://everything-powershell.com/wp-content/uploads/2019/01/offline2.png
Now if you go back to disk management all should be online, in this example we only used 1 disk:
http://everything-powershell.com/wp-content/uploads/2019/01/Offline3.png