ManagedInstance.AgentProxyAccount Property

Definition

Gets the SQL Server Agent proxy account used to run scheduled jobs on the instance of SQL Server.

public:
 property System::String ^ AgentProxyAccount { System::String ^ get(); };
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcProperty(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Data | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Required)]
public string AgentProxyAccount { get; }
[<Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcProperty(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Data | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Required)>]
member this.AgentProxyAccount : string
Public ReadOnly Property AgentProxyAccount As String

Property Value

A String value that specifies the name of the SQL Server Agent proxy account.

Attributes

Examples

VC#

AgentProxyAccount agentProxyAccount;  
agentProxyAccount = new AgentProxyAccount ();  
System.Console.WriteLine(agentProxyAccount.DateCreated);  

VB

Dim agentProxyAccount As AgentProxyAccount  
agentProxyAccount = New AgentProxyAccount ()   
System.Console.WriteLine(agentProxyAccount.DateCreated)  

PowerShell

$agentProxyAccount = New-Object Microsoft.SqlServer.Management.Utility.AgentProxyAccount  
Write-Host $agentProxyAccount.DateCreated   

Remarks

The SQL Server Agent proxy account can be used to run scheduled policy checks on the instance of SQL Server.

Applies to