Posted by Eswar Koneti on 27th February 2013
Long ago ,written SCCM report to list packages not used for 6 months as part of Package Archival process http://eskonr.com/2012/11/sccm-configmgr-package-archival-process-cleanup-activity/ .This report tells you to take further action to clean or move to Archive folder to wait for some more months before it goes for Deletion.
What next ? Delete these packages from Assigned DPs to get some disk space ?
You may find several scripts to do this task on the internet but, i find this is easy for me to get this activity done.
Identify list of package which you want to remove ,pipe them to notepad .You can do more customizations if needed.
‘Script to delete packages from its assigned Distribution Points.
strComputer =inputBox("Please Enter the SMS provider OR Site where the packages are created" , "SCCM Server name")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set packages=fso.OpenTextFile("C:\PACKAGESTODELETE.txt",1,true)
Set objoutputfile=fso.OpenTextFile("C:\DP_results.txt",2,true)
Do While packages.AtEndOfLine <> True
‘read the next line
package = packages.Readline
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\SMS\site_CEN")
if err.number<>0 then
msgbox "server connection failed"
wscript.quit
end if
Set colItems = objWMIService.ExecQuery("SELECT * FROM SMS_DistributionPoint where packageid=’" & Package & "’")
For Each objItem in colItems
‘Wscript.Echo "ServerNALPath: " & objItem.ServerNALPath
objoutputfile.WriteLine ( package & vbTab & " will be deleteting from" & VBTAB & objItem.ServerNALPath)
objitem.Delete_
If Err.number <> 0 Then
objoutputfile.WriteLine ( "Failed to delete" & vbTab & package & "from" & vbTab & objItem.ServerNALPath)
End If
Next
loop
msgbox "Done"
Note: Please Replace the quotes.
Tags: configmgr, Delete packages from DP, Distribution Point delete packages, SCCM, script, VB Script to remove packages from Assigned DP
Posted in CM2012, ConfigMgr (SCCM), Configmgr2012, Distribution Point, SCCM 2007, SCCM 2012, SCCM Tools, Scripting, Software Distribution, System Center 2012 Configuration Manager, WMI | 1 Comment »
Posted by Eswar Koneti on 7th January 2013
Status of Specific Advertisement can get from Default available report but what if you want to find the status of specific advertisement with its LastAcceptanceStatusTime greater or less than X days.
Full Details :http://social.technet.microsoft.com/Forums/en-US/configmgrreporting/thread/30e4dbda-982b-43dc-8665-8dd142925d4f
DECLARE @olddate datetime
,@NullVal datetime
SET @olddate = DATEADD(day,-5, GETUTCDATE())
select adv.AdvertisementName ‘Application’, sys.Name0 ‘System’, LastAcceptanceStateName ‘Acceptance’,
sts.LastAcceptanceStatusTime ‘AcceptTime_GMT’, sts.LastStatusMessageIDName ‘ExecutionStatus’,
sts.LastStateName ‘ExecutionState’,sts.LastStatusTime ‘ExecutionTime_GMT’,
adt.MessageName,sts.LastExecutionResult
from v_ClientAdvertisementStatus sts
join v_AdvertisementStatusInformation adt on adt.MessageID=sts.LastStatusMessageID
join v_Advertisement adv on adv.AdvertisementID=sts.AdvertisementID
join v_R_System sys on sys.ResourceID=sts.ResourceID
where ((sts.LastAcceptanceStatusTime < @olddate) or (sts.LastStatusTime < @olddate))
and adv.AdvertisementName like ‘%Adobe_reader_Eng%’ and sts.LastExecutionResult like ‘1603‘
order by sys.Name0
Change the number of days and Advertisement Name.
Note: Please change the Quotes ,blog converts them as fancy here.
Tags: advertisement status, cm, configmgr, configmgr report, errocode, LastAcceptanceStatusTime, LastStatusTime, sccm report, SQL
Posted in CM2012, ConfigMgr (SCCM), SCCM 2007, SCCM Reports, SQL Quiries | No Comments »
Posted by Eswar Koneti on 13th December 2012
Collection to check if any of Primary or Secondary site not installed with SUP Role or any other Role?
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 where SMS_R_System.SystemRoles like "SMS Site System" and SMS_R_System.ResourceId not in (select ResourceID from SMS_R_System where SMS_R_System.SystemRoles like "SMS Software Update Point")
Collection can be modified to check if any of the Roles is missing on sites.
Tags: CM07, Collection, configmgr, sccm collection, SCCM Collection for Site Role missing, Site role not installed, SUP Role, SUP role missing
Posted in Collections, SCCM 2007, SCCM 2012, WQL Quiries | No Comments »
Posted by Eswar Koneti on 23rd September 2012
Tags: configmgr, SCCM
Posted in Daily Digest | No Comments »
Posted by Eswar Koneti on 16th September 2012
Tags: configmgr, SCCM
Posted in Daily Digest | No Comments »
Posted by Eswar Koneti on 15th August 2012
Thought of sharing nice post on Task sequence replication issue to child site by Frank Rojas.
Symptoms :
When creating a new Task Sequence or updating an existing Task Sequence on a parent primary site in System Center Configuration Manager 2007, the Task Sequence may not replicate down to child primary sites. Packages and other Task Sequences replicate to the child primary site without issue.
Examining the logs associated with site replication (despool.log, replmgr.log, sched.log, sender.log) on both the parent and child primary sites does not reveal any errors. However examining the distmgr.log on the child primary site reveals the following errors:
Processing incoming file <ConfigMgr_Install_Directory>\inboxes\distmgr.box\INCOMING\<Random>.PKG. SMS_DISTRIBUTION_MANAGER
Adding package <Task_Sequence_ID> to the active package array. SMS_DISTRIBUTION_MANAGER
Adding these contents to the package <Task_Sequence_ID> version <x>. SMS_DISTRIBUTION_MANAGER
Updated replicated package info for package <Task_Sequence_ID> SMS_DISTRIBUTION_MANAGER
Failed to insert SMS Program ID <y> because the referenced program <Software_Package_ID>-<Software_Program_Name> is not present in the PkgPrograms table. Will try later. SMS_DISTRIBUTION_MANAGER
Cannot update the package program for package <Task_Sequence_ID> in the package source, error = 40 SMS_DISTRIBUTION_MANAGER
Removing package <Task_Sequence_ID> from the active package array. SMS_DISTRIBUTION_MANAGER
Cause
This issue is caused by a software package specified in the Task Sequence not replicating down to the child primary site. Any other Task Sequence that also has the problematic software package will also not replicate to child primary sites. However any Task Sequence that does not have the problematic software package will replicate to child primary sites without issues.
The problematic software package will be contained in the distmgr.log in the following line:
Failed to insert SMS Program ID <y> because the referenced program <Software_Package_ID>-<Software_Program_Name> is not present in the PkgPrograms table. Will try later.
Use the package ID and package name to identify the problematic software package.
Please note that not replicating to the child primary site means that information about the software package has not been replicated to the child primary site. It does not mean that the software package has not been copied to the child primary site’s Distribution Point.
There could be several reasons why the software package has not replicated to the child primary site, but usually the cause is that the software package has a bad property in it such as invalid path to its source files.
Read Complete post on http://blogs.technet.com/b/system_center_configuration_manager_operating_system_deployment_support_blog/archive/2012/06/29/a-system-center-configuration-manager-2007-task-sequence-does-not-replicate-to-a-child-site.aspx
Tags: configmgr, does not replicate, SCCM, SCCM 2007, Task Sequence, Task Sequence replication issue, to Child Site
Posted in OS Deployment, SCCM 2007, Task Sequence, Trobleshooting Tips, Troubleshooting Issues | No Comments »
Posted by Eswar Koneti on 7th August 2012
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"
Tags: configmgr, delete expired updates, SCCM, SCCM 2007, script, script deleteexpiredupdates
Posted in Patch Reports, SCCM 2007, Scripting, Software Updates | No Comments »
Posted by Eswar Koneti on 21st June 2012
Listing down Technical videos on SCCM 2012 (system center 2012 Configuration Manager) and other technical stuff for quick reference . Thanks to Johan(Deploymentartist).
ConfigMgr 2012 Software Distribution Part 1 – With Wally Mead
Run in Full Screen and HD (720). Courtesy of Deployment Artist and Knowledge Factory – Breakout sessions presented by Wally Mead during the Deployment Road show in Sweden. The video recordings are from the event in Stockholm, December 1, 2011.
ConfigMgr 2012 Software Distribution Part 2 – With Wally Mead :
Part 2.Run in Full Screen and HD (720). Courtesy of Deployment Artist and Knowledge Factory – Breakout sessions presented by Wally Mead during the Deployment Roadshow in Sweden. The video recordings are from the event in Stockholm, December 1, 2011.
A Geeks guide to the Galaxy — Building a SC 2012 Configuration Manager OS Deployment Solution :
The uber-demo spaceship has landed in Oslo! Join Johan Arwidmark in an hour live demo on how to build a Windows 7 deployment solution, based on ConfigMgr 2012 and MDT 2012 Zero Touch, from scratch to finish
From NIC2012 in Oslo, presented by Johan Arwidmark
SC 2012 Configuration Manager OSD – Tips & Tricks from the Deployment Masters:
This is what you always wanted to know about OS Deployments using MDT 2012 and ConfigMgr 2012, but no one told you about until now… You will learn how to extend ConfigMgr 2012 and MDT 2012 with custom scripts and frontends, workaround current limitations, work with the deployment database and web services. We bring you Enterprise customizations to use in every size of network.
Inside Windows 8 — Mastering the Setup Engine :
This session dives deep into the Windows 8 setup engine, explains the driver store, log files, device driver ranking, and much more. It goes deep into the configuration passes, the Windows Servicing Stack, Windows System Image Manager, and Deployment Image Service and Management (DISM). You can expect lots of tips, tricks, and live demos in this session.
From NIC2012 in Oslo, presented by Johan Arwidmark
Inside Windows 8 — The new Assessment and Deployment Kit (ADK):
The Windows Automated Installation Kit (WAIK) is being replaced by Assessment and Deployment Kit (ADK) in the Windows 8 timeframe. Join Johan Arwidmark guiding you through the new features, including WinPE 4.0, Performance Assessment and much more.
From NIC2012 in Oslo, presented by Johan Arwidmark
Tags: ADK, Config mgr 2012, configmgr, Configmgr 2012 Videos, SCCM 2012 Videos, Software distribution Videos, Wally Mead, windows 8
Posted in SCCM Videos | No Comments »
Posted by Eswar Koneti on 19th June 2012
The standard way to remove Advertised app-v applications from client machines is to set expiration of the advertisement /deletion with setting “remove this package from client when no longer advertised” and it should work though it takes a while but this procedure doesn’t work.
Recently had an issue with App-v Applications(machines having both msi and app due to which some settings may not work ) where in these apps are not removed from client machines though advertisement is “expired” and checked “ Remove this package from client when no longer advertised” from package properties . Also deleted the advertisement to see if the app-v package disappears or not but no result.
Note : Streaming option is not enabled on DP.
Searched everywhere and tried many possibilities to make this work but did not find anything for the root cause.
So came up with simple batch script that checks if the app-v package is available on the machine or not if exist ,it will remove from the cache completely.
If you have advertisement which is still enable and run on the machine,you will be back with app-v application so ensure you expire the advertisement or not to rerun the advertisement on the machine /do not make the computer as member of app-v collection.
You can simply create program with below batch script and advertise onto collection where you don’t want this app to be.
Bold Letters require changes what you need with respect to applications.
REM Script to remove the app-v applications from machine
REM Written by eskonr 19-06-2012
Set RegQry=HKLM\Hardware\Description\System\CentralProcessor\0
REG.exe Query %RegQry% | Find /i "x86"
If %ERRORLEVEL% == 0 (
GOTO X86
) ELSE (
GOTO X64
)
:X86
cd "C:\Program Files\Microsoft Application Virtualization Client"
sftmime.exe remove app:"Adobe Reader" /complete
GOTO END
)
:X64
Set RegQry="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\SoftGrid\4.5\Client\Applications\Adobe Reader"
REG.exe Query %RegQry% | Find /i "Adobe Reader"
If %ERRORLEVEL% == 0 (
cd "C:\Program Files (x86)\Microsoft Application Virtualization Client"
sftmime.exe remove app:"Adobe Reader" /complete
GOTO END
)
:END
if you have any other better way to do this or why standard way doesn’t work ,please post your comments.
Hope it helps someone who is having similar issue
.
Tags: app-v packages are not removing, configmgr, issue with app-v packages, remove app-v packages from sccm client machines, SCCM 2007, script to remove appv packages sccm, System center configuration Manager
Posted in SCCM 2007, Scripting, Software Distribution, WMI | 3 Comments »
Posted by Eswar Koneti on 19th June 2012
was looking at machine to see what advertisements /packages are targeted to sccm client though you can get this information directly from SCCM reports if you have access else wrote a simple script which gives you what packages with program name,Command line used ,ADV ID,Package ID information.
ON ERROR RESUME NEXT
Set fso=CreateObject("scripting.filesystemobject")
‘create text file with list of computers what you need
Set objinputfile=fso.OpenTextFile("computers.txt",1,True)
‘pipe the results into output.txt file
Set objoutputfile=fso.OpenTextFile("Output.txt",2,True)
‘Read the input file until end of line
Do While objinputfile.AtEndOfLine <> True
strcomputer=objinputfile.ReadLine
objoutputfile.WriteLine(strcomputer)
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\ccm\Policy\Machine")
Set Colitems = objWMIService.ExecQuery("SELECT * FROM CCM_SoftwareDistribution")
For Each objItem in colItems
objoutputfile.WriteLine("———————————–")
objoutputfile.WriteLine("ADV_AdvertisementID: " & objItem.ADV_AdvertisementID)
objoutputfile.WriteLine("PKG_Name: " & objItem.PKG_Name)
objoutputfile.WriteLine("PKG_PackageID: " & objItem.PKG_PackageID)
next
Loop
msgbox("DONE")
Routine Note: Please change the quotes from the script as blog changes them to Fancy quotes.
Tags: Advertisements, configmgr, configuration Manager, Package ID, Packages, SCCM, SCCM 2007, script sccm advertisements targetted to machine, VB script for sccm advertisements avilable
Posted in SCCM 2007, SCCM 2012, Scripting, Software Distribution, WMI | 2 Comments »