Backup-ASDatabase

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

语法

ParameterSetName (默认值)

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

说明

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.

示例

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

参数

-AllowOverwrite

Indicates whether the destination files can be overwritten during backup.

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

ParameterSetName
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParamsetInput
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ApplicationId

The application Id for the service principal.

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

ParameterSetName
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParameterSetInputObject
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParameterSetTabularName
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParameterSetTabularInputObject
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ApplyCompression

Indicates whether the backup file will be compressed or not.

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

ParameterSetName
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParamsetInput
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值: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.

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

ParameterSetName
Position:0
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-BackupRemotePartitions

Indicates whether remote partitions will be backed up or not.

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

ParameterSetName
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParamsetInput
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-CertificateThumbprint

The certificate thumbprint for the service principal.

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

ParameterSetName
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParameterSetInputObject
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParameterSetTabularName
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParameterSetTabularInputObject
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Confirm

Prompts you for confirmation before running the cmdlet.

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:cf

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值: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.

参数属性

类型:PSCredential
默认值:None
支持通配符:False
不显示:False

参数集

ParameterSetName
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParameterSetInputObject
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParameterSetTabularName
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParameterSetTabularInputObject
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Database

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

参数属性

类型:

Database[]

默认值:None
支持通配符:False
不显示:False

参数集

ParamsetInput
Position:Named
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-FilePassword

The password to be used with backup file encryption

参数属性

类型:SecureString
默认值:None
支持通配符:False
不显示:False

参数集

ParameterSetName
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParamsetInput
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Name

Analysis Services Database Name that has to be backed up.

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

ParameterSetName
Position:1
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Server

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

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

ParameterSetName
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParameterSetInputObject
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParameterSetTabularName
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParameterSetTabularInputObject
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ServicePrincipal

Specifies that this connection is using service principal.

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

ParameterSetName
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParameterSetInputObject
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParameterSetTabularName
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParameterSetTabularInputObject
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-TenantId

The tenant Id for the service principal.

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

ParameterSetName
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParameterSetInputObject
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParameterSetTabularName
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
ParameterSetTabularInputObject
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-WhatIf

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

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:wi

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值: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.

输入

Microsoft.AnalysisServices.Database

输出

System.Object