Posted On July 23, 2020

Hyper-V: De-register Storage File Share and/or Removing Paths from VMM

kimconnect 0 comments
blog.KimConnect.com >> Virtualization >> Hyper-V: De-register Storage File Share and/or Removing Paths from VMM
# vmmDeregisterFileSharePath.ps1

$pathSearch='\\DECOMMISSIONED-FILESHARE008'
$unregister=$true
$remove=$false

$fileShares=Get-SCStorageFileShare|?{$_.SharePath -like "*$pathSearch*"}
$thisLibraryServer = Get-SCLibraryServer
if($unregister){$fileShares|%{Unregister-SCStorageFileShare -StorageFileShare $_ -LibraryServer $thisLibraryServer}}
if($remove){$fileShares|%{Remove-SCStorageFileShare -StorageFileShare $_}}

# Un-resolvable errors due to certain decommed dependencies being unavailable for VMM to make changes
# Unregister-SCStorageFileShare : The file share is not associated to (Error ID: 26187)
# Remove-SCStorageFileShare : The file share could not be removed because it is not currently managed by VMM. (Error ID: 26240)

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Hyper-V Guest VM CPU Compatibility Feature Down Side

Symptom: guest VM could not install applications that require'SSE4.2 and POPCNT instruction sets' Cause: The…

VMware: How To Mount a USB Thumb Drive as a Data Store

Although USB is not a recommended data store type, it is still possible to mount…

Hyper-V: Creating a New Virtual Machine

# Compulsory variables $hyperVHost='HYPERV007' $vmName='WindowsGoldenImage' $parentDirectory='C:\ClusterStorage\Volume5' $disk1Size='100GB' $memoryAllocation='8GB' $networkSwitch='PublicZone' $vlan='1005' $clusterName='DEV-CLUSTER05' # Optional variables $disk2Size=$false…