Client Restart Pending Status in Configuration Manager Console

As you know, you can get Pending Restart status of devices managed by Configuration Manager. If you want to see this information you just need to add the column Pending Restart in the Configuration Manager Console.

pending reboot

The next question is: how is it working? Is it a state message functionality? I have done some research and my answer is NO – it’s working with the SMS_NOTIFICATION_MANAGER component, which we call “Client Notification”.

Every ~15 minutes we are pushing clients to send this information, and that’s how it happens:

Client-side

CcmNotificationAgent.log debug logging enabled Records activities related to client notification operations.

06-08-2020 15:03:22.545 BgbAgent hr, HRESULT=87d00601 (..\bgbtcpclient.cpp,926)
06-08-2020 15:03:22.545 BgbAgent m_pTransport->Receive(m_pvBufferRecv, m_dwBufferRecv), HRESULT=87d00601 (..\bgbconnector.cpp,731)
06-08-2020 15:03:22.545 BgbAgent Getting currently logged on user SID
06-08-2020 15:03:22.545 BgbAgent Cached CCM (user, session) is: (S-1-5-21-2004472367-2420261659-2792288006-1104,4).
06-08-2020 15:03:22.545 BgbAgent ::GetSMSConsoleSessionId - SMS Console Session ID is: 4
06-08-2020 15:03:22.545 BgbAgent WTSQueryUserToken[2](SessionID=4) retried 0 times!
06-08-2020 15:03:22.560 BgbAgent sBoundaryGroupID: 16777219,
06-08-2020 15:03:22.560 BgbAgent Getting network information
06-08-2020 15:03:22.560 BgbAgent DHCP entry points already initialized.
06-08-2020 15:03:22.560 BgbAgent Begin checking Alternate Network Configuration
06-08-2020 15:03:22.560 BgbAgent Finished checking Alternate Network Configuration
06-08-2020 15:03:22.560 BgbAgent sIpAddress: 10.0.2.6,
06-08-2020 15:03:22.560 BgbAgent sIpSubnet: 10.0.2.0,
06-08-2020 15:03:22.560 BgbAgent Starting the check for whether an external reboot is pending
06-08-2020 15:03:22.560 BgbAgent GetPendingRebootInfo Value: 0
06-08-2020 15:03:22.560 BgbAgent External reboot: Component Based Servicing Reboot
06-08-2020 15:03:22.560 BgbAgent Created Keep Alive Message body SCCMGUID:EDD159E7-3770-473E-87D1-38E6DE76DE568
06-08-2020 15:03:22.560 BgbAgent Sent all 222 byte(s) to server.
06-08-2020 15:03:22.560 BgbAgent Successfully sent keep-alive message.
06-08-2020 15:03:22.560 BgbAgent Updating MDM_ConfigSetting.ClientHealthLastSyncTime with value 2020-06-08T12:03:22Z

Server-side

BgbServer.log Records the activities of the notification server, such as client-server communication and pushing tasks to clients. Also records information about the generation of online and task status files to be sent to the site server.

06-08-2020 15:04:19.786 SMS_NOTIFICATION_SERVER Retrieving online resync flag from database...~~ 
06-08-2020 15:04:19.788 SMS_NOTIFICATION_SERVER Total online clients: 5 (TCP: 3 HTTP: 2)~~ 
06-08-2020 15:04:19.789 SMS_NOTIFICATION_SERVER Online/Offline normal clients since last successful report: 0~~ 
06-08-2020 15:04:19.789 SMS_NOTIFICATION_SERVER Number of clients for reporting live data since last successful report: 1~~ 
06-08-2020 15:04:19.791 SMS_NOTIFICATION_SERVER Live data report: 1~~ 
06-08-2020 15:04:19.792 SMS_NOTIFICATION_SERVER Logon users data report: 0~~ 
06-08-2020 15:04:19.793 SMS_NOTIFICATION_SERVER Boundary group IDs data report: 0~~ 
06-08-2020 15:04:19.794 SMS_NOTIFICATION_SERVER Network info data report: 0~~ 
06-08-2020 15:04:19.795 SMS_NOTIFICATION_SERVER Generated BGB live data report E:\Program Files\Microsoft Configuration Manager\inboxes\bgb.box\Bgb6xkk2.BLD~~

bgbmgr.log Records details about site server activities related to client notification tasks and processing online and task status files.

06-08-2020 15:04:19.795 SMS_NOTIFICATION_MANAGER Inbox changes detected. Sleep for 1 second and process inbox files 
06-08-2020 15:04:20.796 SMS_NOTIFICATION_MANAGER Begin to get file list to process 
06-08-2020 15:04:20.797 SMS_NOTIFICATION_MANAGER Begin to handle file Bgb6xkk2.BLD 
06-08-2020 15:04:20.797 SMS_NOTIFICATION_MANAGER Begin to process file E:\Program Files\Microsoft Configuration Manager\inboxes\bgb.box\Bgb6xkk2.BLD 
06-08-2020 15:04:20.805 SMS_NOTIFICATION_MANAGER Server Name: CM-PR1.GARNIK.LAB 
06-08-2020 15:04:20.806 SMS_NOTIFICATION_MANAGER Successfully parsed file E:\Program Files\Microsoft Configuration Manager\inboxes\bgb.box\Bgb6xkk2.BLD 
06-08-2020 15:04:20.814 SMS_NOTIFICATION_MANAGER BCP queued 1 rows 
06-08-2020 15:04:20.824 SMS_NOTIFICATION_MANAGER BCP sent batched rows 
06-08-2020 15:04:20.829 SMS_NOTIFICATION_MANAGER No currently logged on user data records need to be BCPed 
06-08-2020 15:04:20.836 SMS_NOTIFICATION_MANAGER No boundary group ID data records need to be BCPed 
06-08-2020 15:04:20.843 SMS_NOTIFICATION_MANAGER No network info data records need to be BCPed 
06-08-2020 15:04:20.844 SMS_NOTIFICATION_MANAGER Successfully bcp file E:\Program Files\Microsoft Configuration Manager\inboxes\bgb.box\Bgb6xkk2.BLD 
06-08-2020 15:04:20.848 SMS_NOTIFICATION_MANAGER Successfully ran sql task for file E:\Program Files\Microsoft Configuration Manager\inboxes\bgb.box\Bgb6xkk2.BLD 
06-08-2020 15:04:20.849 SMS_NOTIFICATION_MANAGER Successfully processed file E:\Program Files\Microsoft Configuration Manager\inboxes\bgb.box\Bgb6xkk2.BLD 
06-08-2020 15:04:20.849 SMS_NOTIFICATION_MANAGER Successfully processed file Bgb6xkk2.BLD, clean it. 
06-08-2020 15:04:20.850 SMS_NOTIFICATION_MANAGER Begin to get file list to process 
06-08-2020 15:04:20.851 SMS_NOTIFICATION_MANAGER BgbManager is waiting for file and registry change notification or timeout after 60 seconds 
06-08-2020 15:05:20.852 SMS_NOTIFICATION_MANAGER Wait for events timed out after 60 seconds.

If you would like to get the list of all devices with current Pending Restart status, you can run the following SQL-query:

Select ClientState, Name from vSMS_CombinedDeviceResources

If you would like to create the collection with devices that need to be rebooted, you can use the following WQL-query:

select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,
SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,
SMS_R_SYSTEM.Client from SMS_R_System join sms_combineddeviceresources on
sms_combineddeviceresources.resourceid = sms_r_system.resourceid
where sms_combineddeviceresources.clientstate != 0

List of ClientState with description

0 No reboot Pending
1 Configuration Manager
2 File Rename
3 Configuration Manager, File Rename
4 Windows Update
5 Configuration Manager, Windows Update
6 File Rename, Windows Update
7 Configuration Manager, File Rename, Windows Update
8 Add or Remove Feature
9 Configuration Manager, Add or Remove Feature
10 File Rename, Add or Remove Feature
11 Configuration Manager, File Rename, Add or Remove Feature
12 Windows Update, Add or Remove Feature
13 Configuration Manager, Windows Update, Add or Remove Feature
14 File Rename, Windows Update, Add or Remove Feature
15 Configuration Manager, File Rename, Windows Update, Add or Remove Feature

 

Useful links:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s