How to mount/unmount disk and take offline/online disk using PowerShell safely on SQL server/cluster nodes.

Anonymous
2024-02-08T21:42:19+00:00

Hi,

I have project to take backup disk offline on 100+ SQL server/cluster nodes. These backup disks are mount disk.

Looking for good PowerShell script to or commands to unmount/mount and take disk offline/online.

Thanks.

Windows for business | Windows Server | Storage high availability | Clustering and high availability

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-02-09T03:10:27+00:00

    Hi,

    If it's a physical disk, the Set-Disk cmdlet can take disks offline for you.

    Set-Disk -Number <Disk Number> -IsOffline $True

    If it's a CSV, you can use Remove-ClusterSharedVolume to remove the volume.

    Remove-ClusterSharedVolume -Name <Cluster Disk Name>

    Please refer to the links below for more details

    Set-Disk (Storage) | Microsoft Learn

    Remove-ClusterSharedVolume (FailoverClusters) | Microsoft Learn

    1 person found this answer helpful.
    0 comments No comments