New-RestoreFolder cmdlet

Restores an original folder to a new folder.

Syntax

New-RestoreFolder [-OriginalFolder] <String> [-NewFolder] <String> [-AsTemplate] [-Server <String>] [-Credential <PSCredential>] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-WarningAction <ActionPreference>] [-ErrorVariable <String>] [-WarningVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm]

New-RestoreFolder [-Server <String>] [-Credential <PSCredential>] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-WarningAction <ActionPreference>] [-ErrorVariable <String>] [-WarningVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm]

Common parameters, such as –Verbose, -Debug, error and warning parameters, -Whatif, and –Confirm are documented in the Windows PowerShell reference. For more information, see about_CommonParameters.

Description

The New-RestoreFolder cmdlet is used to create a new folder based on the name of the original folder.

Parameters

-OriginalFolder <string>

Gets the original folder location.

Required?

true

Position?

0

Default value

Accept pipeline input?

true

Accept wildcard characters?

false

-NewFolder <string>

Sets the location of a new folder.

Required?

true

Position?

1

Default value

Accept pipeline input?

true

Accept wildcard characters?

false

-AsTemplate <SwitchParameter>

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

Required?

false

Position?

named

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

-Server <string>

Specifies the Analysis Services instance to which the cmdlet will connect and execute. If no server name is provided, a connection will be made to localhost. For default instances, specify just the server name. For named instances, use the format servername\instancename. For HTTP connections, use the format http[s]://server[:port]/virtualdirectory/msmdpump.dll.

Required?

false

Position?

named

Default value

localhost

Accept pipeline input?

false

Accept wildcard characters?

false

-Credential <PSCredential>

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) 7.0 and Analysis Services PowerShell 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).

Required?

false

Position?

named

Default value

Accept pipeline input?

True (ByValue)

Accept wildcard characters?

false

Inputs and Outputs

The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet returns.

Inputs

Outputs

None

See Also

Concepts

Analysis Services PowerShell

Other Resources

Manage Tabular Models Using PowerShell