Remove-FsrmMgmtProperty
Remove-FsrmMgmtProperty
Removes a management property.
Sintaxis
Parameter Set: DeleteMgmtProperty2
Remove-FsrmMgmtProperty [-Name] <String> [-AsJob] [-CimSession <CimSession[]> ] [-Namespace <String> ] [-Recurse] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Descripción detallada
The Remove-FsrmMgmtProperty cmdlet removes a management property from a namespace. A management property is a classification property that includes Folder in its AppliesTo property and whose Flags property does not include the Secure value. You can use the Get-FsrmClassificationPropertyDefinition cmdlet to get definitions of classification properties.
Parámetros
-AsJob
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-CimSession<CimSession[]>
Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.
Alias |
Session |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Name<String>
Specifies the name of a management property. Specify the value of the Name property in a FsrmClassificationPropertyDefinition object.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
2 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
true |
-Namespace<String>
Specifies a local path to a folder.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-Recurse
Indicates that this cmdlet removes management properties for all folders that contain management properties in the namespace. If you specify this parameter, you must specify the Namespace parameter.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-ThrottleLimit<Int32>
Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0
, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Confirm
Solicita confirmación antes de ejecutar el cmdlet.
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
falso |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-WhatIf
Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
falso |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
<CommonParameters>
Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entradas
El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
Ejemplos
Example 1: Remove all management properties
This command removes all management properties from the server that have the value FolderUsage_MS.
PS C:\> Remove-FsrmMgmtProperty -Name "FolderUsage_MS"
Example 2: Remove a management property by using a namespace
This command removes all management properties from the namespace C:\Shares that have the value FolderUsage_MS.
PS C:\> Remove-FsrmMgmtProperty -Name "FolderUsage_MS" -Namespace "C:\Shares"
Example 3: Remove all management property in a namespace hierarchy
This command removes all management properties that have the value FolderUsage_MS from the namespace C:\Shares and any namespaces below it in the hierarchy.
PS C:\> Remove-FsrmMgmtProperty -Name "FolderUsage_MS" -Namespace "C:\Shares" -Recurse
Example 4: Remove all management properties in a namespace hierarchy
This example removes all management properties from namespaces that do not exist on the server. Property definitions are removed from a server by an administrator or as a result of group policy updates. When you remove a property definition, the management property values that the server sets on folders by using the property definition are obsolete.
The first command gets all management properties on the server and stores the results in the $props variable.
PS C:\> $props = Get-FsrmMgmtProperty
The second command is a script that identifies management properties where the property applied on folders dos not exist anymore. The script uses the Remove-FsrmMgmtProperty cmdlet to remove the management properties for which there is no corresponding property definition on the server.
PS C:\> $nonExistingProperties = $props | where { $_.Exists –ne $true}
foreach ($candidate in $nonExistingProperties)
{foreach ($prop in $_.Properties) {Remove-FsrmMgmtProperty -Name $prop.Name -Namespace $candidate.Namespace}}