Get-MasterDataServicesDatabases (Windows PowerShell)
Gets information about Master Data Services databases on a specified instance of SQL Server.
Syntax
Get-MasterDataServicesDatabases [-Server] <Microsoft.MasterDataServices.Configuration.DatabaseServerInformation>
Description
Get-MasterDataServicesDatabases returns a collection of database information objects that contain information about Master Data Services databases on a specified instance of SQL Server. The collection includes only databases that can be accessed by using the credentials that are specified in the Server parameter.
Parameters
-Server
The Server parameter is a database server information object from Get-MasterDataServicesDatabaseServerInformation. This object is used to connect to the instance of SQL Server that hosts the Master Data Services database.
Required? |
true |
Position? |
0 |
Default Value |
none |
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 |
Microsoft.MasterDataServices.Configuration.DatabaseServerInformation The input is a database server information object from Get-MasterDataServicesDatabaseServerInformation. |
Outputs |
System.Collections.ObjectModel.Collection{Microsoft.MasterDataServices.Configuration.DatabaseInformation} Get-MasterDataServicesDatabases returns a collection of database information objects. |
Examples
Output
The following is an example of the output that is returned when you use this cmdlet.
Name : MyDatabase_EN HasAccess : True Collation : SQL_Latin1_General_CP1_CI_AS ServiceAccount : MdsAdministrator : Server : Microsoft.MasterDataServices.Configuration.DatabaseServerInformation IsDatabaseOwner : True Name : MyDatabase_JA HasAccess : True Collation : Japanese_Bushu_Kakusu_100_CS_AI ServiceAccount : MdsAdministrator : Server : Microsoft.MasterDataServices.Configuration.DatabaseServerInformation IsDatabaseOwner : True ...
Using Variables and Named Parameters
This example uses the Get-MasterDataServicesDatabaseServerInformation cmdlet to set a variable, $server, to use for the Server parameter in the Get-MasterDataServicesDatabases cmdlet. The -Server parameter is a named parameter.
C:\PS>$server = Get-MasterDataServicesDatabaseServerInformation
-connectionString 'Data Source=MyServer\MyInstance;Initial catalog=;Integrated Security=True;User ID=;Password=';
Get-MasterDataServicesDatabases -Server $server
Piping Output and Using Named Parameters
This example pipes output from Get-MasterDataServicesDatabaseServerInformation to Get-MasterDataServicesDatabases for the Server parameter in Get-MasterDataServicesDatabases. The -Server parameter is a named parameter.
C:\PS>Get-MasterDataServicesDatabaseServerInformation
-connectionString 'Data Source=MyServer\MyInstance;Initial catalog=;Integrated Security=True;User ID=;Password=' |
Get-MasterDataServicesDatabases
Using Variables and Positional Parameters
This example uses the Get-MasterDataServicesDatabaseServerInformation cmdlet to set a variable, $server, to use for the Server parameter in the Get-MasterDataServicesDatabases cmdlet. The -Server parameter is a positional parameter.
C:\PS>$server = Get-MasterDataServicesDatabaseServerInformation
-connectionString 'Data Source=MyServer\MyInstance;Initial catalog=;Integrated Security=True;User ID=;Password=';
Get-MasterDataServicesDatabases $server