Get-Database
Retrieves a Sitecore Database.

Syntax

Get-Database [[-Name] <String>] [-Item <Item>]

Detailed Description

The Get-Database command retrieves one or more Sitecore Database objects based on name or item passed to it.
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions

Parameters

-Name <String>

Name of the database to be returned.
Aliases
Text
Required?
false
Position?
1
Default Value
Accept Pipeline Input?
true (ByValue)
Accept Wildcard Characters?
false

-Item <Item>

Database returned will be taken from the item passed to the command.
Aliases
Text
Required?
false
Position?
named
Default Value
Accept Pipeline Input?
true (ByValue)
Accept Wildcard Characters?
false

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.
  • Sitecore.Data.Items.Item
    System.String

Outputs

The output type is the type of the objects that the cmdlet emits.
  • Sitecore.Data.Database

Notes

Help Author: Adam Najmanowicz, Michael West

Examples

EXAMPLE 1

1
PS master:\> Get-Database
2
Name Languages Protected Read Only
3
---- --------- --------- ---------
4
core {da, pl-PL, ja-JP, en...} False False
5
master {en, de-DE, es-ES, pt-BR...} False False
6
web {es-ES, de-DE, pt-BR, pl-PL... False False
7
filesystem {en, en-US} False True
Copied!

EXAMPLE 2

1
PS master:\> Get-Database -Name "master"
2
3
Name Languages Protected Read Only
4
---- --------- --------- ---------
5
master {en, de-DE, es-ES, pt-BR...} False False
Copied!

EXAMPLE 3

1
PS master:\> Get-Item . | Get-Database
2
3
Name Languages Protected Read Only
4
---- --------- --------- ---------
5
master {en, de-DE, es-ES, pt-BR...} False False
Copied!

Related Topics