Enables an Analysis Services system administrator to back up a multidimensional or tabular database to a backup file. If you do not specify a location, the default backup location that was specified during setup is used.

Files that you back up can be encrypted. Use –FilePassword to encrypt the file. When restoring the file later, you must provide the same password that you specified to encrypt it.

This cmdlet supports the –Credential parameter, which can be used if you configured the Analysis Services instance for HTTP access. The –Credential parameter takes a PSCredential object that provides a Windows user identity. IIS will then impersonate this user when connecting to Analysis Services. The identity must have system administrator permissions on the Analysis Services instance to perform the backup.

-BackupFile <string>

Specifies the path and name of the backup file. If you specify just a file name without a path, the default backup location will be used. This parameter is only used with the –Name parameter.

Required?

true

Position?

0

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

-Name <string>

Specifies the Analysis Services database to be backed up. You can specify a database using either the –Database parameter or the –Name parameter if you want to pass in the name as a string.

Required?

true

Position?

1

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

-AllowOverwrite <SwitchParameter>

Overwrites a backup file of the same name.

Required?

false

Position?

named

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

-BackupRemotePartitions <SwitchParameter>

Specifies whether remote partitions will be included in the backup.

Required?

false

Position?

named

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

-ApplyCompression<SwitchParameter>

Specifies whether to compress the backup file.

Required?

false

Position?

named

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

-FilePassword <SecureString>

Specifies a password to be used with backup file encryption.

Required?

false

Position?

named

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

-Locations <Microsoft.AnalysisServices.BackupLocation[]>

Specifies the location where the backup file will be stored.

Required?

false

Position?

named

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

-Server <string>

Specifies the Analysis Services instance to which the cmdlet will connect and execute. If no server name is provided, a connection will be made to localhost. For default instances, specify just the server name. For named instances, use the format servername\instancename. For HTTP connections, use the format http[s]://server[:port]/virtualdirectory/msmdpump.dll.

Required?

false

Position?

named

Default value

localhost

Accept pipeline input?

false

Accept wildcard characters?

false

-Credential <PSCredential>

Specifies a PSCredential object that provides a Windows user name and password. Specify this parameter only if the Analysis Services instance is configured for HTTP access, using Basic authentication. For native connections that use integrated security, this parameter is ignored.

If this parameter is present, the credentials that it provides are appended to the connection string. IIS will impersonate this user identity when connecting to Analysis Services. If no credentials are specified, the default windows account of the user who is running the tool will be used.

To use this parameter, first create a PSCredential object using Get-Credential to specify the username and password (for example, $Cred=Get-Credential “adventure-works\admin”. You can then pipe this object to the –Credential parameter (-Credential:$Cred).

-Database <Microsoft.AnalysisServices.Database[]>

Specifies an Analysis Services database object to be backed up. You can specify a database using either the -Database parameter or the –Name parameter. Use –Database if you want to pipe in the database name.

Required?

true

Position?

named

Default value

Accept pipeline input?

true

Accept wildcard characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see About_CommonParameters.

Lines 1 and 2 are used to prompt for a password that will be used to encrypt the file.

Line 3 backs up the Contoso_Retail sample database on the remote Analysis Services server to an Analysis Services backup file named test.abf, also on the remote server. The file is saved to the default backup folder of the default instance.