Share via


New-RestoreLocation

Used to add a restore ___location to the server.

Syntax

ParameterSetName (Default)

New-RestoreLocation
    [-File <String>]
    [-DataSourceId <String>]
    [-ConnectionString <String>]
    [-DataSourceType <RestoreDataSourceType>]
    [-Folders <RestoreFolder[]>]
    [-AsTemplate]
    [-Server <String>]
    [-Credential <PSCredential>]
    [-ServicePrincipal]
    [-ApplicationId <String>]
    [-TenantId <String>]
    [-CertificateThumbprint <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ParameterSetInputObject

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

ParameterSetTabularName

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

ParameterSetTabularInputObject

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

Description

The New-RestoreLocation cmdlet contains information used to restore a database, including the connection string of the server and database, data source properties, files and folders associated with the database that is being restored.

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

Parameters

-ApplicationId

The application Id for the service principal.

Parameter properties

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

Parameter sets

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

-AsTemplate

Specifies whether the object should be created in memory and returned.

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

-CertificateThumbprint

The certificate thumbprint for the service principal.

Parameter properties

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

Parameter sets

(All)
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

-ConnectionString

Specifies the connection string of a remote Analysis Services instance.

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

-Credential

This parameter is used to pass in a username and password when using an HTTP connection to an Analysis Service instance, for an instance that you have configured for HTTP access. For more information, see Configure HTTP Access to Analysis Services on Internet Information Services (IIS) 8.0 for HTTP connections.

If this parameter is specified, the username and password will be used to connect to the specified Analysis Server instance. If no credentials are specified, 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\bobh"

. You can then pipe this object to the �Credential parameter (

-Credential $Cred

).

Parameter properties

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

Parameter sets

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

-DataSourceId

@{Text=}

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

-DataSourceType

Specifies whether the data source is remote or local, based on the ___location of the partition.

Parameter properties

Type:RestoreDataSourceType
Default value:None
Accepted values:Remote, Local
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

-File

Specifies the name of the backup file that you are restoring.

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

-Folders

Specifies partition folders on the local or remote instance.

Parameter properties

Type:

RestoreFolder[]

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

-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

(All)
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

(All)
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

(All)
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.