|
| 1 | +--- |
| 2 | +title: Troubleshoot PowerShell, Hyper-V, Storage, and Cluster Management Issues |
| 3 | +description: Provides a comprehensive guide to troubleshooting common issues in managing Hyper-V, Storage Spaces Direct (S2D), Failover Clustering, and PowerShell tasks in Windows Server 2016, Windows Server 2019, Windows Server 2022, Windows Server 2025, and Windows 10 Enterprise/Education. |
| 4 | +ms.date: 09/08/2025 |
| 5 | +manager: dcscontentpm |
| 6 | +audience: itpro |
| 7 | +ms.topic: troubleshooting |
| 8 | +ms.reviewer: kaushika, jeffhugh, v-lianna |
| 9 | +ms.custom: |
| 10 | +- sap:virtualization and hyper-v\powershell cmdlets |
| 11 | +- pcy:WinComm Storage High Avail |
| 12 | +ai-usage: ai-assisted |
| 13 | +--- |
| 14 | +# Troubleshoot PowerShell, Hyper-V, storage, and cluster management issues in Windows Server |
| 15 | + |
| 16 | +This article provides a comprehensive guide to troubleshooting common issues encountered in managing Hyper-V, Storage Spaces Direct (S2D), Failover Clustering, and PowerShell tasks in Windows Server 2016, Windows Server 2019, Windows Server 2022, Windows Server 2025, and Windows 10 Enterprise/Education. These issues often impact virtual machine operations, storage management, cluster communication, and automation, resulting in failures like VHD/VSS corruption and PowerShell cmdlet errors. This guide offers detailed solutions and diagnostic methodologies to resolve these challenges. |
| 17 | + |
| 18 | +You might experience the following issues: |
| 19 | + |
| 20 | +## Hyper-V/Virtualization issues |
| 21 | + |
| 22 | +- Virtual machine (VM) import or migration failures without explicit error messages. |
| 23 | +- Unbootable VMs after tasks such as Optimize-VHD, with error code 0x80070570: |
| 24 | + |
| 25 | + > The file or directory is corrupted and unreadable. |
| 26 | +- Problems enabling processor compatibility or Promiscuous Mode via PowerShell. |
| 27 | +- Concerns with VM live migration between cluster nodes with different CPU models. |
| 28 | +- Failures in generating inventory or storage usage reports via PowerShell. |
| 29 | +- Unexpected host reboots (blue screen of death) after applying configuration scripts. |
| 30 | +- PowerShell cmdlets errors, such as: |
| 31 | + |
| 32 | + - > The property MonitorMode cannot be found on this object. Verify that the property exists and can be set. |
| 33 | + - > connect-VIServer: Failed to connect: Could not load file or assembly VMware.Vim, Version=8.3.0.399... |
| 34 | +
|
| 35 | +## Storage/S2D issues |
| 36 | + |
| 37 | +- `Get-PhysicalDisk` and `Get-VirtualDisk` return no output or incorrect data from some cluster nodes. |
| 38 | +- Disks appear as "unknown" or detached in PowerShell but show as healthy in Failover Cluster Manager. |
| 39 | +- Files in App-V packages display as **offline** or reparse points, and applications fail to launch. |
| 40 | +- Volume Shadow Copy Service (VSS) commands, such as `vssadmin list writers`, return empty or missing writer lists. |
| 41 | + |
| 42 | +## Cluster/Permissions issues |
| 43 | + |
| 44 | +- Scheduled tasks running PowerShell scripts with `Get-Cluster*` cmdlets fail on passive nodes with errors like: |
| 45 | + |
| 46 | + > Get-Cluster: You do not have administrative privileges on the cluster. Access is denied. |
| 47 | +- Intermittent restoration of permissions after toggling settings or restarting services. |
| 48 | + |
| 49 | +## General/Reporting issues |
| 50 | + |
| 51 | +- Inability to enumerate disks, storage usage, or generate inventory reports via PowerShell. |
| 52 | +- Issues connecting to Azure subscriptions using PowerShell. |
| 53 | +- Need for guidance on adding registry keys or configuring storage/high availability on Windows 10 or Windows 11. |
| 54 | + |
| 55 | +The root causes of these issues can be categorized as follows: |
| 56 | + |
| 57 | +## Cause 1: Configuration or knowledge gaps |
| 58 | + |
| 59 | +- Incorrect or incomplete PowerShell cmdlet syntax. |
| 60 | +- Limited understanding of retrieving storage or VM information using built-in tools. |
| 61 | +- Misunderstanding CPU compatibility requirements for VM migration across different hardware. |
| 62 | + |
| 63 | +## Cause 2: Permission/Context issues |
| 64 | + |
| 65 | +- Scheduled tasks or PowerShell scripts running as the SYSTEM account lack cluster permissions, especially on passive nodes. |
| 66 | +- User Account Control (UAC) or Group Policy restrictions limit execution contexts. |
| 67 | +- Insufficient privileges assigned to service accounts for cluster or storage cmdlets. |
| 68 | + |
| 69 | +## Cause 3: Software/Driver bugs |
| 70 | + |
| 71 | +- Bugs introduced by Windows Server updates (for example, the May 2025 update caused VHD corruption due to a **vhdmp.sys** issue). |
| 72 | +- Defects in S2D or Failover Cluster PowerShell modules leading to inconsistent disk or virtual disk information. |
| 73 | +- Failures to update file attributes or remove reparse points during App-V package operations. |
| 74 | + |
| 75 | +## Cause 4: Environmental or third-party interference |
| 76 | + |
| 77 | +- Security or antivirus software interfering with VSS writers or file system operations. |
| 78 | +- Dependencies or feature blocks caused by third-party tools (such as VMware PowerCLI, Zscaler, or Crowdstrike). |
| 79 | +- Non-persistent disks, nondomain joined systems, or unsupported server versions. |
| 80 | + |
| 81 | +## Cause 5: Unsupported scenarios |
| 82 | + |
| 83 | +- Running commands on unsupported Windows Server versions or using scripts designed for other platforms (for example, VMware cmdlets on Hyper-V). |
| 84 | +- Attempting advanced configuration changes (such as NIC/SR-IOV or registry tweaks) without proper testing. |
| 85 | + |
| 86 | +Follow these step-by-step solutions to address the described issues. |
| 87 | + |
| 88 | +## Resolution for PowerShell cmdlet and reporting issues |
| 89 | + |
| 90 | +1. Validate cmdlet syntax: |
| 91 | + |
| 92 | + - Always verify PowerShell cmdlet syntax using official Microsoft documentation. |
| 93 | + - Examples for disk and storage usage: |
| 94 | + |
| 95 | + On Hyper-V host: |
| 96 | + |
| 97 | + ```powershell |
| 98 | + Get-Volume | Select-Object DriveLetter, Size, SizeRemaining |
| 99 | + ``` |
| 100 | +
|
| 101 | + Within a VM: |
| 102 | +
|
| 103 | + ```powershell |
| 104 | + Get-Volume | Select-Object -Property DriveLetter, Size, SizeRemaining |
| 105 | + ``` |
| 106 | +
|
| 107 | + - Export inventory: |
| 108 | +
|
| 109 | + ```powershell |
| 110 | + Get-VM | Select-Object -Property * | Export-Csv -Path "C:\VMInventory.csv" -NoTypeInformation |
| 111 | + ``` |
| 112 | +
|
| 113 | +2. Enable VM processor compatibility: |
| 114 | +
|
| 115 | + ```powershell |
| 116 | + Set-VMProcessor -VMName <VMName> -CompatibilityForMigrationEnabled $true |
| 117 | + Set-VMProcessor -VMName <VMName> -CompatibilityForOlderOperatingSystemsEnabled $true |
| 118 | + Get-VMProcessor -VMName <VMName> # Confirm settings |
| 119 | + ``` |
| 120 | +
|
| 121 | +3. Promiscuous mode/Monitor mode: |
| 122 | +
|
| 123 | + - Use correct property names (for example, AllowPacketDirect instead of MonitorMode for Hyper-V vSwitches). |
| 124 | + - Cross-check third-party documentation with official Microsoft sources. |
| 125 | +
|
| 126 | +4. Azure PowerShell authentication: |
| 127 | +
|
| 128 | + ```powershell |
| 129 | + Install-Module Az -Scope CurrentUser |
| 130 | + Import-Module Az |
| 131 | + Connect-AzAccount |
| 132 | + Set-AzContext -Subscription "<subscription-name-or-id>" |
| 133 | + ``` |
| 134 | +
|
| 135 | +5. Resolve VMware PowerCLI errors. |
| 136 | +
|
| 137 | + Ensure PowerCLI is installed from the official source and check VMware support for missing assembly issues. |
| 138 | +
|
| 139 | +## Resolution for cluster and permission issues |
| 140 | +
|
| 141 | +1. Resolve access denied errors: |
| 142 | +
|
| 143 | + - Use a domain service account with appropriate permissions for cluster management scripts. |
| 144 | + - If using SYSTEM, toggle permissions in Failover Cluster Manager: |
| 145 | + - Remove and re-add SYSTEM account with "Allow" permissions. |
| 146 | + - Restart cluster-related services. |
| 147 | +2. Fix storage cmdlet failures: |
| 148 | +
|
| 149 | + - Reboot all cluster nodes to reset states and clear inconsistencies. |
| 150 | + - Collect diagnostic logs: |
| 151 | +
|
| 152 | + ```powershell |
| 153 | + Get-SddcDiagnosticInfo -Path |
| 154 | + ``` |
| 155 | +
|
| 156 | +## Resolution for storage, file system, and VHD issues |
| 157 | +
|
| 158 | +1. VHD corruption: |
| 159 | +
|
| 160 | + - Install the June 2025 cumulative update to fix the **vhdmp.sys** bug. |
| 161 | + - Disable scheduled `Optimize-VHD` tasks until updates are applied. |
| 162 | + - Review installed updates: |
| 163 | +
|
| 164 | + ```powershell |
| 165 | + Get-HotFix | Sort-Object InstalledOn -Descending |
| 166 | + ``` |
| 167 | +
|
| 168 | +2. App-V Package File Issues: |
| 169 | +
|
| 170 | + - Analyze file attributes: |
| 171 | +
|
| 172 | + ```powershell |
| 173 | + Get-ChildItem -Path <package-path> -Recurse | Select-Object FullName, Attributes |
| 174 | + ``` |
| 175 | +
|
| 176 | + - Disable third-party software causing interference. |
| 177 | +
|
| 178 | +3. Resolve missing VSS writers by restarting the VSS service: |
| 179 | +
|
| 180 | + ```powershell |
| 181 | + Restart-Service -Name VSS |
| 182 | + ``` |
| 183 | + |
| 184 | +## Resolution for general configuration/registry/high availability issues |
| 185 | + |
| 186 | +1. Add registry keys: |
| 187 | + |
| 188 | + ```powershell |
| 189 | + Set-ItemProperty -Path "HKLM:\Software\<Path>" -Name "<Key>" -Value "<Value>" |
| 190 | + ``` |
| 191 | + |
| 192 | +2. Handle cluster nodes with different CPUs. |
| 193 | + |
| 194 | + Enable CPU compatibility for VMs during migration: VM **Settings** > **Processor** > **Migrate to a physical computer with a different processor version**. |
| 195 | + |
| 196 | +3. Avoid advanced configuration risks: |
| 197 | + |
| 198 | + - Test advanced NIC properties (such as SR-IOV) thoroughly before deployment. |
| 199 | + - Use modern browsers instead of disabling Internet Explorer Enhanced Security. |
| 200 | + |
| 201 | +## Data collection |
| 202 | + |
| 203 | +Gather the following data if further assistance is needed: |
| 204 | + |
| 205 | +- PowerShell outputs (for example, `Get-Volume`, `Get-VM`, or `Get-PhysicalDisk`). |
| 206 | +- Diagnostics from the TSS tool. |
| 207 | +- Logs using `Get-SddcDiagnosticInfo`. |
| 208 | +- VSS status with `vssadmin list writers`. |
| 209 | +- Installed hotfixes using `Get-HotFix`. |
| 210 | + |
| 211 | +For more information, see the official Microsoft documentation for Hyper-V, S2D, PowerShell, and Failover Clustering. Always ensure your environment is fully patched and your configuration is tested in a nonproduction environment before making substantial changes. |
0 commit comments