Tuesday, 26 September 2017

Custom Status Message Queries for Monitor OS Deployment




Like in SCCM 2007, there is no option to monitor OS deployment in SCCM 2012, but we can create a custom status message query to view the status of OD deployment.


Below query will help to monitor OS deployment,



select stat.*, ins.*, att1.*, att1.AttributeTime from  SMS_StatusMessage as stat left join SMS_StatMsgInsStrings as ins on ins.RecordID = stat.RecordID left join SMS_StatMsgAttributes as att1 on att1.RecordID = stat.RecordID inner join SMS_StatMsgAttributes as att2 on att2.RecordID = stat.RecordID where att2.AttributeID = 401 and att2.AttributeValue = "Deployment ID" and stat.SiteCode = "Site Code" and att2.AttributeTime >= ##PRM:SMS_StatMsgAttributes.AttributeTime## order by att1.AttributeTime DESC

Default Status Message Queries



In SCCM 2012 there are few default status message queries are available , which will help us view audit status of boundaries, collections, deployments, packages, programs, remote control activity, security roles, server components and site systems, totally they have 41 default queries.



Thursday, 21 September 2017

Find Collection Membership Information of a Specific Client Machine (SSRS Report)


How to create SSRS report in SCCM 2012 using report builder


  • ·Go to SCCM console – Reports – Create report


  •       After click next report will open up in Report Builder.


  •       Right click on Data sets and click Add Data set
  •       Select Use dataset embedded in my report and select data source. Type the above query as follows


select a.CollectionId, b.Name from dbo.v_R_System r
join dbo.v_FullCollectionMembership a on R.ResourceID = a.ResourceID
join dbo.v_Collection b on b.CollectionID = a.CollectionID
Where R.Name0 =@machine
  •  Click fields and click ok
  •  Right click on Data Sets and click Add Data Set again. Fill the details as follows and press OK
select Name0 from v_R_System
  •         Right Click on report, where the empty area of report page and select properties. Go to reference tab, Click ADD on assemblies
  •          Add following assemblie  –  SrsResources, culture=neutral And Click OK

  • Go to parameters and now you can see there are two parameters. machine and UserSIDs. Right click on UserSIDs and select properties

  • Select parameter properties – Internal Default values, select specific value and ADD

Value – =SrsResources.UserIdentity.GetUserSIDs(User!UserID)



  •       Go to insert and select table
  •        Select dataset 1 and next

  •        Now you can run the report on SSRS

Thursday, 14 September 2017

Failed to create Stand Alone Media - SCCM OSD (Storage Issue)



When you create standalone media, the process storage all data to the temporary location until it complete the task.

If you don’t have enough space in temp location , normally C drive the stand alone media creation will fail with the below error


Solution

Now you need to either increase the C drive space or change the temp storage location to another drive


Control Panel -> System and Security -> Advanced System Settings and click Environment Variables

And Edit the Temp variable in the user profile to a folder on another drive with more space.



Friday, 18 August 2017

SCCM OSD - DISM Commands

Get the WIM file information

Dism /Get-WIMInfo /WimFile:D:\BootImage\New.wim  

Mount / Unmount WIM file

Dism /Mount-WIM /WimFile:D:\New.wim /Name:"Microsoft Windows PE (x86)" /MountDir:c:\temp /rw  

Save the changes and close the WIM file

Dism /Unmount-WIM /MountDir:c:\temp\newmount /Commit 

Close the WIM file without saving the changes

Dism /Unmount-WIM /MountDir:c:\temp\newmount /Discard 

Export the driver information to a specific location

DISM /Image:C:\temp\newmount /Export-Driver /Destination:C:\temp\export2  

Adding multiple packages to mounted wim file

Dism /Image:E:\Win7build\Mount /Add-Package /PackagePath:E:\Win7build\HotFixes\x64\Windows6.1-KB982018-x64.msu /PackagePath:E:\Win7build\HotFixes\x64\Windows6.1-KB974090-x64.msu /PackagePath:E:\Win7build\HotFixes\x64\Windows6.1-KB974476-v2-x64.msu /PackagePath:E:\Win7build\HotFixes\x64\Windows6.1-KB975500-x64.msu /PackagePath:E:\Win7build\HotFixes\x64\Windows6.1-KB975599-x64.msu /PackagePath:E:\Win7build\HotFixes\x64\Windows6.1-KB975617-x64.msu /PackagePath:E:\Win7build\HotFixes\x64\Windows6.1-KB975778-x64.msu /PackagePath:E:\Win7build\HotFixes\x64\Windows6.1-KB975806-x64.msu /PackagePath:E:\Win7build\HotFixes\x64\Windows6.1-KB976755-x64.msu /PackagePath:E:\Win7build\HotFixes\x64\Windows6.1-KB977632-x64.msu /PackagePath:E:\Win7build\HotFixes\x64\Windows6.1-KB978258-x64.msu /PackagePath:E:\Win7build\HotFixes\x64\Windows6.1-KB978526-x64.msu

Remove the driver from Wim file

Dism /Image:E:\Mount /Remove-Driver /Driver:iusb3xhc.inf /Driver:OEM15

Add multiple drivers from specific location

Dism /Image:c:\temp\newmount /Add-Driver /Driver:c:\temp\export /Recurse /forceunsigned 

Get all driver information

Dism /Image:E:\Mount /get-drivers /all /format:table >winpe.txt



Friday, 9 June 2017

Windows Update Client Error



Software Update Error 0x80004005 on client systems

You will be seeing the below error on log files,

UpdatesDeployment.log, WindowsUpdate.log, WUAHandler.log




unable to find or read WUA Managed server policy.
Unable to read existing WUA Group Policy object. Error = 0x80004005

Its basically a GPO issue, C:\Windows\System32\GroupPolicy\Machine\registry.pol file is missing or corrupted, do a GPUpdate /force will create a new registry.pol file. After that restart the windows update service will start the scan working good


Failed to end search job Error 0x80072ee2


The possible fix is to copy and export an specific registry entry on a working machine



HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections

After restart the windows update service you can see the the sccm client connect the sup server correctly.

Wednesday, 7 June 2017

SCCM Collection Query – Duplicate Machines


This collection query will show you the duplicate host name records.



select R.ResourceID,R.ResourceType,R.Name,R.SMSUniqueIdentifier,R.ResourceDomainORWorkgroup,R.Client from SMS_R_System as r   full join SMS_R_System as s1 on s1.ResourceId = r.ResourceId   full join SMS_R_System as s2 on s2.Name = s1.Name   where s1.Name = s2.Name and s1.ResourceId != s2.ResourceId

🔍SCCM (MECM) RAS Assessment

  SCCM (MECM) RAS Assessment – Comprehensive Checklist 1️⃣ Site Infrastructure & Core Health ✔ Site Server Component Status Site c...