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

Project Servers Virtualization

Project Scope: The scope of this project is limited to stabilizing production environment by ensuring…

How to Clone VMWare Virtual Machine using CLI

1. SSH into the ESXi host to perform VM cloning via Command Line Interface (CLI)…

Hyper-V: Clone Linux Guest VM

There are two methods of cloning an existing guest VM: Templating and Copying. Templating has…
Other project: DragonCoin.com