Share via


Backup-ASDatabase

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

Syntax

ParameterSetName (Default)

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>]

ParamsetInput

Backup-ASDatabase
    -Database <Database[]>
    [-AllowOverwrite]
    [-BackupRemotePartitions]
    [-ApplyCompression]
    [-FilePassword <SecureString>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ParameterSetInputObject

Backup-ASDatabase
    [-Server <String>]
    [-Credential <PSCredential>]
    [-ServicePrincipal]
    [-ApplicationId <String>]
    [-TenantId <String>]
    [-CertificateThumbprint <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ParameterSetTabularName

Backup-ASDatabase
    [-Server <String>]
    [-Credential <PSCredential>]
    [-ServicePrincipal]
    [-ApplicationId <String>]
    [-TenantId <String>]
    [-CertificateThumbprint <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ParameterSetTabularInputObject

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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParameterSetName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParamsetInput
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ApplicationId

The application Id for the service principal.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParameterSetName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetInputObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetTabularName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetTabularInputObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ApplyCompression

Indicates whether the backup file will be compressed or not.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParameterSetName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParamsetInput
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParameterSetName
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-BackupRemotePartitions

Indicates whether remote partitions will be backed up or not.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParameterSetName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParamsetInput
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CertificateThumbprint

The certificate thumbprint for the service principal.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParameterSetName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetInputObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetTabularName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetTabularInputObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:PSCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParameterSetName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetInputObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetTabularName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetTabularInputObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Database

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

Parameter properties

Type:

Database[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParamsetInput
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-FilePassword

The password to be used with backup file encryption

Parameter properties

Type:SecureString
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParameterSetName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParamsetInput
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Analysis Services Database Name that has to be backed up.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParameterSetName
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Server

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParameterSetName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetInputObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetTabularName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetTabularInputObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ServicePrincipal

Specifies that this connection is using service principal.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParameterSetName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetInputObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetTabularName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetTabularInputObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TenantId

The tenant Id for the service principal.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParameterSetName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetInputObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetTabularName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetTabularInputObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.AnalysisServices.Database

Outputs

System.Object