New-WssBackupConfiguration
New-WssBackupConfiguration
Creates a file specification that specifies the files and folders to include in or exclude from a backup.
Syntax
Parameter Set: Default
New-WssBackupConfiguration [-FilePath] <String> [-FileName] <String> [-IsDirectory] [-IsExcludeSpec] [ <CommonParameters>]
Detailed Description
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.
Parameters
-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.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-FilePath<String>
Specifies the path that contains the files to back up.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-IsDirectory
Indicates that the file specification refers to a folder.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-IsExcludeSpec
Indicates that the cmdlet excludes the files in the specification from the backup
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
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