SCCM 2012 – *.bat files are not being copied to distribution point

We’ve recently installed the new IntelSCS addon for AMT Vpro on SCCM 2012 -> https://downloadcenter.intel.com/Detail_Desc.aspx?lang=eng&DwnldID=20921

Couple of days ago I had this strange ticket form our application administrator, he told me that there is some sort of problem with IntelSCS package (that was automatically created by the IntelSCS addon). In workstation log I found information that file “Remote_Discover.bat” was not found:

workstation_error_log

That was bit of strange, additionally because this package was created by the addon itself.

The first step was to check if those files are in the distribution point, it appeared that all files, beside all *.bat files, were copied successfuly:

dp_files

I checked the source path in packade, it was ok. It was pointing to the “Local folder on site server” it was like E:\…. and was ok, the bat files was also there.

I reached to the bottom of my mind πŸ˜‰ and reminded that it might be something with that local paths, I have changed the path to “Network path (UNC name)“. After updating distribution point with that package – guess what :), it was ok now:

dp_files_bat

So if some of your files won’t distribute, firstly think about changing the path to the sources from LocalΒ  to UNC.

Advertisements

[SOLVED] SCCM 2012, “waiting for content” problem with ID 10035 and KB2840628

Lately I have received complaining from my colleagues from Helpdesk that no packages are being deployed on workstations.

All they saw is 0% of compliance and it didn’t seem to go any further.

I made a package with GIMP and deployed it to my workstation

I looked at my workstation’s logs, and this is what I have received in DataTransferService.log:

UpdateURLWithTransportSettings(): OLD URL – http://SCCMSRV01.domain.pl/SMS_MP DataTransferService 2013-08-02 10:52:28 44312 (0xAD18)
UpdateURLWithTransportSettings(): NEW URL – http://SCCMSRV01.domain.pl:80/SMS_MP DataTransferService 2013-08-02 10:52:28 44312 (0xAD18)
Added (source=.sms_pol?WRO20146-WRO0006A-9A35FD00.1_00,dest={1FEF9F05-C6EE-4825-ABA3-A0524765E569}.tmp) pair from manifest. DataTransferService 2013-08-02 10:52:28 44312 (0xAD18)
DTSJob {F7B9EB0E-F104-4A8F-B884-771D78205282} created to download from ‘http://SCCMSRV01.domain.pl:80/SMS_MP’ to ‘C:\Windows\CCM\Temp’. DataTransferService 2013-08-02 10:52:28 44312 (0xAD18)
DTSJob {F7B9EB0E-F104-4A8F-B884-771D78205282} in state ‘PendingDownload’. DataTransferService 2013-08-02 10:52:28 61696 (0xF100)
DTSFlag is 0x0000bc8a DataTransferService 2013-08-02 10:52:29 61696 (0xF100)
Exclude file list: DataTransferService 2013-08-02 10:52:29 61696 (0xF100)
Using branch cache option DataTransferService 2013-08-02 10:52:29 61696 (0xF100)
DTSJob {F7B9EB0E-F104-4A8F-B884-771D78205282} in state ‘DownloadingData’. DataTransferService 2013-08-02 10:52:29 61696 (0xF100)
DTSJob {F7B9EB0E-F104-4A8F-B884-771D78205282} in state ‘RetrievedData’. DataTransferService 2013-08-02 10:52:47 61672 (0xF0E8)
DTSJob {F7B9EB0E-F104-4A8F-B884-771D78205282} successfully completed download. DataTransferService 2013-08-02 10:52:47 61672 (0xF0E8)
DTSJob {F7B9EB0E-F104-4A8F-B884-771D78205282} in state ‘NotifiedComplete’. DataTransferService 2013-08-02 10:52:47 44312 (0xAD18)
DTS job {F7B9EB0E-F104-4A8F-B884-771D78205282} has completed:
Status : SUCCESS,
Start time : 08/02/2013 10:52:28,
Completion time : 08/02/2013 10:52:47,
Elapsed time : 18 seconds DataTransferService 2013-08-02 10:52:47 44312 (0xAD18)

So for me it seemed everything was allright, later I have checked the ContentTransferManager.log:

Starting CTM job {8BBAAE65-7549-4B57-8651-630B600FF7BC}. ContentTransferManager 2013-08-02 07:07:37 7428 (0x1D04)
Starting CTM job {AB9D3FC4-17FF-484B-BD7E-288BF695E026}. ContentTransferManager 2013-08-02 10:52:48 61696 (0xF100)
Created CTM job {AB9D3FC4-17FF-484B-BD7E-288BF695E026} for user S-1-5-18 ContentTransferManager 2013-08-02 10:52:48 61696 (0xF100)
Created and Sent Location Request ‘{E5143893-7C75-421E-898A-8C4DE7CE57FA}’ for package WRO0006A ContentTransferManager 2013-08-02 10:52:48 55380 (0xD854)
CTM job {AB9D3FC4-17FF-484B-BD7E-288BF695E026} entered phase CCM_DOWNLOADSTATUS_DOWNLOADING_DATA ContentTransferManager 2013-08-02 10:52:48 55380 (0xD854)
Queued location request ‘{E5143893-7C75-421E-898A-8C4DE7CE57FA}’ for CTM job ‘{AB9D3FC4-17FF-484B-BD7E-288BF695E026}’. ContentTransferManager 2013-08-02 10:52:48 55380 (0xD854)

Here also seemed to be ok, but after a while, it wasn’t going to Persisted locations for CTM job line, the next line should look like this:

Persisted locations for CTM job {56F1683C-F883-411E-B963-6A868147EA10}:
(LOCAL) http://SCCM01SRV.domain.pl/SMS_DP_SMSPKG$/Content_bc428407-54be-40f7-ab09-518d83f591c8.1 ContentTransferManager 2013-07-04 12:19:35 33744 (0x83D0)

So I looked at the execmgr.log

The logged on user is domain.pl\pawel.jarosz execmgr 2013-08-02 07:07:49 5392 (0x1510)
Requesting content from CAS for package WRO0006A version 1 execmgr 2013-08-02 10:52:48 61696 (0xF100)
Policy arrived for parent package WRO0006A program Gimp 2.8.4 execmgr 2013-08-02 10:52:48 61672 (0xF0E8)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID=”WRO0006A”,ProgramID=”Gimp 2.8.4″, actionType 6l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 2013-08-02 10:52:48 61672 (0xF0E8)
Raising event:
[SMS_CodePage(852), SMS_LocaleID(1045)]
instance of SoftDistProgramOfferReceivedEvent
{
AdvertisementId = “WRO20146”;
ClientID = “GUID:9CD52450-3D15-46D6-A907-0DBD7E2F4FE1”;
DateTime = “20130802085248.054000+000”;
MachineName = “WROPI01PJ”;
ProcessID = 5840;
SiteCode = “WRO”;
ThreadID = 61672;
};
execmgr 2013-08-02 10:52:48 61672 (0xF0E8)
Successfully created a content request handle {5257F3D8-DFF1-41C1-A7C1-73B91DA47E6D} for the package WRO0006A version 1 execmgr 2013-08-02 10:52:48 61696 (0xF100)
Program Gimp 2.8.4 change to state STATE_ADVANCED_DOWNLOAD content in progress execmgr 2013-08-02 10:52:48 61696 (0xF100)
Execution Request for advert WRO20146 package WRO0006A program Gimp 2.8.4 state change from NotExist to AdvancedDownload execmgr 2013-08-02 10:52:48 61696 (0xF100)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID=”WRO0006A”,ProgramID=”Gimp 2.8.4″, actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 2013-08-02 10:52:48 61696 (0xF100)
Mandatory execution requested for program Gimp 2.8.4 and advertisement WRO20146 execmgr 2013-08-02 10:52:48 61696 (0xF100)
Creating mandatory request for advert WRO20146, program Gimp 2.8.4, package WRO0006A execmgr 2013-08-02 10:52:48 61696 (0xF100)
Raising event:
[SMS_CodePage(852), SMS_LocaleID(1045)]
instance of SoftDistWaitingContentEvent
{
AdvertisementId = “WRO20146”;
ClientID = “GUID:9CD52450-3D15-46D6-A907-0DBD7E2F4FE1”;
DateTime = “20130802085248.144000+000”;
MachineName = “WROPI01PJ”;
PackageName = “WRO0006A”;
PackageVersion = “1”;
ProcessID = 5840;
ProgramName = “Gimp 2.8.4”;
SiteCode = “WRO”;
ThreadID = 61696;
};
execmgr 2013-08-02 10:52:48 61696 (0xF100)
Successfully raised SoftDistWaitingContentEvent event for program Gimp 2.8.4 execmgr 2013-08-02 10:52:48 61696 (0xF100)
Execution Request for advert WRO20146 package WRO0006A program Gimp 2.8.4 state change from WaitingDependency to WaitingContent execmgr 2013-08-02 10:52:48 61696 (0xF100)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID=”WRO0006A”,ProgramID=”Gimp 2.8.4″, actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 2013-08-02 10:52:48 61696 (0xF100)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID=”WRO0006A”,ProgramID=”Gimp 2.8.4″, actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 2013-08-02 10:52:48 62952 (0xF5E8)

So i was stupid now πŸ™‚ The entry says Program Gimp 2.8.4 change to state STATE_ADVANCED_DOWNLOAD content in progress but it isn’t!

I was googling a little bit more, and find this blog entry:

http://blogs.technet.com/b/configmgrteam/archive/2013/07/17/issues-reported-with-ms13-052-kb2840628-and-configmgr.aspx

“Issue 3: Configuration Manager 2007” says about issue I had, although it was saying about SCCM 2007 I decided to give it a shot πŸ™‚

To make change you need to make change is SQL Management studio on SCCM database:

sccmkberror

 

After that change, all tha packages started to be properly distributed to clients πŸ™‚

 

SCCM 2012 – Content distribution to Distribution Points – “Error during connection to SMS_DP$” and “0x80041013”.

Today one of mine colleagues from Helpdesk, asked me why one package hasn’t been distributed correctly to some Distribution Points. The PkgXferMgr.log said to me that:

There is no existing connection, Win32 error = 67 SMS_PACKAGE_TRANSFER_MANAGER 2013-06-28 02:37:49 9192 (0x23E8)
There is no existing connection, Win32 error = 67 SMS_PACKAGE_TRANSFER_MANAGER 2013-06-28 02:37:49 9192 (0x23E8)
Error during connection to \\DPJAS.DOMAIN.COM\SMS_DP$ (67). SMS_PACKAGE_TRANSFER_MANAGER 2013-06-28 02:37:49 9192 (0x23E8)
Error is considered fatal. SMS_PACKAGE_TRANSFER_MANAGER 2013-06-28 02:37:49 9192 (0x23E8)
Cannot connect to server DPJAS.DOMAIN.COM at remote site DPJAS.DOMAIN.COM, won’t try send requests going to site DPJAS.DOMAIN.COM for an hour or until there are no active send requests. SMS_PACKAGE_TRANSFER_MANAGER 2013-06-28 02:37:49 9192 (0x23E8)
Could not establish connection. SMS_PACKAGE_TRANSFER_MANAGER 2013-06-28 02:37:49 9192 (0x23E8)
Attempt to connect failed. SMS_PACKAGE_TRANSFER_MANAGER 2013-06-28 02:37:49 9192 (0x23E8)
Notifying pkgXferJobMgr SMS_PACKAGE_TRANSFER_MANAGER 2013-06-28 02:37:49 9192 (0x23E8)
Sending failed. Failure count = 26, Restart time = 6/28/2013 3:07:49 AM Central European Daylight Time SMS_PACKAGE_TRANSFER_MANAGER 2013-06-28 02:37:49 9192 (0x23E8)

I was astonished because I haven’t changed anything, as I logged on DPJAS server it appared that one of my administrator colleague has moved the SMS_DP$ share. Not only moved but moved and forgot to share it again, so it wasn’t visible on the network. I turned sharing again, gave proper permissions, and one more time looked in log after redistributing content.

The message I have recived was:

ExecStaticMethod failed (80041013) SMS_DistributionPoint, AddFile SMS_PACKAGE_TRANSFER_MANAGER 2013-07-01 12:19:13 11128 (0x2B78)
CSendFileAction::SendFiles failed; 0x80041013 SMS_PACKAGE_TRANSFER_MANAGER 2013-07-01 12:19:13 11128 (0x2B78)
CSendFileAction::SendFiles failed; 0x80041013 SMS_PACKAGE_TRANSFER_MANAGER 2013-07-01 12:19:13 11128 (0x2B78)
Notifying pkgXferJobMgr SMS_PACKAGE_TRANSFER_MANAGER 2013-07-01 12:19:13 11128 (0x2B78)
Sending failed. Failure count = 1, Restart time = 7/1/2013 12:49:13 PM Central European Daylight Time SMS_PACKAGE_TRANSFER_MANAGER 2013-07-01 12:19:13 11128 (0x2B78)

After about 30 minutes of trying that operation to run on other DPs, I moved that folder to D drive where it was – my colleague moved it to the F drive.

Another redistribution operation, and guess what πŸ™‚ I t was the drive fault! Still do not how could it be as long as the share was visible properly :/

SCCM 2007 to 2012 migration scripts for colletions and packages.

I am still planning to write the whole great and shiny article about my operation of SCCM 2007 to 2012 migration :], but firstly I would like to publish couple of scripts that were very helpful for me.
1. The need of changing the “parent collection” for some collections came because we plan to use SCCM for managing the servers also, but we want to limit the ability of managing them to Administrators only. We do not want helpdesk admins – that are creating packages – to deploy accidentially package on any of them, or simply to have any access to them.

New SCCM has great ability – oh my God finally!!! – to restrict permissions on particular collections. So I left collection “All system” in the root “Device collections”, later I have created collection “All Workstations Helpdesk”, with limitation to “All systems” with proper query based on OU’s that is limiting it to just workstations, and put it in the folder to which I gave permissions for my helpdesk admis.

That worked great! Helpdesk Admins didn’t have any ability to change “All Workstations Helpdesk” membership, because they didn’t have permissions for (and accually didn’t even saw) “All systems” collection. And they could buil new collections based on that collection.

Old collections had to be migrated – there were advertisements that was deployed on them, my colleagues made them to make some reports for managers, or just for themselves.

The problem was, all old collections had “parent collection” set to “All systems”. Standing in front on 400 collections I made up a decision.

– Fuck, i need a script…

So here it is:


#---------------------
# Here I am setting up date just for logging purposes.

$date = Get-Date
$data = Get-Date –f "yyyy-MM-dd_HH";
$log_file = "c:\SCCM_Collections_Migration_$data.log"

$All_Collections = (gc c:\Collection_Name_List.txt)

#---------------------

Foreach ($kolekcja in $All_Collections) {
$Collection = $kolekcja
if ($Collection -eq "All Systems")
{

#---------------------
# We take the name of the current parent collection for collection that is beind processed - just in case we want to revert changes (useful :))

$Old_Collection = (Get-WmiObject -Namespace "root\SMS\Site_WRO" -Class SMS_Collection -Filter "Name='$Collection'")
$Old_Collection.LimitToCollectionName
$Stara_kol = $Old_Collection.LimitToCollectionName
#---------------------

#---------------------
# Here make the change of the collection, we need to know the name of the new collection AND it's ID!

$CollectionQuery = Get-WmiObject -Namespace "root\SMS\Site_WRO" -Class SMS_Collection -Filter "Name='$Collection'"
$CollectionQuery.LimitToCollectionName = "All Workstations"
$CollectionQuery.LimitToCollectionID = "WRO0000B"
$CollectionQuery.Put()
#---------------------

#---------------------
#Just for logging pusposes - taking the new collection name - to be sure it has changed

$New_Collection = (Get-WmiObject -Namespace "root\SMS\Site_WRO" -Class SMS_Collection -Filter "Name='$Collection'")
$New_Collection.LimitToCollectionName
$Nowa_kol = $New_Collection.LimitToCollectionName
#---------------------

#---------------------
# Here we are writing output to the file, if the names od ids are not the same - the error is being writed to the file. The error logging is maybe not so sophisticated but is enought πŸ™‚

if (($Old_Collection.LimitToCollectionName -ne $New_Collection.LimitToCollectionName) -and ($Old_Collection.LimitToCollectionID -ne $New_Collection.LimitToCollectionID)) {
$Data_row = "Success, for collection "+$Collection+" old limiting collection "+$Stara_kol+" has been changed to "+$Nowa_kol
Add-Content $log_file "$Data_row"
} else {
$Data_row = "ERROR The problem occured when changing the parent collection!"
Add-Content $log_file "$Data_row"
}
#---------------------
}

}

The problem I met was migration of packages. Before running the migration I didn’t realize the problem, hance I was really fucking astonished when after migration the packages/advertisements I saw in distmgr.log flood of errors saying that SCCM cannot find appropriate path for sources.

I was like:

images_the_fuck

Apparently I have missed one fundamental thing – migration taks do not migrate sources and do not change the path on it.

Well… shit πŸ™‚

I have moved the sources but I was left with almoust hundred of packages in which I had to change path to sources. Additionally I have noticed that some packages had relative path, and some not.

Here is a script for that, :

$CollectionQuery = Get-WmiObject -Namespace "root\SMS\Site_WRO" -Class SMS_Package

Foreach ($Pakiet in $CollectionQuery) {
$Pakiet.name
$Pakiet.PkgSourcePath
$Sciezka = $Pakiet.PkgSourcePath
$Poprawka = $Sciezka.Replace("D:\<LOCAL_PATH.","\\<NEW_SCCM_SERVER>\E$").Replace("\\<OLD_SCCM_SERVER>\d$","\\<NEW_SCCM_SERVER>\E$")
$Pakiet.PkgSourcePath = $Poprawka
$Pakiet.PkgSourcePath
$Pakiet.Put()
}

Reports migration from SCCM 2007 to SCCM 2012

Recenty I had some troubles during reports migration from SCCM 2007 to SCCM 2012.

By the way – I am going to write a quite big article about my struggling with SCCM upgrade – I hope the migration nightmare will ends this month πŸ™‚

So as I was saying, after migrating reports I was received such an error:

Microsoft.Reporting.WinForms.ReportServerException
The report server cannot process the report or shared dataset. The shared data source ‘AutoGen__5C6358F2_4BB6_4a1b_A16E_8D96795D8602_’ for the report server or SharePoint site is not valid. Browse to the server or site and select a shared data source. (rsInvalidDataSourceReference)

Stack Trace:
at Microsoft.Reporting.WinForms.ServerReportSoapProxy.OnSoapException(SoapException e)
at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.ProxyMethodInvocation.Execute[TReturn](RSExecutionConnection connection, ProxyMethod`1 initialMethod, ProxyMethod`1 retryMethod)
at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.LoadReport(String Report, String HistoryID)
at Microsoft.Reporting.WinForms.ServerReport.EnsureExecutionSession()
at Microsoft.Reporting.WinForms.ServerReport.SetParameters(IEnumerable`1 parameters)
at Microsoft.ConfigurationManagement.AdminConsole.SrsReporting.ReportViewerWindowsForms.SetParameterValues_DoWork(Object sender, DoWorkEventArgs e)

I couldn’t find what is the issue, I was doing it with the ReportSync tool I have read about here:

http://blog.coretech.dk/kea/migrate-reports-from-sccm-2007-to-sccm-2012-sp1/

But there was nothing about that error :/ so I was searching further and found that great article, it is quite similar buuut… it has explanation of how to get rid of thta error πŸ™‚

http://www.mydreampage.net/

Blog is written as a one page so you have to search by “Migrate the SCCM 2007 reports to SCCM 2012” header.

In case the website was no longer available – you have to do the fallowing after migration:

1. Go to to website http://<your_sqlreporting_server>/reports

2. Go to report that you have problem with

3. Click on it – so you will have error on the screen

4. Click on the report name on the top of the page (for ex. if your path to the report on the top looks like “Home > ConfigMgr_WRO > Asset Intelligence > Hardware 01A – Summary of computers in a specific collection” <- click on the bolded name) – it will lead you to the properties of the report.

5. Change the datasource of the report – don’t worry if the “test connecion” won’t work.

6. Go to report and run it πŸ™‚ it should be all fine

Unfortunatelly I have had about hundreds of reports to correct the data source, figuring out the script was the priority πŸ™‚ I have found a great script on that website:

http://ask.sqlservercentral.com/questions/86369/change-datasource-of-ssrs-report-with-powershell.html?sort=oldest

For me it was like:

$newDataSourcePath = "/ConfigMgr_WRO/{5C6358F2-4BB6-4a1b-A16E-8D96795D8602}";
$newDataSourceName = "AutoGen__5C6358F2_4BB6_4a1b_A16E_8D96795D8602_";
$SiteCode = "WRO"
$serverName = "WRO&lt;span style="font-size: small;"&gt;SCCM&lt;/span&gt;"
$reportFolder = "/ConfigMgr&lt;span style="font-size: small;"&gt;_&lt;span style="font-size: small;"&gt;WRO&lt;/span&gt;&lt;/span&gt;/ConfigMgr_&lt;span style="font-size: small;"&gt;OldSite&lt;/span&gt;";

$ssrs = New-WebServiceProxy -uri http://$serverName/ReportServer/ReportService2005.asmx?WSDL -UseDefaultCredential

$reports = $ssrs.ListChildren($reportFolder, $True)

$reports | ForEach-Object {

$reportPath = $_.path

$dataSources = $ssrs.GetItemDataSources($reportPath)
$dataSources | ForEach-Object {

$proxyNamespace = $_.GetType().Namespace
$myDataSource = New-Object ("$proxyNamespace.DataSource")
$myDataSource.Name = $newDataSourceName
$myDataSource.Item = New-Object ("$proxyNamespace.DataSourceReference")
$myDataSource.Item.Reference = $newDataSourcePath
$_.item = $myDataSource.Item
$ssrs.SetItemDataSources($reportPath, $_)
Write-Host "Report's DataSource Reference ($($_.Name)): $($_.Item.Reference)";
}

}

The script will modify all reports in the “$reportFolder” and it’s subfolders! Isn’t it great!?

SCCM – Different data in Resource Explorer and Add/Remore Programs while running report

Recently my colleague tried to make a report with workstations that have particular version of software – Adobe Reader. But he meet a problem because in report with Adobe Reader 9, he had workstations that definatelly had version 10, the same with version 8 – there was completely mess, as he was checking the Add/Remove Programs on the workstation it appeared it has some other version.

I found it indeed very weird,and tried to solve. By making directly queries on the database I noticed that indeed v_Add_Remove_Programs (name in SCCM report ->SMS_G_System_Add_Remove_Programs) shows old stuff – 9 version of Adobe Reader, but the database view v_SoftwareProducts (name in SCCM report -> SMS_G_System_SoftwareProducts) shows correct data – version there was 10. That was even double weird for me πŸ™‚ but after some time with google I have finally found the explanation.

The “Add/Remove Programs” stuff in updated by… “Hardware Inventory” client task, while “Software Products” as you can figure it out from it’s name – by “Software Inventory task”.

My hardware inventory period was set to one week, while software for 1 day. Lost for this almoust two days…

SCCM – problem during advertise a package to a client, just tmp files.

SCCM, for me personally, will forever remain a bottomless well of endless problems πŸ™‚

Lately I meet a problem that the package has been distributed to all Distribution Points correctly, but when it came to deliver it to clients, in local cache folder I saw only *.tmp files, all folders were correct, just there was no normal files.

If somebody has met problem like this here is the solution, at least for mine case πŸ™‚

There is a file: C:\Windows\System32\inetsrv\config\applicationHost.config on SCCM server

and you can find there many record like:

<add fileExtension=”.config” allowed=”false” />

Now it is easy to figure out, that the install folder of application I wanted to deploy in cache, contained one file with “.config” extension. As I changed “false” to “true” in that record, all worked like a harm πŸ™‚