Get-MasterDataServicesDatabases (PowerShell)
SQL Server の指定インスタンスの Master Data Services データベースに関する情報を取得します。
構文
Get-MasterDataServicesDatabases [-Server] <Microsoft.MasterDataServices.Configuration.DatabaseServerInformation>
説明
Get-MasterDataServicesDatabases は、データベース情報オブジェクトのコレクションを返します。このオブジェクトには、SQL Server の指定インスタンスの Master Data Services データベースに関する情報が含まれています。コレクションには、Server パラメーターで指定された資格情報を使用してアクセスできるデータベースのみが含まれます。
パラメーター
-Server
Server パラメーターは、Get-MasterDataServicesDatabaseServerInformation のデータベース サーバー情報オブジェクトです。このオブジェクトは、Master Data Services データベースをホストする SQL Server のインスタンスへの接続に使用されます。
必須/オプション |
必須 |
位置 |
0 |
既定値 |
なし |
パイプライン入力の受け入れ |
可 (ByValue) |
ワイルドカード文字の受け入れ |
不可 |
入力および出力
入力型は、コマンドレットにパイプできるオブジェクトの型です。戻り値の型は、コマンドレットが返すオブジェクトの型です。
入力 |
Microsoft.MasterDataServices.Configuration.DatabaseServerInformation 入力は、Get-MasterDataServicesDatabaseServerInformation のデータベース サーバー情報オブジェクトです。 |
出力 |
System.Collections.ObjectModel.Collection{Microsoft.MasterDataServices.Configuration.DatabaseInformation} Get-MasterDataServicesDatabases は、データベース情報オブジェクトのコレクションを返します。 |
使用例
出力
このコマンドレットを使用したときに返される出力の例を次に示します。
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
...
変数と名前付きパラメーターの使用
次の例では、Get-MasterDataServicesDatabaseServerInformation コマンドレットを使用して、変数 $server を Get-MasterDataServicesDatabases コマンドレットの Server パラメーターで使用するように設定します。-Server パラメーターは、名前付きパラメーターです。
C:\PS>$server = Get-MasterDataServicesDatabaseServerInformation
-connectionString 'Data Source=MyServer\MyInstance;Initial catalog=;Integrated Security=True;User ID=;Password=';
Get-MasterDataServicesDatabases -Server $server
出力のパイプと名前付きパラメーターの使用
次の例では、Get-MasterDataServicesDatabaseServerInformation の出力を、Get-MasterDataServicesDatabases の Server パラメーターにパイプします。-Server パラメーターは、名前付きパラメーターです。
C:\PS>Get-MasterDataServicesDatabaseServerInformation
-connectionString 'Data Source=MyServer\MyInstance;Initial catalog=;Integrated Security=True;User ID=;Password=' |
Get-MasterDataServicesDatabases
変数と位置パラメーターの使用
次の例では、Get-MasterDataServicesDatabaseServerInformation コマンドレットを使用して、変数 $server を Get-MasterDataServicesDatabases コマンドレットの Server パラメーターで使用するように設定します。-Server パラメーターは、位置パラメーターです。
C:\PS>$server = Get-MasterDataServicesDatabaseServerInformation
-connectionString 'Data Source=MyServer\MyInstance;Initial catalog=;Integrated Security=True;User ID=;Password=';
Get-MasterDataServicesDatabases $server