2016년 2월 11일 목요일

Windows Update Error with 0x80073712

https://support.microsoft.com/en-us/kb/957310

Summary
When you try to install updates from Windows Update or Microsoft Update, you may receive error 0x80073712, and the update does not install.

This issue may occur if the Component-Based Servicing (CBS) manifest is corrupted.
Resolution

Windows 8.1 or Windows 8

Step 1: Use System File Checker to repair damaged Windows files

Use the System File Checker tool to repair damaged Windows files. To do this, follow these steps:
  1. Open an elevated command prompt.
  2. Run the "sfc /scannow" command.
  3. Try to install update again.
For more information about the System File Checker tool, view Use the System File Checker tool to repair missing or corrupted system files.

Step 2: Run the DISM tool

If the problem continues, use the Deployment Image Servicing and Management (DISM) tool to fix Windows Update corruption errors. To do this, follow these steps:
  1. Open an elevated command prompt.
  2. Run the "DISM.exe /Online /Cleanup-image /Restorehealth" command.
    Important When you run this command, DISM uses Windows Update to provide the files that are required to fix corruptions. However, if your Windows Update client is already broken, use a running Windows installation as the repair source, or use a Windows side-by-side folder from a network share or from a removable media, such as the Windows DVD, as the source of the files. To do this, run the following command instead: 
    DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:C:\RepairSource\Windows /LimitAccess
    Note Replace the C:\RepairSource\Windows placeholder with the location of your repair source. For more information about using the DISM tool to repair Windows, see Repair a Windows Image.
To learn more about this tool, go to Fix Windows corruption errors by using the DISM or System Update Readiness tool.

Windows 7 or Windows Vista

Step 1: Use System File Checker to repair damaged Windows files

Use the System File Checker tool to repair damaged Windows files. To do this, follow these steps:
  1. Open an elevated command prompt.
  2. Run the "sfc /scannow" command.
  3. Try to install update again.
For more information about the System File Checker tool, view Use the System File Checker tool to repair missing or corrupted system files.

Step 2: Run the System Update Readiness tool

If the problem continues, use the System Update Readiness tool to fix Windows corruption errors.

Windows XP

Use the System File Checker tool to repair damaged Windows files. To do this, follow these steps:
  1. Open an elevated command prompt.
  2. Run the "sfc /scannow" command.
  3. Try to install update again.
For more information about the System File Checker tool, view Description of Windows XP and Windows Server 2003 System File Checker (Sfc.exe).
Properties

SCCM - Configuration Manager 2012 Client Command List

https://www.systemcenterdudes.com/configuration-manager-2012-client-command-list/

WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule "{00000000-0000-0000-0000-000000000121}" /NOINTERACTIVE
WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule "{00000000-0000-0000-0000-000000000003}" /NOINTERACTIVE
WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule "{00000000-0000-0000-0000-000000000010}" /NOINTERACTIVE
WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule "{00000000-0000-0000-0000-000000000001}" /NOINTERACTIVE
WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule "{00000000-0000-0000-0000-000000000021}" /NOINTERACTIVE
WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule "{00000000-0000-0000-0000-000000000022}" /NOINTERACTIVE
WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule "{00000000-0000-0000-0000-000000000002}" /NOINTERACTIVE
WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule "{00000000-0000-0000-0000-000000000031}" /NOINTERACTIVE
WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule "{00000000-0000-0000-0000-000000000108}" /NOINTERACTIVE
WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule "{00000000-0000-0000-0000-000000000113}" /NOINTERACTIVE
WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule "{00000000-0000-0000-0000-000000000111}" /NOINTERACTIVE
WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule "{00000000-0000-0000-0000-000000000026}" /NOINTERACTIVE
WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule "{00000000-0000-0000-0000-000000000027}" /NOINTERACTIVE
WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule "{00000000-0000-0000-0000-000000000032}" /NOINTERACTIVE

I recently found in our infrastructure that a lot of new Windows Server 2012 Core Edition were installed for specific reason. This edition can cause some problems to administrators that are not aware of SCCM commands.
Here is the list of actions that will be covered in this post:
  • Configuration Manager client services and properties
  • Configuration Manager agent scan trigger
  • EndPoint Protection client installation and properties
  • Logs directory
There’s a lot of commands that can be execute but I will give you the minimum to remember.
From ‘cmd’, type those commands for configuration manager.

Configuration Manager Client Scan Trigger with WMI

You can also trigger agent from WMI command line if you don’t want to open the configuration manager properties.

Troubleshooting

Make sure to run those commands as administrator else you will receive an access denied error message.
Configuration Manager 2012 Client Command List 01
If the execution is successful, you should see something like this.
Configuration Manager 2012 Client Command List 02

Configuration Manager Client Scan Trigger with Powershell

*** Update : 2014-10-30 *** Thanks to MaxFlipz for this addition.
Powershell can also be used to launch scans on clients whether local or remote. Simply use the commandInvoke-WMIMethod:
$Server = Server Name where you want to run the trigger. You can remove -ComputerName if you are locally on the server.

Endpoint Protection Client Installation and Properties

*** Update : 2015-05-08 ***
You can install an EndPoint Protection client locally on a machine with FEPInstall.exe. Simply copy the file somewhere locally on the device and execute with an elevated command prompt.
You can refer to TechNet for more details about FEPInstall.
You can manage a local EndPoint Protection client with MpCmdRun.exe. This table shows switches that can be used with the command line.
Use MpCmdRun alone to see additional information about the switches.
You will receive a return code if you use switch -Scan.
  • 0 if no malware is found or successfully remediated
  • if malware is found and not remediated

Logs

You can find configuration manager logs in C:\Windows\CCM\Logs for any troubleshoot orC:\Windows\CCMSetup for installation logs.
You are now ready to troubleshoot client on a Windows Server 2012 Core Edition.

Windows Update error 80070308 solution

Windows Update error 80070308 solution

First, use FixIt for Windows update and try delete or rename %windir%/SoftwareDistribution

If rename SoftwareDistribution not solve the problem, try this:

1. Open Regedit
2. Go to HKLM\Components
3. Delete or rename REG_DWORD "pendingrequired=1"
4. Profit!

2016년 2월 4일 목요일

SCCM - Get all Workstations with Internet Explorer 9 or 10 (WQL)

http://it.peikkoluola.net/2014/01/10/get-all-workstations-with-internet-explorer-9-or-10-wql/

Get all Workstations with Internet Explorer 9 or 10 (WQL)


Purpose: Gather all workstations with Internet Explorer 9 or 10
Gathing all of the Internet Explorer versions across your domain will require one additional configuration. This configuration is a client side software inventory setting, where you set the SCCM client to search through all your workstations iexplorer.exe and fetch the version from the appointed file.

How to set SCCM to gather all of your Workstations Internet Explorer versions
#1Administration\Overview\Client Settings
#2Client Settings: Software Inventory Enabled
#3Select Software Inventory
#4iexplore.exe (for x86 Internet Explorer)
c:\Program Files (x86)\Internet Explorer\
iexplorer.exe (for x64 Internet Explorer)
c:\Program Files\Internet Explorer\

Get all Workstations with Internet Explorer 9
Limiting collection: All Workstations (with Client)
Resource Class: System Resource
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 inner join SMS_G_System_SoftwareProduct on SMS_G_System_SoftwareProduct.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareProduct.ProductVersion like “9.%” and SMS_G_System_SoftwareProduct.ProductName like “%Internet Explorer%”

Get all Workstations with Internet Explorer 10
Limiting collection: All Workstations (with Client)
Resource Class: System Resource
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 inner join SMS_G_System_SoftwareProduct on SMS_G_System_SoftwareProduct.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareProduct.ProductVersion like “10.%” and SMS_G_System_SoftwareProduct.ProductName like “%Internet Explorer%”