New-WssBackupConfiguration
New-WssBackupConfiguration
Creates a file specification that specifies the files and folders to include in or exclude from a backup.
Sintaxis
Parameter Set: Default
New-WssBackupConfiguration [-FilePath] <String> [-FileName] <String> [-IsDirectory] [-IsExcludeSpec] [ <CommonParameters>]
Descripción detallada
The New-WssBackupConfiguration cmdlet creates a file specification for a backup of a volume. The file specification lists the files and folders to include in or exclude from the backup.
Parámetros
-FileName<String>
Specifies the name of a file to back up. Use * for this parameter to back up all files in the path that the FilePath parameter specifies.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
2 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-FilePath<String>
Specifies the path that contains the files to back up.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
1 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-IsDirectory
Indicates that the file specification refers to a folder.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-IsExcludeSpec
Indicates that the cmdlet excludes the files in the specification from the backup
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿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.
Microsoft.WindowsServerSolutions.DataProtection.ServerBackup.ObjectModel.BackupFileSpec
This cmdlet generates the object that specifies whether files or folders are included or excluded in the server backup.
Ejemplos
Example 1: Create a backup file specification
This command creates a backup file specification that excludes folders in the c:\users path from the backup. It then stores the backup specification in the variable named $Spec.
PS C:\> $Spec = New-WssBackupConfiguration -FilePath "c:\users\" -FileName * -IsDirectory -IsExcludeSpec