The 12290 event entry gives a significant amount of information that can be used to figure out what kind client contacted the host…and why a failure may occur.

In the event entry, you will find the following relevant information:

  • Minimum count needed to activate
    • The KMS client is reporting that the count from the KMS host must be 5 in order to activate.

That means this is a Server OS, though whether it is Windows Server 2008 or Windows Server 2008 R2 will not be clarified, nor will the specific edition. If your clients are not activating, make sure that the count is sufficient on the host.

  • Client Machine ID (CMID)
    • This is a unique value per system. If this is not unique it is because an image was not properly prepared for distribution (sysprep /generalize). This will manifest on the KMS host as a count that will not increase, despite a sufficient number of clients existing in the environment. See KB929829 for more info.
  • License State and Time to State Expiration
    • This is the license state that the client currently has. It can help you differentiate a client that is trying to activate for the first time versus one that is attempting to reactivate. The time entry will tell you how much longer the client will be in that state, if nothing changes.

Another relevant event to look for on your KMS is the 12293.

This event indicates that the host failed to publish the required records in DNS. That will definitely cause failures and is something you should confirm after settting up your host and before deploying clients.

MinmumCountToActivate

ReplacementStrings[2]

ClientFQDN

ReplacementStrings[3]

ClientTimeStamp

ReplacementStrings[5]

VM

ReplacementStrings[6]

TimeToStateExpiration

ReplacementStrings[8]

ProductID

ReplacementStrings[9]

ClientMachineID

ReplacementStrings[4]

LicenseStatus

Data type: uint32

Access type: Read-only

Specifies the license status of this product application. The following values are possible.

Value

Description

0

Unlicensed

1

Licensed

2

OOBGrace

3

OOTGrace

4

NonGenuineGrace

5

Notification

6

ExtendedGrace

There is no "Volume Activation expiration" field, see below, the blank fields were removed for the purposes of posting. I've added the full text of what shows up in the KMS logs for the Window 10 devices.

12290 Event details:

0x0,25,pcname.domain.com,24ecc780-5463-4cfc-bc0c-71744241ee4f,2015/10/27 17:10,0,5,0,2de67392-b7a7-462a-b1ca-108dd189f588

Ah. I meant the slmgr.vbs output from the KMSclient, not the KMShost.

But anyway, the 12290 event tells the story;

,0,5,0, = ,isNotAVirtualMachine, IsInNotificationState, ZeroMinutesUntilCurrentStateExpires

It's a zero, because it's already in Notification, so there is not further state to transition into, it has exhausted all less-impactful "Grace" states (or it transitioned/skipped them). The only possible transition is into Licensed=1 (or maybe rearm into OOB Grace=2)

[edit: apparently no Grace period in Win10.][thanks darrellg :)]

So, this machine needs to be correctly activated/renewed.

If this machine, when it contacts this KMShost, does not (re)activate, the problem wouldn't seem to be at the KMShost, rather, at the client.

Your KMShost is getting the requests, and seems to be responding with a suitable response for the client to activate.

If the client isn't becoming activated after that response, check the client.

Check the client anyway, you should see the "request" go out to the KMShost and the response come back from the KMShost and the client activation result (or failure) should be logged on the client.

Basically, KMSclients send up a request stating what they are (GenericSKU/productID) and who they are (uniqueCMID) and what minimum_current_count they require. Your host seems to be responding with all the required answers, so it's up to the client to accept and process that response, or to throw an error event (locally logged on the client).

##############CONNECTION SQL ###########$Connection###########
Get-Content "D:\xxxxx\SQLConnections_1.ps1" | Invoke-Expression $SQLtable="tablename"
Add-PSSnapin SqlServerCmdletSnapin100
Add-PSSnapin SqlServerProviderSnapin100 $cmd=Invoke-Sqlcmd -ServerInstance $SQLServer -Database $SQLDatabase -Query "select MAX(EventIndexID) from [$SQLDatabase].dbo.[$SQLtable]"
$max=[string]$cmd.column1
$maxlength=$max.length
echo "$maxlength"
if ($maxlength -ne "")
{ echo "start collect event"
$eventlogs=Get-EventLog -ComputerName KMSSERVERNAME -Logname "Key Management Service" | Select machinename,TimeGenerated,Message,ReplacementStrings,EventID,Index| Where-Object {$_.Index -gt "$max"}
}
else
{
echo "start collect event,no maxtRecordId"
$eventlogs=Get-EventLog -ComputerNameKMSSERVERNAME -Logname "Key Management Service" | Select machinename,TimeGenerated,Message,ReplacementStrings,EventID,Index
} IF($eventlogs)
{ foreach($eventlog in $eventlogs)
{
$servername=$eventlog.machinename
$TimeGenerated=$eventlog.TimeGenerated
$EventId=$eventlog.EventID
$EventIndexID=$eventlog.Index
$Message=($eventlog.message) -Replace "'", "''"
$MinmumCountToActivate=$eventlog.ReplacementStrings[2]
$ClientFQDN=$eventlog.ReplacementStrings[3]
$ClientTimeStamp=$eventlog.ReplacementStrings[5]
$VM=$eventlog.ReplacementStrings[6]
$TimeToStateExpiration=$eventlog.ReplacementStrings[8]
$ProductID=$eventlog.ReplacementStrings[9]
$ClientMachineID=$eventlog.ReplacementStrings[4]
$insert="insert into tablename(ServerName, TimeGenerated,EventId, Message,EventIndexID,MinmumCountToActivate,ClientFQDN,ClientTimeStamp,VM,TimeToStateExpiration,ProductID,ClientMachineID) values(N'$servername',N'$TimeGenerated',N'$EventId',N'$Message',N'$EventIndexID',N'$MinmumCountToActivate',N'$ClientFQDN',N'$ClientTimeStamp',N'$VM',N'$TimeToStateExpiration',N'$ProductID',N'$ClientMachineID')"
$cmd1=new-object system.Data.SqlClient.SqlCommand($insert,$Connection)
$cmd1.CommandTimeout=6000
$cmd1.ExecuteNonQuery()
} }
else{
echo "no events"
$insert="insert into tablename(ServerName,Message) values(N'$dc',N'No events')"
$cmd1=new-object system.Data.SqlClient.SqlCommand($insert,$Connection)
$cmd1.CommandTimeout=6000
$cmd1.ExecuteNonQuery()
} $errorcount=$error.count
if($errorcount -eq "")
{
$subject = "xxx"
$message="xxxxxx"
Get-Content "D:\xxx\SQL_Data_Admin.ps1" | Invoke-Expression
Send-mailmessage –bodyashtml –from $from –to $to –subject $subject –body $message –smtpserver $smtpserver -Encoding ([System.Text.Encoding]::Utf8)
} $Connection.Close()

KMS Event LOG的更多相关文章

  1. ora-28056 (Writing audit records to Windows Event Log failed)

    系统:windows xp oracle 版本 SQL> select * from v$version; BANNER ------------------------------------ ...

  2. windows 系统无法启动windows event log 服务

    windows 系统无法启动windows event log 服务 关键词:无法启动系统事件日志 尝试解决步骤 [1]权限:把如图中logsfile文件等都给local service [2]把C: ...

  3. application pool can not write to event log

    https://stackoverflow.com/questions/9564420/the-source-was-not-found-but-some-or-all-event-logs-coul ...

  4. Event log c++ sample.

    1. Init regedit. bool InitLog( TCHAR *logName, TCHAR *sourceName, TCHAR *MessageDllName ) { // This ...

  5. AngularJS - $index, $event, $log

    原文: https://thinkster.io/egghead/index-event-log --------------------------------------------------- ...

  6. AWR发现TOP Event log file sequential read

    对客户DB进行巡检,发现TOP EVENT是LOG FILE Sequential read 等待事件说明 https://www.xuebuyuan.com/zh-hant/1743045.html ...

  7. How to write to an event log by using Visual C#

    using System; using System.Diagnostics; namespace WriteToAnEventLog_csharp { /// Summary description ...

  8. 如何在 Windows Event Log 中查找系统重启的信息

    事件ID:12 事件ID 13: 事件ID 41: 事件ID 6008: 事件ID 1074:事件ID 1074: ========================================== ...

  9. Android 解读Event和Main Log

    1 Android P EventLogTags文件 Android P 9.0.0 所有EventLogTags文件List: system/bt/EventLogTags.logtags syst ...

随机推荐

  1. Java并发编程(一):并发与高并发等基础概念

    并发概念 同时拥有两个或者多个线程,如果程序在单核处理器上运行,多个线程将交替地换入或者换出内存,这些线程是同时存在的,每个线程都处于执行过程中的某个状态.如果运行在多核处理器上,程序中的每个线程都将 ...

  2. 点滴积累【C#】---C#实现上传word将路径保存到数据库,文件保存到服务器。并且按照名称读取服务器的word

    效果: 1. . . 数据库: 思路: 上传:先获取word物理地址,然后根据文件的类型判断,然后再保存到相应的文件夹下,再把路径插入到数据库中. 读取:首先根据输入的文件名字在数据库中查找出来文件的 ...

  3. poj1860--Currency Exchange

    Bellman-ford算法的反向应用--正循环检查 /** \brief poj 1860 Bellman-Ford * * \param date 2014/7/24 * \param state ...

  4. DiskLrucCache使用Demo(强烈推荐,非常好用)

    DiskLrucCache使用的Demo,这个demo是从网络获取一张图片,保存到本地缓存中(sdcard和内存),当下载成功后.再打开不会又一次向网络请求图片.而是世界使用本地资源. 要使用Disk ...

  5. python-hanoi

    #!/usr/bin/env python #-*- coding:utf-8 -*- ############################ #File Name: hanoi.py #Autho ...

  6. Centos安装ruby--jekyll

    想要使用gem install 安装jekyll,执行发现没有gem这个命令,那就需要先安装gem了 yum list '*ruby*' 修改gem源,使用淘宝的源: gem sources --re ...

  7. go context包的WithTimeout和WithCancel的使用

    1.WaitGroup 它是一种控制并发的方式,它的这种方式是控制多个goroutine同时完成. func main() { var wg sync.WaitGroup wg.Add(2) go f ...

  8. The Definitive Guide To Django 2 学习笔记(一) Views and UrL confsRL

    1.如何找到django在Ubuntu下的安装路径: 进入python命令行,import django,print(django.__path__) 2.使用django-admin.py 创建项目 ...

  9. pipe_wait问题_转

    转自:调用Process.waitfor导致的进程挂起 最近遇到pipe_wait问题,父进程调用子进程时,子进程阻塞,cat /proc/$child/wchan输出pipe_wait,进程阻塞在p ...

  10. Echarts中线状图的X轴坐标标签倾斜样式

    在echarts中应用线状图时可以展现很多的数据,而当数据量过多的时候,X轴的坐标就会显示不全,因为整个图形的宽度是一定的,X轴的全长是一定的 http://www.cnblogs.com/phpgc ...