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

How To Use Putty with an AWS Private Key

Step 1: convert .PEM file into a .PPK format Run puttygen.exe Click on Load Navigate…

Some AWS Quick Notes

https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.htmlOpen Virtual Appliance (OVA) image format, which is compatible with VMware vSphere versions 4 and…

PowerShell: Gather All Guess VM of All Hyper-V Clusters in the Domain

# getAllVms.ps1 $clusterName='*' function includeRSAT{ $ErrorActionPreference='stop' [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 #$rsatWindows7x32='https://download.microsoft.com/download/4/F/7/4F71806A-1C56-4EF2-9B4F-9870C4CFD2EE/Windows6.1-KB958830-x86-RefreshPkg.msu' $rsatWindows7x64='https://download.microsoft.com/download/4/F/7/4F71806A-1C56-4EF2-9B4F-9870C4CFD2EE/Windows6.1-KB958830-x64-RefreshPkg.msu' $rsatWindows81='https://download.microsoft.com/download/1/8/E/18EA4843-C596-4542-9236-DE46F780806E/Windows8.1-KB2693643-x64.msu' $rsat1709 = "https://download.microsoft.com/download/1/D/8/1D8B5022-5477-4B9A-8104-6A71FF9D98AB/WindowsTH-RSAT_WS_1709-x64.msu"…