Backup-ASDatabase

Enables a database administrator to take the backup of Analysis Service Database to a file.

Syntax

Backup-ASDatabase
      [-BackupFile] <String>
      [-Name] <String>
      [-AllowOverwrite]
      [-BackupRemotePartitions]
      [-ApplyCompression]
      [-FilePassword <SecureString>]
      [-Server <String>]
      [-Credential <PSCredential>]
      [-ServicePrincipal]
      [-ApplicationId <String>]
      [-TenantId <String>]
      [-CertificateThumbprint <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Backup-ASDatabase
      [-AllowOverwrite]
      [-BackupRemotePartitions]
      [-ApplyCompression]
      [-FilePassword <SecureString>]
      -Database <Database[]>
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Backup-ASDatabase
      [-Server <String>]
      [-Credential <PSCredential>]
      [-ServicePrincipal]
      [-ApplicationId <String>]
      [-TenantId <String>]
      [-CertificateThumbprint <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Backup-ASDatabase
      [-Server <String>]
      [-Credential <PSCredential>]
      [-ServicePrincipal]
      [-ApplicationId <String>]
      [-TenantId <String>]
      [-CertificateThumbprint <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Backup-ASDatabase
      [-Server <String>]
      [-Credential <PSCredential>]
      [-ServicePrincipal]
      [-ApplicationId <String>]
      [-TenantId <String>]
      [-CertificateThumbprint <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Enables a database administrator to take the backup of Analysis Service Database to a file. If only backup file name is mentioned without the location, the default backup location specified during the installation will be considered. Database Administrator can also pass multiple databases through pipeline and perform the backup operation.

Module requirements: version 21+ on PowerShell 5.1; version 21 (recent preview) or version 22+ on PowerShell 7.x.

Examples

Example 1: Backup database by name

Backup-ASDatabase mydb.abf mydatabase

Example 2: Backup database with compression

Backup-ASDatabase "D:\MyFolder\mydb.abf" mydatabase -AllowCompression

Example 3: Backup database with compression and encrypted

Backup-ASDatabase "D:\MyFolder\mydb.abf" mydatabase -AllowCompression -FilePassword:$pwd

Parameters

-AllowOverwrite

Indicates whether the destination files can be overwritten during backup.

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

-ApplicationId

The application Id for the service principal.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ApplyCompression

Indicates whether the backup file will be compressed or not.

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

-BackupFile

The backup file path/name where database will be backed up. If only backup file name is mentioned without the location, the default backup location specified during the installation will be considered. This parameter will only be used if the database to backup is specified with the Name parameter, not if it is passed in with the Database parameter.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-BackupRemotePartitions

Indicates whether remote partitions will be backed up or not.

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

-CertificateThumbprint

The certificate thumbprint for the service principal.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-Credential

If this parameter is specified, the user name and password passed will be used to connect to specified Analysis Server instance. If no credentials are specified default windows account of the user who is running the tool will be used.

Type:PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Database

The Database or Databases to be backed up. The filename of the backup will be the same as the database.

Type:Database[]
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-FilePassword

The password to be used with backup file encryption

Type:SecureString
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Analysis Services Database Name that has to be backed up.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Server

Optionally specifies the server instance to connect to if not currently in the SQLAS Provider directory.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ServicePrincipal

Specifies that this connection is using service principal.

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

-TenantId

The tenant Id for the service principal.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
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:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.AnalysisServices.Database[]

Outputs

System.Object

Notes

Supported on all Analysis Services instances Currently unsupported by the PowerBI Premium Product. It will be supported in the future.