Long ago Raphael blogged nice post how to delete expired updates from Configuration Manager 2007 http://wmug.co.uk/wmug/b/dotraphael/archive/2012/04/19/script-deleteexpiredupdates.aspx but script is not available to download now with current link. This script is intended to remove all expired updates from a package or Deployment and was showed by the MVP Kent Agerlund on his presentation at MMS 2012 http://blog.coretech.dk/kea/mms-2012-simplify-your-deployments/ If you'd like to try (at your own risk), you can download it from here (just remember to remove _.txt to convert to vbs) Examples: cscript.exe DeleteExpiredUpdates.vbs /SMSProvider:CM01 /PkgID:"A010000E" cscript.exe DeleteExpiredUpdates.vbs /SMSProvider:CM01 /AssignmentID:"1;2;3;4;5;6;7;8;9" cscript.exe DeleteExpiredUpdates.vbs /SMSProvider:CM01 /PkgID:"A010000E" /AssignmentID:"1;2;3;4;5;6;7;8;9"
Author: Eswar Koneti
If you are performing SCCM cleanup activity on packages,this might help you to identify if there are any packages still available on DPs rather looking at each package manually also to check how many DP’s each package available so you can distribute the package to missing DP’s(if you have standards to ensure all packages should be on X many DP’s) SELECT PackageID, Name, Version, Manufacturer, Language, Description,PkgSourcePath , LastRefreshTime, (SELECT COUNT(PkgID) FROM vPkgStatusSummaryDistPts WHERE PkgID = v_Package.PackageID) AS [Total Number of DP’s] FROM v_Package order by [Total Number of DP’s] desc P.S :Quotes in this post are fancy quotes,please replace…
Script to check files on remote computer and delete them if they are available. ON ERROR RESUME NEXT Set objfso = CreateObject ("Scripting.FileSystemObject") Set computerList = objfso.OpenTextFile ("C:\Scripts\computerList.txt", 1) Set outputList = objfso.OpenTextFile ("C:\Scripts\outputList.txt", 2, True) Do While Not computerList.AtEndOfStream strComputer = computerList.ReadLine If objFSO.FolderExists("\\" & strComputer & "\F$\oldfiles") Then Set strFolderPath = objFSO.GetFolder("\\" & strComputer & "\f$\oldfiles") objFSO.DeleteFolder strFolderPath, True outputList.WriteLine strComputer & vbTab & "oldfiles folder deleted" Else outputList.WriteLine strComputer & vbTab & "Oldfiles folder does not exist" End If loop Change the Bold letters as necessary.
Sometimes pushing app-v Application doesn't work on some machines and when looked at virtualapp.log file,you will see something like below. “Failed to open the WMI namespace [root\microsoft\appvirt\client]” from C:\Windows\SysWOW64\CCM\Logs\VirtualApp.log. What does the above Error says ? The WMI namespace was not created during the install of the App-V Client. You can verify it by typing wmimgmt.msc from your RUN command . If You want to connect to Remote Computer ,try below. Right click on the WMI Control and select properties, click on the Security Tab: Go to Root—>Microsoft ,you see appvirt is missing from it. So ? How do you…
Microsoft Office 2013 (Office 15.0) is now available for consumers !! For download, click HERE and for MSDN members HERE Languages pack and others download http://search.microsoft.com/en-us/DownloadResults.aspx?q=office%202013&ftapplicableproducts=^Office Deployment guide for Office 2013 Preview download : http://download.microsoft.com/download/4/8/B/48B0E72E-11C0-4E6E-AA23-6B777FADCF7A/Deployment-guide-for-Office-2013-Preview.pdf To read more about System Requirements ,visit http://technet.microsoft.com/en-us/library/ee624351(office.15).aspx Original post, please read http://www.system-center.fr/?p=3240
I had requirement to check for some specific packages if their programs are used in any other packages or not . Take an example that ,Microsoft visual C++ is prereq for multiple applications and to know what packages used this specific VC++ ,it will be hard to find all parent packages using VC++ as dependency program. How do we get list of all packages that are using specific application as dependency ? in this case it is VC++. In SCCM ,depedent programs are stored in view called 'v_Program' with column name 'DependentProgram' .So we can use this view to…
This script requires one notepad file(Input) with list of machines you need for and output(CSV Format) will be opened once the script runs. Set fso=CreateObject("scripting.filesystemobject") Set objinputfile=fso.OpenTextFile("eskonr.txt",1,True) Set objoutputfile=fso.OpenTextFile("servicestatus.csv",2,True) Do While objinputfile.AtEndOfLine <> True strcomputer=objinputfile.ReadLine Set objWMIService = GetObject("winmgmts:"_ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colRunningServices = objWMIService.ExecQuery("Select * from Win32_Service WHERE DisplayName like 'SMS Agent Host'") objoutputfile.WriteLine("computer name:" & strcomputer) For Each objService in colRunningServices If Len(objservice.displayname) >= 40 Then objoutputfile.WriteLine(Left(objService.DisplayName,40)&vbTab & objService.State) Else objoutputfile.WriteLine(objService.DisplayName & Space(40-Len(objService.DisplayName))& vbtab& objService.State) 'Wscript.Echo objService.DisplayName & VbTab & objService.State End if …
Full Details : http://social.technet.microsoft.com/Forums/en-US/configmgrreporting/thread/188bb324-9217-4fa6-b814-06a3d353bf52 Boundary information (AD Site) added . select distinct v_GS_SYSTEM.Name0 as 'Computer Name',A.AD_Site_Name0, substring(AccountName0,charindex('Domain=',Accountname0)+8,(charindex('Name=',Accountname0)-charindex('Domain=',Accountname0)-10)) as 'Domain Name', substring(AccountName0,len(AccountName0)-charindex('"',reverse(AccountName0),2)+2,charindex('"',reverse(AccountName0),2)-2) as 'User Name' from v_GS_SYSTEM INNER JOIN v_GS_LocalAdmins ON v_GS_SYSTEM.ResourceID = v_GS_LocalAdmins.ResourceID INNER JOIN v_R_System A ON v_GS_SYSTEM.ResourceID=A.ResourceID JOIN v_FullCollectionMembership FCM on v_gs_system.ResourceID = FCM.ResourceID where (AccountName0 not like '%Administrator%' AND AccountName0 not like '%Domain Admins%') and FCM.CollectionID='SMSC1003'