Remove-SCStorageFileShare

Removes a storage file share from VMM.

Syntax

Remove-SCStorageFileShare
      [-ForceRemoveFileSystem]
      [-StorageFileShare] <StorageFileShare>
      [-RunAsynchronously]
      [-PROTipID <Guid>]
      [-JobVariable <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-SCStorageFileShare cmdlet removes a storage file share from Virtual Machine Manager (VMM).

Examples

Example 1: Remove a storage file share

PS C:\> $FileShare = Get-SCStorageFileShare -Name "FileShare01"
PS C:\> Remove-SCStorageFileShare -StorageFileShare $FileShare

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

The second command removes FileShare01 from VMM.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-ForceRemoveFileSystem

Indicates that the cmdlet removes the storage file share from the file system and deletes the file system from the pool.

Type:SwitchParameter
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

-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

-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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

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