PowerShell - Find Bluetooth Device Connectivity Status - windows

How can I find the value of "is connected" for a Bluetooth device? I've tried Get-WMIObject cmdlets and a few others but none of the values changed when I connect/disconnect. The only place I have found the value to change is in the attached image. I found it in the Device Properties for the Bluetooth Headset I am trying to use.
I'm trying to write a toggle script for AutoHotKey to send btcom commands, but I would like to write an if statement with that. The piece I'm missing here is finding the value of "is connected" on my Bluetooth device.
Example of output from Get-WMIObject:
PS H:\> Get-WmiObject -Query "select * from win32_PnPEntity where Caption='Jordan's AirPods Pro'"
__GENUS : 2
__CLASS : Win32_PnPEntity
__SUPERCLASS : CIM_LogicalDevice
__DYNASTY : CIM_ManagedSystemElement
__RELPATH : Win32_PnPEntity.DeviceID="BTHENUM\\DEV_14C88BC438FE\\7&2D1C6A81&0&BLUETOOTHDEVICE_14C88BC438FE"
__PROPERTY_COUNT : 26
__DERIVATION : {CIM_LogicalDevice, CIM_LogicalElement, CIM_ManagedSystemElement}
__SERVER : OL-2TK93103QK
__NAMESPACE : root\cimv2
__PATH : \\OL-2TK93103QK\root\cimv2:Win32_PnPEntity.DeviceID="BTHENUM\\DEV_14C88BC438FE\\7&2D1C6A81&0&BLUETOOTHDEVICE_14C88BC438FE"
Availability :
Caption : Jordan’s AirPods Pro
ClassGuid : {e0cbf06c-cd8b-4647-bb8a-263b43f0f974}
CompatibleID : {BTHENUM\GENERIC_DEVICE}
ConfigManagerErrorCode : 0
ConfigManagerUserConfig : False
CreationClassName : Win32_PnPEntity
Description : Bluetooth Device
DeviceID : BTHENUM\DEV_14C88BC438FE\7&2D1C6A81&0&BLUETOOTHDEVICE_14C88BC438FE
ErrorCleared :
ErrorDescription :
HardwareID : {BTHENUM\Dev_14C88BC438FE}
InstallDate :
LastErrorCode :
Manufacturer : Microsoft
Name : Jordan’s AirPods Pro
PNPClass : Bluetooth
PNPDeviceID : BTHENUM\DEV_14C88BC438FE\7&2D1C6A81&0&BLUETOOTHDEVICE_14C88BC438FE
PowerManagementCapabilities :
PowerManagementSupported :
Present : True
Service :
Status : OK
StatusInfo :
SystemCreationClassName : Win32_ComputerSystem
SystemName : OL-2TK93103QK
PSComputerName : OL-2TK93103QK
PS H:\>

Related

baseboard asset tag on windows smbios

I am trying to retrieve the asset tag which is set through libvirt xml on a KVM based windows VM using wmic. I have tried all possibilities but could not find a way to get the baseboard asset tag. I have researched and figured a utility online called dmidecode for windows.
Here is the snippet from libvirt xml
<sysinfo type='smbios'>
<baseBoard>
<entry name='asset'>45af54c9-e9d9-9dc1-b999-956c76548999</entry>
</baseBoard>
</sysinfo>
Is there a way I can retrieve the asset tag of baseboard using wmic tool or any other tool (other than dmidecode)
This is what I got so far with but the tag is defaulted to Base Board
PS C:\Users\Administrator> Get-CimInstance -ClassName Win32_BaseBoard -Property *
Status : OK
Name : Base Board
PoweredOn : True
Caption : Base Board
Description : Base Board
InstallDate :
CreationClassName : Win32_BaseBoard
Manufacturer :
Model :
OtherIdentifyingInfo :
PartNumber :
SerialNumber :
SKU :
Tag : Base Board
Version : pc-i440fx-4.2
Depth :
Height :
HotSwappable : False
Removable : False
Replaceable : False
Weight :
Width :
HostingBoard : True
RequirementsDescription :
RequiresDaughterBoard : False
SlotLayout :
SpecialRequirements :
ConfigOptions :
Product : Standard PC (i440FX + PIIX, 1996)
PSComputerName :
CimClass : root/cimv2:Win32_BaseBoard
CimInstanceProperties : {Caption, Description, InstallDate, Name...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties```

How to force systeminfo output to english to parse it using Powershell?

I have this simple string of code:
$TotalMemory = (systeminfo | Select-String 'Total Physical Memory:').ToString().Split(':')[1].Trim()
$TotalMemory = $TotalMemory -replace (",", "")
$TotalMemory = $TotalMemory -replace ("MB", "")
$TotalMemory | Set-Content ".\build\txt\ram.txt"
Which gathers RAM. Works fine. The issue is that I have a user that uses a Russian version of Windows, which the output is in Russian. Is there a way I can force, just for that command, the output of systeminfo to english, so it can be parsed?
At least within the same windows version the header count of systeminfo should be the same.
So using the /FO csv and /NH options you can force output in csv format without headers and supply the English version or numbered columns i.e.
Windows 10 English vs. Col#, German
$SystemInfoHeadersEn = (
"Host Name",# Col0 Hostname
"OS Name",# Col1 Betriebssystemname
"OS Version",# Col2 Betriebssystemversion
"OS Manufacturer",# Col3 Betriebssystemhersteller
"OS Configuration",# Col4 Betriebssystemkonfiguration
"OS Build Type",# Col5 Betriebssystem-Buildtyp
"Registered Owner",# Col6 Registrierter Benutzer
"Registered Organization",# Col7 Registrierte Organisation
"Product ID",# Col8 Produkt-ID
"Original Install Date",# Col9 Ursprüngliches Installationsdatum
"System Boot Time",# Col10 Systemstartzeit
"System Manufacturer",# Col11 Systemhersteller
"System Model",# Col12 Systemmodell
"System Type",# Col13 Systemtyp
"Processor(s)",# Col14 Prozessor(en)
"BIOS Version",# Col15 BIOS-Version
"Windows Directory",# Col16 Windows-Verzeichnis
"System Directory",# Col17 System-Verzeichnis
"Boot Device",# Col18 Startgerät
"System Locale",# Col19 Systemgebietsschema
"Input Locale",# Col20 Eingabegebietsschema
"Time Zone",# Col21 Zeitzone
"Total Physical Memory",# Col22 Gesamter physischer Speicher
"Available Physical Memory",# Col23 Verfügbarer physischer Speicher
"Virtual Memory: Max Size",# Col24 Virtueller Arbeitsspeicher: Maximale Größe
"Virtual Memory: Available",# Col25 Virtueller Arbeitsspeicher: Verfügbar
"Virtual Memory: In Use",# Col26 Virtueller Arbeitsspeicher: Zurzeit verwendet
"Page File Location(s)",# Col27 Auslagerungsdateipfad(e)
"Domain",# Col28 Domäne
"Logon Server",# Col29 Anmeldeserver
"Hotfix(s)",# Col30 Hotfix(es)
"Network Card(s)",# Col31 Netzwerkkarte(n)
"Hyper-V Requirements"# Col32 Anforderungen für Hyper-V
)
That returns the information in an object, but still has localized/user settings dependent values (decimal point/comma, date format)
> $SystemInfo = systeminfo.exe /FO csv /NH |ConvertFrom-Csv -Header $SystemInfoHeadersEn
> $systeminfo.'Total Physical Memory'
16.349 MB
Or
> $SystemInfo = systeminfo.exe /FO csv /NH |ConvertFrom-Csv -Header (0..32|%{"Col$_"})
> $systeminfo.col22
16.349 MB
i do not know how to set the language for SysInfo, but there are other ways to get the same info. this will get the RAM reported by the CIM_ComputerSystem class. that number is reported in bytes, so dividing by 1GB gives that number in GB. [grin]
$Ram_GB = [math]::Round((Get-CimInstance -ClassName CIM_ComputerSystem).TotalPhysicalMemory / 1GB, 2)
$Ram_GB
output = 8 on my system.
For me a workaround to replace systeminfo.exe (which delivers the language specific output) was the usage of the following command:
powershell -Command gcim CIM_ComputerSystem -Property *
Which delivers something like:
AdminPasswordStatus : 3
BootupState : Normal boot
ChassisBootupState : 3
KeyboardPasswordStatus : 3
PowerOnPasswordStatus : 3
PowerSupplyState : 3
PowerState : 0
FrontPanelResetStatus : 3
ThermalState : 3
Status : OK
Name : MYPC
PowerManagementCapabilities :
PowerManagementSupported :
Caption : MYPCPW
Description : AT/AT COMPATIBLE
InstallDate :
CreationClassName : Win32_ComputerSystem
NameFormat :
PrimaryOwnerContact :
PrimaryOwnerName :
Roles : {LM_Workstation, LM_Server, NT}
InitialLoadInfo :
LastLoadInfo :
ResetCapability : 1
AutomaticManagedPagefile : True
AutomaticResetBootOption : True
AutomaticResetCapability : True
BootOptionOnLimit :
BootOptionOnWatchDog :
BootROMSupported : True
BootStatus : {0, 0, 0, 0...}
ChassisSKUNumber : Notebook
CurrentTimeZone : 120
DaylightInEffect : True
DNSHostName : MYPCPW
Domain :
DomainRole : 1
EnableDaylightSavingsTime : True
HypervisorPresent : False
InfraredSupported : False
Manufacturer : Dell Inc.
Model : Precision 5530
NetworkServerModeEnabled : True
NumberOfLogicalProcessors : 12
NumberOfProcessors : 1
OEMLogoBitmap :
OEMStringArray : {Dell System, 1[087D], 3[1.0], 12[www.dell.com]...}
PartOfDomain : True
PauseAfterReset : -1
PCSystemType : 2
PCSystemTypeEx : 2
ResetCount : -1
ResetLimit : -1
SupportContactDescription :
SystemFamily : Precision
SystemSKUNumber : 087D
SystemStartupDelay :
SystemStartupOptions :
SystemStartupSetting :
SystemType : x64-based PC
TotalPhysicalMemory : 34079059968
UserName : uidg1234
WakeUpType : 6
Workgroup :
PSComputerName :
CimClass : root/cimv2:Win32_ComputerSystem
CimInstanceProperties : {Caption, Description, InstallDate, Name...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
Additional Information might be reached via:
powershell -Command gcim CIM_Chip -Property *
powershell -Command gcim WIN32_Bios -Property *

How do you get PCIe bus/device/function from a \\.\SCSI handle?

I have a \\.\SCSI#: handle created via CreateFile(). I know it points to a specific HBA or (in my case) NVMe Controller. It must have a Bus/Device/Function associated with it's enumeration.
So far I've tried to figure this out via wmi, though I'm more than open to a C solution via WinApi. (actually would prefer a solution in C).
By getting an object using:
gwmi -namespace root\cimv2 -class Win32_SCSIController | format-list *
It yields my NVMe device like so:
PSComputerName : DESK
Status : OK
Name : Standard NVM Express Controller
StatusInfo : 3
__GENUS : 2
__CLASS : Win32_SCSIController
__SUPERCLASS : CIM_SCSIController
__DYNASTY : CIM_ManagedSystemElement
__RELPATH : Win32_SCSIController.DeviceID="PCI\\VEN_1987&DEV_5008&SUBSYS_50081987&REV_01\\4&CB74546&0&00E8"
__PROPERTY_COUNT : 31
__DERIVATION : {CIM_SCSIController, CIM_Controller, CIM_LogicalDevice, CIM_LogicalElement...}
__SERVER : DESK
__NAMESPACE : root\cimv2
__PATH : \\DESK\root\cimv2:Win32_SCSIController.DeviceID="PCI\\VEN_1987&DEV_5008&SUBSYS_50081987&REV_01\\4&CB74546&0&00E8"
Availability : 3
Caption : Standard NVM Express Controller
ConfigManagerErrorCode : 0
ConfigManagerUserConfig : False
ControllerTimeouts :
CreationClassName : Win32_SCSIController
Description : Standard NVM Express Controller
DeviceID : PCI\VEN_1987&DEV_5008&SUBSYS_50081987&REV_01\4&CB74546&0&00E8
DeviceMap :
DriverName : stornvme
ErrorCleared :
ErrorDescription :
HardwareVersion :
Index :
InstallDate :
LastErrorCode :
Manufacturer : Standard NVM Express Controller
MaxDataWidth :
MaxNumberControlled :
MaxTransferRate :
PNPDeviceID : PCI\VEN_1987&DEV_5008&SUBSYS_50081987&REV_01\4&CB74546&0&00E8
PowerManagementCapabilities :
PowerManagementSupported :
ProtectionManagement :
ProtocolSupported : 2
SystemCreationClassName : Win32_ComputerSystem
SystemName : DESK
TimeOfLastReset :
Scope : System.Management.ManagementScope
Path : \\DESK\root\cimv2:Win32_SCSIController.DeviceID="PCI\\VEN_1987&DEV_5008&SUBSYS_50081987&REV_01\\4&CB74546&0&00E8"
Options : System.Management.ObjectGetOptions
ClassPath : \\DESK\root\cimv2:Win32_SCSIController
Properties : {Availability, Caption, ConfigManagerErrorCode, ConfigManagerUserConfig...}
SystemProperties : {__GENUS, __CLASS, __SUPERCLASS, __DYNASTY...}
Qualifiers : {dynamic, Locale, provider, UUID}
Site : :
Notice how the Index is blank... I figured that this would have been the number in \.\SCSI#:
Playing a little more, I can get the Bus/Device/Function from this:
$a = gwmi -namespace root\cimv2 -class Win32_PnPEntity -filter "DeviceId='PCI\\VEN_1987&DEV_5008&SUBSYS_50081987&REV_01\\4&CB74546&0&00E8'"
$a.GetDeviceProperties('DEVPKEY_Device_LocationInfo').deviceProperties.Data
PCI bus 5, device 0, function 0
I also thought about calling IOCTL_SCSI_GET_ADDRESS on the \\.\SCSI#: handle, though that doesn't work (which sort of makes sense since it isn't a lun-handle, but rather a controller one)
How do I associate a PCIe Bus/Device/Function info with the \\.\SCSI#: handle?

Emails sent from Server1 reaches the destination from Server 2

Question
Outbound emails sent through EXCH-S01 or EXCH-S02 are always routed to EXCH-S02 before leaving the organization network in Exchange 2010 DAG. Why?
Configuration
This is a simple DAG with two exchange servers and a fileshare witness (not included in the figure). S1 and S2 are the exchange servers hosting OWA1 and OWA2 respectively.
System Information
Send Connector: Internet
AddressSpaces : {SMTP:*;1}
AuthenticationCredential :
Comment :
ConnectedDomains : {}
ConnectionInactivityTimeOut : 00:10:00
DNSRoutingEnabled : True
DomainSecureEnabled : False
Enabled : True
ErrorPolicies : Default
ForceHELO : False
Fqdn : email.fabrikam.ca
HomeMTA : Microsoft MTA
HomeMtaServerId : EXCH-S02
Identity : Internet
IgnoreSTARTTLS : False
IsScopedConnector : False
IsSmtpConnector : True
LinkedReceiveConnector :
MaxMessageSize : unlimited
Name : Internet
Port : 25
ProtocolLoggingLevel : None
RequireOorg : False
RequireTLS : False
SmartHostAuthMechanism : None
SmartHosts : {}
SmartHostsString :
SmtpMaxMessagesPerConnection : 20
SourceIPAddress : 0.0.0.0
SourceRoutingGroup : Exchange Routing Group (DWBGZMFD01QNBJR)
SourceTransportServers : {EXCH-S02, EXCH-S01}
TlsAuthLevel :
TlsDomain :
UseExternalDNSServersEnabled : True
Receive Connector "EXCH-S02\From EXCH-S01"
RunspaceId : c5d80334-209b-4974-b6ef-105e3db469b4
AuthMechanism : Tls, Integrated, BasicAuth, BasicAuthRequireTLS, ExchangeServer
Banner :
BinaryMimeEnabled : True
Bindings : {0.0.0.0:25}
ChunkingEnabled : True
DefaultDomain :
DeliveryStatusNotificationEnabled : True
EightBitMimeEnabled : True
BareLinefeedRejectionEnabled : False
DomainSecureEnabled : False
EnhancedStatusCodesEnabled : True
LongAddressesEnabled : False
OrarEnabled : False
SuppressXAnonymousTls : False
AdvertiseClientSettings : False
Fqdn : EXCH-S02.fabrikam.ca
Comment :
Enabled : True
ConnectionTimeout : 00:10:00
ConnectionInactivityTimeout : 00:05:00
MessageRateLimit : unlimited
MessageRateSource : IPAddress
MaxInboundConnection : 5000
MaxInboundConnectionPerSource : 20
MaxInboundConnectionPercentagePerSource : 100
MaxHeaderSize : 64 KB (65,536 bytes)
MaxHopCount : 60
MaxLocalHopCount : 8
MaxLogonFailures : 3
MaxMessageSize : 10 MB (10,485,760 bytes)
MaxProtocolErrors : 5
MaxRecipientsPerMessage : 200
PermissionGroups : ExchangeUsers, ExchangeServers, ExchangeLegacyServers
PipeliningEnabled : True
ProtocolLoggingLevel : None
RemoteIPRanges : {10.1.0.3, 10.1.0.1}
RequireEHLODomain : False
RequireTLS : False
EnableAuthGSSAPI : False
ExtendedProtectionPolicy : None
LiveCredentialEnabled : False
TlsDomainCapabilities : {}
Server : EXCH-S02
SizeEnabled : EnabledWithoutValue
TarpitInterval : 00:00:05
MaxAcknowledgementDelay : 00:00:30
AdminDisplayName :
ExchangeVersion : 0.1 (8.0.535.0)
Name : From EXCH-S01
DistinguishedName : CN=From EXCH-S01,CN=SMTP Receive Connectors,CN=Protocols,CN=EXCH-S02,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=fabrikam,CN=
Microsoft Exchange,CN=Services,CN=Configuration,DC=fabrikam,DC=ca
Identity : EXCH-S02\From EXCH-S01
Guid : a040ff87-900f-4a21-ad68-c9c095940686
ObjectCategory : fabrikam.ca/Configuration/Schema/ms-Exch-Smtp-Receive-Connector
ObjectClass : {top, msExchSmtpReceiveConnector}
WhenChanged : 4/8/2017 9:10:54 AM
WhenCreated : 1/21/2012 10:15:06 PM
WhenChangedUTC : 4/8/2017 1:10:54 PM
WhenCreatedUTC : 1/22/2012 3:15:06 AM
OrganizationId :
OriginatingServer : DC01.fabrikam.ca
IsValid : True
Exchange Server EXCH-S01
RunspaceId : c5d80334-209b-4974-b6ef-105e3db469b4
Name : EXCH-S01
DataPath : D:\Exchange Server\V14\Mailbox
Domain : fabrikam.ca
Edition : Enterprise
ExchangeLegacyDN : /o=fabrikam/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=EXCH-S01
ExchangeLegacyServerRole : 0
Fqdn : EXCH-S01.fabrikam.ca
CustomerFeedbackEnabled :
InternetWebProxy :
IsHubTransportServer : True
IsClientAccessServer : True
IsExchange2007OrLater : True
IsEdgeServer : False
IsMailboxServer : True
IsE14OrLater : True
IsProvisionedServer : False
IsUnifiedMessagingServer : False
NetworkAddress : {ncacn_vns_spp:EXCH-S01, netbios:EXCH-S01, ncacn_np:EXCH-S01, ncacn_spx:EXCH-S01, ncacn_ip_tcp:EXCH-S01.fabrikam.ca, ncalrpc:EXCH-S01}
OrganizationalUnit : fabrikam.ca/EXCH-S01
AdminDisplayVersion : Version 14.3 (Build 123.4)
Site : fabrikam.ca/Configuration/Sites/fabrikam
ServerRole : Mailbox, ClientAccess, HubTransport
ErrorReportingEnabled :
StaticDomainControllers : {}
StaticGlobalCatalogs : {}
StaticConfigDomainController :
StaticExcludedDomainControllers : {}
CurrentDomainControllers : {}
CurrentGlobalCatalogs : {}
CurrentConfigDomainController :
ProductID : 02064-110-8022196-75615
IsExchange2007TrialEdition : False
IsExpiredExchange2007TrialEdition : False
RemainingTrialPeriod : 00:00:00
IsValid : True
ExchangeVersion : 0.1 (8.0.535.0)
DistinguishedName : CN=EXCH-S01,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=fabrikam,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=fabrikam,DC=
ca
Identity : EXCH-S01
Guid : 72736c62-2931-4128-bca5-73b233142f3b
ObjectCategory : fabrikam.ca/Configuration/Schema/ms-Exch-Exchange-Server
ObjectClass : {top, server, msExchExchangeServer}
WhenChanged : 4/8/2017 5:23:00 PM
WhenCreated : 5/21/2011 8:29:21 PM
WhenChangedUTC : 4/8/2017 9:23:00 PM
WhenCreatedUTC : 5/22/2011 12:29:21 AM
OrganizationId :
OriginatingServer : DC01.fabrikam.ca
Exchange Server EXCH-S02
RunspaceId : c5d80334-209b-4974-b6ef-105e3db469b4
Name : EXCH-S02
DataPath : D:\Exchange Server\V14\Mailbox
Domain : fabrikam.ca
Edition : Enterprise
ExchangeLegacyDN : /o=fabrikam/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=EXCH-S02
ExchangeLegacyServerRole : 0
Fqdn : EXCH-S02.fabrikam.ca
CustomerFeedbackEnabled :
InternetWebProxy :
IsHubTransportServer : True
IsClientAccessServer : True
IsExchange2007OrLater : True
IsEdgeServer : False
IsMailboxServer : True
IsE14OrLater : True
IsProvisionedServer : False
IsUnifiedMessagingServer : False
NetworkAddress : {ncacn_vns_spp:EXCH-S02, netbios:EXCH-S02, ncacn_np:EXCH-S02, ncacn_spx:EXCH-S02, ncacn_ip_tcp:EXCH-S02.fabrikam.ca, ncalrpc:EXCH-S02}
OrganizationalUnit : fabrikam.ca/EXCH-S02
AdminDisplayVersion : Version 14.3 (Build 123.4)
Site : fabrikam.ca/Configuration/Sites/fabrikam
ServerRole : Mailbox, ClientAccess, HubTransport
ErrorReportingEnabled :
StaticDomainControllers : {}
StaticGlobalCatalogs : {}
StaticConfigDomainController :
StaticExcludedDomainControllers : {}
CurrentDomainControllers : {}
CurrentGlobalCatalogs : {}
CurrentConfigDomainController :
ProductID : 02064-110-8022196-75900
IsExchange2007TrialEdition : False
IsExpiredExchange2007TrialEdition : False
RemainingTrialPeriod : 00:00:00
IsValid : True
ExchangeVersion : 0.1 (8.0.535.0)
DistinguishedName : CN=EXCH-S02,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=fabrikam,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=fabrikam,DC=
ca
Identity : EXCH-S02
Guid : 0f25a4ee-2e54-4c9c-840d-a1ab5f107cfa
ObjectCategory : fabrikam.ca/Configuration/Schema/ms-Exch-Exchange-Server
ObjectClass : {top, server, msExchExchangeServer}
WhenChanged : 9/20/2014 10:20:32 AM
WhenCreated : 1/21/2012 5:58:57 PM
WhenChangedUTC : 9/20/2014 2:20:32 PM
WhenCreatedUTC : 1/21/2012 10:58:57 PM
OrganizationId :
OriginatingServer : DC01.fabrikam.ca
I will be happy to provide more information if required.
What I've done so far
Reset the activation preference.
Noticed HomeMtaServerId set to EXCH-S02 in the send connector. But realized Exchnage Server 2010 does not use that parameter anymore.
I am very eager to find out what is causing this.

Why is Windows DSC LCM running every 5 hours

I have two servers running Windows DSC that should both be running every 15 min but one is running correctly and the other is running ever 5 hours for some reason yet to be discovered. Here are the two LCM configurations:
The one that works:
PS C:\WINDOWS\system32> Get-DSCLocalConfigurationManager
ActionAfterReboot : ContinueConfiguration
AgentId : 420E62A0-FE64-11F5-9732-003ADC065DC3
AllowModuleOverWrite : False
CertificateID :
ConfigurationDownloadManagers : {}
ConfigurationID : 82xx1e91-4bz8-4fe4-b8dc-o73bc77c8756
ConfigurationMode : ApplyAndAutoCorrect
ConfigurationModeFrequencyMins : 15
Credential :
DebugMode : {NONE}
DownloadManagerCustomData : {MSFT_KeyValuePair (key = "ServerUrl"), MSFT_KeyValuePair (key =
"AllowUnsecureConnection")}
DownloadManagerName : WebDownloadManager
LCMCompatibleVersions : {1.0, 2.0}
LCMState : Idle
LCMStateDetail :
LCMVersion : 2.0
StatusRetentionTimeInDays : 10
PartialConfigurations :
RebootNodeIfNeeded : False
RefreshFrequencyMins : 30
RefreshMode : Pull
ReportManagers : {}
ResourceModuleManagers : {}
PSComputerName :
The one that is not:
PS C:\WINDOWS\system32> Get-DSCLocalConfigurationManager
ActionAfterReboot : ContinueConfiguration
AllowModuleOverWrite : False
CertificateID :
ConfigurationDownloadManagers : {}
ConfigurationID : 814b8ec2-7c1b-2359-8342-4ec23a4e576b
ConfigurationMode : ApplyAndAutoCorrect
ConfigurationModeFrequencyMins : 15
Credential :
DebugMode : {NONE}
DownloadManagerCustomData : {MSFT_KeyValuePair (key = "ServerUrl"), MSFT_KeyValuePair (key =
"AllowUnsecureConnection")}
DownloadManagerName : WebDownloadManager
LCMCompatibleVersions : {1.0, 2.0}
LCMState : Idle
LCMStateDetail :
LCMVersion : 2.0
StatusRetentionTimeInDays : 10
PartialConfigurations :
RebootNodeIfNeeded : False
RefreshFrequencyMins : 30
RefreshMode : Pull
ReportManagers : {}
ResourceModuleManagers : {}
PSComputerName :
Not sure why the second one is running ever 5 hours as it looks to be configured for every 15 min.... any ideas?
If it is WMF 5.0 RTM, you can check the configuration frequency settings as seen by the timers itself using:
get-winevent -LogName Microsoft-Windows-DSC/Operational | where {$_.Id -eq 4309}
This event contains information about the frequency of the timer as seen by the timer that triggers the consistency.
If the value is not 15 min, perform Set-DscLocalConfigurationManager again on the affected node and check the event again.
If the value is 15 min, look for 2 more events indicating a consistency run( you want the one with flag 1 for consistency check):
get-winevent -LogName Microsoft-Windows-DSC/Operational | where {($_.Id -eq 4343)-or ($_.Id -eq 4312)}

Resources