Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save Dan1el42/88d1c54ab7511f987994 to your computer and use it in GitHub Desktop.

Select an option

Save Dan1el42/88d1c54ab7511f987994 to your computer and use it in GitHub Desktop.
$MpioRegisteredDSM = Get-CimInstance -Namespace ROOT/WMI -Class MPIO_REGISTERED_DSM
$MpioRegisteredDSM.DsmParameters | Where-Object DsmName -eq 'Microsoft DSM' |
ForEach-Object {
$PSItem.DsmCounters.PathVerifyEnabled = 1
Get-CimInstance -Namespace ROOT/WMI -ClassName MPIO_WMI_METHODS |
Invoke-CimMethod -MethodName SetDSMCounters -Arguments @{
DsmContext = $PSItem.DsmContext
DsmCounters = $PSItem.DsmCounters
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment