次の方法で共有


UserProfile プロパティ

参照された接続に関連付けられたユーザー プロファイルを取得します。

名前空間:  Microsoft.SqlServer.Management.Common
アセンブリ:  Microsoft.SqlServer.ConnectionInfo (Microsoft.SqlServer.ConnectionInfo.dll)

構文

'宣言
Public ReadOnly Property UserProfile As ServerUserProfiles
    Get
'使用
Dim instance As ServerConnection
Dim value As ServerUserProfiles

value = instance.UserProfile
public ServerUserProfiles UserProfile { get; }
public:
property ServerUserProfiles UserProfile {
    ServerUserProfiles get ();
}
member UserProfile : ServerUserProfiles
function get UserProfile () : ServerUserProfiles

プロパティ値

型: Microsoft.SqlServer.Management.Common. . :: . .ServerUserProfiles
参照された接続に関連付けられたユーザー プロファイルを示す ServerUserProfiles オブジェクト値です。

使用例

C#

ServerConnection conn = new ServerConnection();
Console.WriteLine(conn.UserProfile.ToString());

PowerShell

$conn = new-object Microsoft.SqlServer.Management.Common.ServerConnection
Write-Host $conn.UserProfile