GetEventLogCommand.UserName Property
Gets and sets the value of the UserName parameter of the Get-EventLog cmdlet. This property is introduced in Windows PowerShell 2.0.
Namespace: Microsoft.PowerShell.Commands
Assembly: Microsoft.PowerShell.Commands.Management (in Microsoft.PowerShell.Commands.Management.dll)
Usage
'Usage
Dim instance As GetEventLogCommand
Dim value As String()
value = instance.UserName
instance.UserName = value
Syntax
'Declaration
<ParameterAttribute(ParameterSetName:="LogName")> _
<ValidateNotNullOrEmptyAttribute> _
Public Property UserName As String()
[ParameterAttribute(ParameterSetName="LogName")]
[ValidateNotNullOrEmptyAttribute]
public string[] UserName { get; set; }
[ParameterAttribute(ParameterSetName=L"LogName")]
[ValidateNotNullOrEmptyAttribute]
public:
property array<String^>^ UserName {
array<String^>^ get ();
void set (array<String^>^ value);
}
/** @property */
public String[] get_UserName ()
/** @property */
public void set_UserName (String[] value)
public function get UserName () : String[]
public function set UserName (value : String[])
Property Value
A String array that contains the names of the users who wrote the events to be retrieved.
Remarks
This topic is included in this SDK for completeness only. For more information about this cmdlet, see Get-EventLog in the Microsoft TechNet library.
For Help at the command line, type:
get-help get-eventlog
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Target Platforms
See Also
Reference
GetEventLogCommand Class
GetEventLogCommand Members
Microsoft.PowerShell.Commands Namespace