Get-KMSHostEvent

SYNOPSIS

This function queries a KMS host server for registration events.

SYNTAX

Get-KMSHostEvent [[-ComputerName] <String>] [[-Credential] <PSCredential>] [[-StartTime] <DateTime>]
 [[-EndTime] <DateTime>] [[-MaxEvents] <Int64>] [-Oldest] [-Raw] [<CommonParameters>]

DESCRIPTION

This function queries a KMS host server for registration events.

EXAMPLES

Example 1

PS C:\> Get-KMSHostEvent -ComputerName SVR01.contoso.com -MaxEvents 10 -Oldest | Format-Table -Property ClientFqdn,ClientTimestamp,IsClientVM,LicenseState,ProductSkuName,MinActivateCount

ClientFqdn            ClientTimestamp       IsClientVM LicenseState       ProductSkuName         MinActivateCount
----------            ---------------       ---------- ------------       --------------         ----------------
WKSTN27.contoso.com   4/10/2018 10:21:00 PM      False Grace Period       Office Standard 2016   5
WKSTN06.contoso.com   4/10/2018 10:24:00 PM      False Grace Period       Office Standard 2016   5
MYLAPTOP              4/10/2018 9:26:00 PM       False Notifications Mode Windows 10 Enterprise  25
WKSTN63.contoso.com   4/10/2018 10:28:00 PM      False Grace Period       Office Standard 2013   5
vmwkstn04.contoso.com 4/10/2018 10:31:00 PM       True Grace Period       Windows 7 Professional 25
WKSTN68.contoso.com   4/10/2018 10:33:00 PM       True Grace Period       Windows 7 Professional 25
vmwkstn14.contoso.com 4/10/2018 10:33:00 PM       True Grace Period       Windows 7 Professional 25
WKSTN63               4/10/2018 9:34:00 PM       False Grace Period       Office Standard 2016   5
WKSTN63               4/10/2018 9:34:00 PM       False Notifications Mode Windows 10 Enterprise  25
vmwkstn45.contoso.com 4/10/2018 10:34:00 PM       True Grace Period       Windows 7 Professional 25

PARAMETERS

-ComputerName

Gets events from the event logs on the specified computer. Type the NetBIOS name, an Internet Protocol (IP) address, or the fully qualified domain name of the computer. The default value is the local computer.

Type: String
Parameter Sets: (All)
Aliases: IPAddress, __Server, CN

Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Credential

Specifies a user account that has permission to perform this action. The default value is the current user.

Type a user name, such as User01 or Domain01\User01. Or, enter a PSCredential object, such as one generated by the Get-Credential cmdlet. If you type a user name, you will be prompted for a password. If you type only the parameter name, you will be prompted for both a user name and a password.

Type: PSCredential
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndTime

Specifies the end of the time period for the event log query.

Type: DateTime
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxEvents

Specifies the maximum number of events this function returns. Enter an integer. The default is to return all the events in the logs.

Type: Int64
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Oldest

Returns the events in oldest-first order. By default, events are returned in newest-first order.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-StartTime

Specifies the beginning of the time period for the event log query.

Type: DateTime
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Raw

Use this switch to provide the raw event log record for the function.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

System.String

OUTPUTS

System.Object

NOTES