Unregister-SCStorageFileShare

Unregisters a storage file share from a VM host, cluster, or library server.

Syntax

Unregister-SCStorageFileShare
          [-StorageFileShare] <StorageFileShare>
          -VMHost <Host>
          [-RemovePermissionsFromShare]
          [-JobGroup <Guid>]
          [-RunAsynchronously]
          [-PROTipID <Guid>]
          [-JobVariable <String>]
          [<CommonParameters>]
Unregister-SCStorageFileShare
          [-StorageFileShare] <StorageFileShare>
          -LibraryServer <LibraryServer>
          [-RemovePermissionsFromShare]
          [-JobGroup <Guid>]
          [-RunAsynchronously]
          [-PROTipID <Guid>]
          [-JobVariable <String>]
          [<CommonParameters>]
Unregister-SCStorageFileShare
          [-StorageFileShare] <StorageFileShare>
          -VMHostCluster <HostCluster>
          [-RemovePermissionsFromShare]
          [-JobGroup <Guid>]
          [-RunAsynchronously]
          [-PROTipID <Guid>]
          [-JobVariable <String>]
          [<CommonParameters>]

Description

The Unregister-SCStorageFileShare cmdlet unregisters a storage file share from a virtual machine host, cluster, or library server.

Examples

Example 1: Unregister a storage file share from a library server

PS C:\> $FileShare = Get-SCStorageFileShare -Name "FileShare01" 
PS C:\> $LibServer = Get-SCLibraryServer -ComputerName "LibraryServer01.Contoso.com"
PS C:\> Unregister-SCStorageFileShare -StorageFileShare $FileShare -LibraryServer $LibServer

The first command gets the storage file share object named FileShare01 and stores the object in the $FileShare variable.

The second command gets the VMM library server object named LibraryServer01 and stores the object in the $LibServer variable.

The last command unregisters FileShare01 from LibraryServer01.

Parameters

-JobGroup

Specifies an identifier for a series of commands that run as a set just before the final command that includes the same job group identifier runs.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LibraryServer

Specifies a Virtual Machine Manager (VMM) library server object.

Type:LibraryServer
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RemovePermissionsFromShare

Indicates that permissions are removed from the file share.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-StorageFileShare

Specifies a storage file share.

Type:StorageFileShare
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-VMHost

Specifies a virtual machine host object. VMM supports Hyper-V hosts, VMware ESX hosts, and Citrix XenServer hosts.

For more information about each type of host, see the Add-SCVMHost cmdlet.

Type:Host
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VMHostCluster

Specifies a VMM host cluster object.

Type:HostCluster
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False