Tuesday, September 10, 2024

Unable to open the specified WIM file. ---> System.Exception: Unable to open the specified WIM file

MDT


FIX: 

The workaround is to copy amd64 folder (default path is C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment) and then change the name to x86.


Solution 2 : Install ADT for Windows 10 2004 and PE Add ons, it worked for me.

Tuesday, August 24, 2021

Solved: The EXECUTE permission was denied on the object ‘xp_sqlagent_notify’, database ‘mssqlsystemresource’, schema ‘sys’

 

Solved: The EXECUTE permission was denied on the object ‘xp_sqlagent_notify’, database ‘mssqlsystemresource’, schema ‘sys’



Step 1: Connect the SQL Server using SQL Server Management Studio (SSMS).

Step 2: Click New Query from the Tool menu, paste below query and execute it.


USE master
GO
GRANT EXECUTE ON master.dbo.xp_sqlagent_notify TO RSExecRole
GO
GRANT EXECUTE ON master.dbo.xp_sqlagent_enum_jobs TO RSExecRole
GO
GRANT EXECUTE ON master.dbo.xp_sqlagent_is_starting TO RSExecRole
GO

USE msdb
GO
GRANT EXECUTE ON msdb.dbo.sp_help_category TO RSExecRole
GO
GRANT EXECUTE ON msdb.dbo.sp_add_category TO RSExecRole
GO
GRANT EXECUTE ON msdb.dbo.sp_add_job TO RSExecRole
GO
GRANT EXECUTE ON msdb.dbo.sp_add_jobserver TO RSExecRole
GO
GRANT EXECUTE ON msdb.dbo.sp_add_jobstep TO RSExecRole
GO
GRANT EXECUTE ON msdb.dbo.sp_add_jobschedule TO RSExecRole
GO
GRANT EXECUTE ON msdb.dbo.sp_help_job TO RSExecRole
GO
GRANT EXECUTE ON msdb.dbo.sp_delete_job TO RSExecRole
GO
GRANT EXECUTE ON msdb.dbo.sp_help_jobschedule TO RSExecRole
GO
GRANT EXECUTE ON msdb.dbo.sp_verify_job_identifiers TO RSExecRole
GO
GRANT SELECT ON msdb.dbo.sysjobs TO RSExecRole
GO
GRANT SELECT ON msdb.dbo.syscategories TO RSExecRole
GO

This query will grant the permission to report server database role (RSExecRole) to create a subscription job and schedule it. Now, you just try to create a new subscription on SSRS report and hope you can do it.

Friday, July 10, 2020

Software update group based Patch compliance report + SQL QUERY

Found useful so sharing it.

=======================================================================

SQL QUERY : 

Select name0 AS [Machine Name], sys.User_Name0, ui.Title AS [Patch Title], (CASE ucs.status WHEN 2 THEN 'Required' WHEN 1 THEN 'NOT REQUIRED' WHEN 0 THEN 'INSTALL STATE UNKNOWN' WHEN 3 THEN 'Installed' END) AS [Install Status] , dbo.v_AuthListInfo.Title as [Update Group],
ui.ArticleID, (CASE UI.IsExpired WHEN 0 THEN 'NOT EXPIRED' WHEN 1 THEN 'EXPIRED' END) AS [EXPIRY], (CASE UI.IsSuperseded WHEN 0 THEN 'NOT Superseded' WHEN 1 THEN 'Superseded' END) AS [SEPERSEDENCE] ,  (CASE ui.Severity WHEN 0 then 'none' when 2 then 'low' WHEN 6 then 'MODERATE' WHEN 8 THEN 'IMPORTANT' WHEN 10 THEN 'CRITICAL' END) AS [SEVERITY] , ui.DatePosted AS DateReleased, ucs.LastStatusChangeTime AS DateInstalled
FROM dbo.v_ClientCollectionMembers INNER JOIN
dbo.v_R_System AS sys ON dbo.v_ClientCollectionMembers.ResourceID = sys.ResourceID LEFT OUTER JOIN
dbo.v_CIRelation INNER JOIN
dbo.v_UpdateInfo AS ui INNER JOIN
dbo.v_UpdateComplianceStatus AS ucs ON ui.CI_ID = ucs.CI_ID ON dbo.v_CIRelation.ToCIID = ui.CI_ID INNER JOIN
dbo.v_AuthListInfo ON dbo.v_CIRelation.FromCIID = dbo.v_AuthListInfo.CI_ID ON sys.ResourceID = ucs.ResourceID
GROUP BY sys.Name0, ui.IsExpired, UI.IsSuperseded, ucs.status, ui.Severity, dbo.v_AuthListInfo.Title, dbo.v_ClientCollectionMembers.CollectionID, sys.User_Name0, ui.ArticleID, ui.Title, ui.DatePosted , ucs.LastStatusChangeTime
HAVING (ui.IsExpired = 0) AND
(dbo.v_AuthListInfo.Title like 'Name of SUG') AND (dbo.v_ClientCollectionMembers.CollectionID like 'collectionID')
ORDER BY sys.Name0
========================================================================

Ref: https://www.attosol.com/sccm-custom-sql-query-for-patch-compliance/


Wednesday, November 20, 2019

SCCM Distribution Point log Message Error 0x800706BA

Here is the way to fix this error. What you need to do is parse a MOF file on the target server on which you are installing the Distribution Point role. You need to look for smsdpprov.mof file which is found  in "<drive:>Program Files\Microsoft Configuration Manager\bin\X64" in your primary site server. Copy it to any drive or in a folder on the target DP server. Run the command prompt as administrator and execute the following command.

mofcomp.exe smsdpprov.mof

Note – MOF is a file extension for a Windows Management Object file format. MOF files created in the Managed Object Format have syntax based on Microsoft Visual C++.  MOF files can be compiled into the Windows Management Instrumentation (WMI) repository using mofcomp.exe.
In the below screenshot you can see that after running this command you see that MOF file has been successfully parsed.  This will create the WMI name space and after this step you should be able to install the DP without any issues. Don’t be afraid if it initially fails in the Distribution Point Configuration section in monitoring, just be patient and give it some time.


Saturday, November 25, 2017

SCCM SQL Query to capture CPU information



SELECT
DISTINCT(CPU.SystemName0) AS [System Name],
CPU.Manufacturer0 AS Manufacturer,
CPU.Name0 AS Name,
COUNT(CPU.ResourceID) AS [Number of CPUs],
CPU.NumberOfCores0 AS [Number of Cores per CPU],
CPU.NumberOfLogicalProcessors0 AS [Logical CPU Count]
FROM [dbo].[v_GS_PROCESSOR] CPU
GROUP BY
CPU.SystemName0,
CPU.Manufacturer0,
CPU.Name0,
CPU.NumberOfCores0,
CPU.NumberOfLogicalProcessors0

Friday, April 14, 2017

SCCM report for IIS installed with version details on servers

Hi all ,Another report to find out the servers where IIS is installed with the version of it.this assumes that ,you have enabled the inventory agent and set the properties for .exe to not exclude windows folder.If you select exclude files from windows directory,you will not see any results in the report because inetmgr.exe will be located in windows folder.

SQL SCCM query:
select distinct a.Name0,c.FileVersion from v_R_System a inner join
v_GS_SERVICE b on b.ResourceID = a. ResourceID inner join
v_GS_SoftwareFile c on c.ResourceID=a.ResourceID
where b.DisplayName0 like 'World Wide Web%' and
a.Operating_System_Name_and0 like '%Server%'  and
c.FileName ='inetmgr.exe'
Order by a.Name0,c.FileVersion 

Ref: http://eskonr.com/2010/05/sccm-report-for-computers-with-iis-installed-on-servers/

Wednesday, March 22, 2017

Setup was unable to compile the file DiscoveryStatus.mof The error code is 8004100E

SCCM Client installation issue and fix:

Error code: DiscoveryStatus.mof The error code is 8004100E

Just try this remediation step.
1. Open CMD in the administrator command prompt
2. Navigate to C:\Program Files\Microsoft Policy Platform
3. mofcomp ExtendedStatus.mof
4. Retry the CM client installation

Ref: https://social.technet.microsoft.com/Forums/en-US/1f48e8d8-4e13-47b5-ae1b-dcb831c0a93b/setup-was-unable-to-compile-the-file-discoverystatusmof-the-error-code-is-8004100e?forum=configmanagerdeployment