Hi, this should hopefully give you what your after:
((New-Object -ComObject "Microsoft.Update.ServiceManager").Services | Where {$_.Name -eq 'Windows Update'}).IsDefaultAUService
Cheers
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I Need help with the below PowerShell command to query the value of Windows Update "IsDefaultAUService"
PS C:\Users\Administrator> $(New-Object -ComObject "Microsoft.Update.ServiceManager").Services
Output of this command
Name : Microsoft Update
ContentValidationCert : {}
ExpirationDate :
IsManaged : False
IsRegisteredWithAU : True
IssueDate : 1/1/1601 12:00:00 AM
OffersWindowsUpdates : True
RedirectUrls : System.__ComObject
ServiceID : 7971f918-a847-4430-9279-4a52d1efe18d
IsScanPackageService : False
CanRegisterWithAU : True
ServiceUrl : https://fe2cr.update.microsoft.com/v6/
SetupPrefix : mu
IsDefaultAUService : True
Name : DCat Flighting Prod
ContentValidationCert : {}
ExpirationDate :
IsManaged : False
IsRegisteredWithAU : False
IssueDate : 1/1/1601 12:00:00 AM
OffersWindowsUpdates : True
RedirectUrls : System.__ComObject
ServiceID : 8b24b027-1dee-babb-9a95-3517dfb9c552
IsScanPackageService : False
CanRegisterWithAU : False
ServiceUrl : https://fe3cr.delivery.mp.microsoft.com/
SetupPrefix : wu
IsDefaultAUService : False
Name : Windows Store (DCat Prod)
ContentValidationCert : {}
ExpirationDate :
IsManaged : False
IsRegisteredWithAU : False
IssueDate : 1/1/1601 12:00:00 AM
OffersWindowsUpdates : False
RedirectUrls : System.__ComObject
ServiceID : 855e8a7c-ecb4-4ca3-b045-1dfa50104289
IsScanPackageService : False
CanRegisterWithAU : True
ServiceUrl : https://fe3cr.delivery.mp.microsoft.com/
SetupPrefix : ws
IsDefaultAUService : False
Name : Windows Update
ContentValidationCert : {}
ExpirationDate :
IsManaged : False
IsRegisteredWithAU : False
IssueDate : 1/1/1601 12:00:00 AM
OffersWindowsUpdates : True
RedirectUrls : System.__ComObject
ServiceID : 9482f4b4-e343-43b6-b170-9a65bc822c77
IsScanPackageService : False
CanRegisterWithAU : True
ServiceUrl : https://fe2cr.update.microsoft.com/v6/
SetupPrefix : wu
IsDefaultAUService : False
I need help with a PowerShell command to only provide me with the value of "IsDefaultAUService" of this service from above Output "Name= Windows Update"
Hi, this should hopefully give you what your after:
((New-Object -ComObject "Microsoft.Update.ServiceManager").Services | Where {$_.Name -eq 'Windows Update'}).IsDefaultAUService
Cheers
Is there a corresponding CIM (WIM) object also?
rgds Christian