Saturday, February 27, 2016

Internet Explorer 11 Crashing Randomly

After deploying IE 11 to about 11k machines we have been encountering the occassional ticket request regarding random crashing on websites.  It doesn't happen across the board but for some users the same websites would constantly crash on them while other users would be different sites.

Having come across the article below which mentions to check for under the Internet Options in the Advanced tab and enabling "Use software rendering instead of GPU rendering".  It seems to fix a few users we are testing so worth checking out if you have the same types of random crashes or with certain sites.  On one of the computers that had the problem, we updated the latest video drivers from HP and didn't fix the issue until the setting was enabled.  Forgot the model but it's a few years old at most.



https://technet.microsoft.com/en-us/library/dn338138.aspx



Thursday, February 25, 2016

SCCM 2007: Status Filter Rules to Delete Duplicate IDs

With the recent issue we have regarding duplicate IDs, we decided to go with the deleting the objects "manually" because we can't change the interval the discovery happens or as I've suggested to use a unique naming convention which wasn't approved using serial instead of username.

To accomplish this task, it could have been done a few ways that I could think of but I decided to look into Status Filter Rules to do this in an automated fashion as opposed to using Task Scheduler which could be run every a few hours but may involve creating a network service account.

Create a script to look for the same named object but only select the ones with Obsolete0 as NULL or any column that has a NULL value.  I ran the script to retrieve duplicates a few times to validate then modified it to select only NULL.  If delete the "and Obsolete0 is NULL" it will retrieve both but for the deletion, we only want to delete the ones with NULL.   When done save the sql file to a location on the system.

Set NOCount ON
USE SMS_YOURSITECODE;
Select b.resourceID
from (SELECT Name0, COUNT(*) as rec_cnt
FROM dbo.v_R_System AS a
group by name0
having count(*)>1) A
join v_R_System AS b ON
b.name0 = a.name0 and Obsolete0 is NULL
SET NOCOUNT OFF

I created a batch file to use SQLCMD to run the sql file and export it to the text file that contains on the resource IDs.  I created another that would also export the Name and SMS Unique Identifier, the change date, and creation date so I can monitor what gets exported.  My delete script exports the items delete with the time so I can see when they are done.

Using the command lines as below will export with correct formatting w/o the white space and header information.

sqlcmd -m 1 -h -1 -W -S SERVERNAME -i c:\sql\nullid.sql > c:\dupid\dupids.txt


The batch file runs both queries and exports them to 2 separate text file.  One is the ResourceID only and the other has more info and appends to a file with the extra data.

Before creating the Status Filter Rule, you may want to review what message IDs you want to use a the trigger.  I'm looking at the SMS_AD_Group_Discovery_Agent message logs and decided to use 500 and 1105 because of the time gap.


Select the Component and Message ID to match and click the Action tab.


In the Actions tab, I have it run the batch file to export the duplicate IDs.  Then repeat it again with the other script that runs against the txt file to delete.


The upside of this method is that it doesn't require additional permission settings or using a service account to run it.


Friday, February 12, 2016

Duplicate SCCM (2007) Records Not Showing The Correct AD Discovery Objects After a Data Discovery Cycle

Recently, we changed vendors for client computer purchases and have them imaged before shipping to our locations.  They are applying our custom wim using MDT with our SCCM client installed and joined to the domain using a generic name.  Once received it goes through the new provisioning process that includes renaming it while on the domain, adding security groups for non-standard app deployment and then is moved into a production OU from the staging OU.

What we are encountering with new process is that when a computer is renamed, the new name is discovered and has a record created.  After a DDR to update the record, the original one reflects the new name change and then NULLs the new one.  The issue is that the new one contains the AD discovery objects for security groups and OU information which the original active one doesn't have.

This was tested extensively prior to writing the documentation but upon my return this did not appear to work anymore.  I created a case with MS support and they were able to reproduce the problem that I showed him.  I think he was under the assumption that SCCM 2007 would be able to recognize by the GUID which is the active one and correct itself.   Our AD Discovery cycles runs every 2 hours and Heartbeat is set daily and even when the service is restarted it doesn't send a DDR that the engineer said it would.  So if it was left to SCCM under the current settings that would not correct itself and require our manual intervention to correct.

So his suggestion was to turn off the AD discovery on the staging OU and to test it out. 

It didn't seem to work w/o manual intervention.

Based on this, it seems it is a known issue.

https://blogs.technet.microsoft.com/configmgrteam/2011/09/09/known-issue-and-workaround-duplicate-records-when-you-use-unknown-computer-support-with-active-directory-delta-discovery/


On a side note this is a script I created for the tech/supervisors to only export the SCCM groups to copy to the new computer account.  This writes to a CSV file named by the computer name you enter.

Export Specific Security Groups from AD Computer Object

$computer = Read-Host -Prompt 'Input computer name'
$PC =  $computer + "$"

Get-ADPrincipalGroupMembership -Identity $PC | Where-Object {$_.Name -like '*-SCCM*'|select Name | export-csv c:\$pc.csv -NoTypeInformation

Same for the bulk computer account creation, I was told someone was creating hundreds manually.

The below is a modified script I found online that was used to create bulk VMs in VMWare.  I replaced the commands to create the VMs and made it so you can create the objects to start at a certain number because we in certain amounts each time.

http://vinf.net/2010/02/25/quick-and-dirty-powershell-to-create-a-large-number-of-test-vms-with-sequential-names/

Bulk Computer Creation Script

$erroraction = "Silently-Continue"

$Nameconvention = 'USPC'

$HOW_MANY_TO_CREATE = Read-Host -Prompt 'Enter # of accounts to create'
$start = Read-Host -Prompt 'Enter starting #'

$NumArray = (1..$HOW_MANY_TO_CREATE)

foreach ($number in $numArray )
{
$seqn=$number + $start
$name =  $seqn | % {"{0:0##}" -f $_}
$string = $Nameconvention + $name
echo Creating $string
new-adcomputer $string -Path '' -Enabled $true
}

Please modify accordingly to your environment and test it.