Restore-ASDatabase

Restores a specified Analysis Service database from a backup file.

Syntax

Restore-ASDatabase
       [-RestoreFile] <String>
       [-Name] <String>
       [-AllowOverwrite]
       [-Security <RestoreSecurity>]
       [-Password <SecureString>]
       [-StorageLocation <String>]
       [-Locations <RestoreLocation[]>]
       [-Server <String>]
       [-Credential <PSCredential>]
       [-ServicePrincipal]
       [-ApplicationId <String>]
       [-TenantId <String>]
       [-CertificateThumbprint <String>]
       [-ProgressAction <ActionPreference>]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]
Restore-ASDatabase
       [-Server <String>]
       [-Credential <PSCredential>]
       [-ServicePrincipal]
       [-ApplicationId <String>]
       [-TenantId <String>]
       [-CertificateThumbprint <String>]
       [-ProgressAction <ActionPreference>]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]
Restore-ASDatabase
       [-Server <String>]
       [-Credential <PSCredential>]
       [-ServicePrincipal]
       [-ApplicationId <String>]
       [-TenantId <String>]
       [-CertificateThumbprint <String>]
       [-ProgressAction <ActionPreference>]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]
Restore-ASDatabase
       [-Server <String>]
       [-Credential <PSCredential>]
       [-ServicePrincipal]
       [-ApplicationId <String>]
       [-TenantId <String>]
       [-CertificateThumbprint <String>]
       [-ProgressAction <ActionPreference>]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]

Description

Enables a database administrator to restore the Analysis Service Database from a backup file. If only backup file name is mentioned without the location, the default backup location specified during the installation will be considered.

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

Parameters

-AllowOverwrite

Indicates whether the destination files can be overwritten during restore.

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

-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

-Locations

Remote location of the partitions to be restored.

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

-Name

Analysis Services Database Name that has to be restored.

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

-Password

The password to use to decrypt the restoration file.

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

-ProgressAction

Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by the Write-Progress cmdlet. The Write-Progress cmdlet creates progress bars that show a command's status.

Type:ActionPreference
Aliases:proga
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RestoreFile

Restores a specified Analysis Service database from a backup file.

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

-Security

Represents security settings for the restore operation.

Type:RestoreSecurity
Accepted values:CopyAll, SkipMembership, IgnoreSecurity
Position:Named
Default value:None
Required:False
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

-StorageLocation

The database storage location.

Type:String
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

System.String

Notes

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