Share via


Unregister-SCStorageFileShare

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

Syntax

UnregisterFromHost (Default)

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

UnregisterFromLibrary

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

UnregisterFromCluster

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.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-JobVariable

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LibraryServer

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

Parameter properties

Type:LibraryServer
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

UnregisterFromLibrary
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RemovePermissionsFromShare

Indicates that permissions are removed from the file share.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RunAsynchronously

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-StorageFileShare

Specifies a storage file share.

Parameter properties

Type:StorageFileShare
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:Host
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

UnregisterFromHost
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMHostCluster

Specifies a VMM host cluster object.

Parameter properties

Type:HostCluster
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

UnregisterFromCluster
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.