Showing posts with label SCCM 2012 Genral. Show all posts
Showing posts with label SCCM 2012 Genral. Show all posts

Wednesday, August 13, 2014

Delete Stale or Inactive Computer Accounts from SCCM

Some time we see some weird entry in the sccm console relate to client record. When we dig we find that our Collection show more count as compare to the actual count. This happen because of  ADSD.

When ADSD is enabled, Config Mgr Administrators generally discover the entire domain or a major OU structure. Admins are amazed to see the sheer number of PCs discovered by ADSD, however, upon further inspection they notice that these “extra” PCs are in fact old PCs that are no longer active on the network.

They might have a process to physically dispose of a PC, but they forget to remove the PC from AD and sometimes Config Mgr too. This is an important part of the decommissioning process. Without removing decommissioned PCs from AD, it leaves AD in a “dirty” state with lots of stale PCs that are no longer active.

So now we know that we have stale entry in the SCCM and AD. We should find some simple solution to get rid of these records. As I am very lazy to will find something simple that can help me to perform it with 1 click example scripts or Bat or Power Shell. Everyone have different think, so they may need something different.

Below are the few solutions that can help us. (Choice is yours)


1. The First Method is Script :

The credit for this script goes to windows management experts team for creating the beautiful script that work for us, so that we can take nap for few more minutes.... 

Below is the link to Download the script :
http://www.windowsmanagementexperts.com/free-scripts/remove-old-objects-from-ad-and-sccm

2. The Second Method is Power shell :

This PowerShell command/script will query Active Directory and return all computer accounts which have not logged in for the past X (configurable) number of days - or not at all. I've included - and commented out - commands that will either Disable or Remove these accounts if you choose to do so.

# This PowerShell Command will query Active Directory and return the computer accounts which have not logged for the past 60 days.  You can easily change the number of days from 60 to any number of your choosing.  lastLogonDate is a Human.Readable conversion of the lastLogonTimeStamp
$then = (Get-Date).AddDays(-60) # The 60 is the number of days from today since the last logon.

Get-ADComputer -Property Name,lastLogonDate -Filter {lastLogonDate -lt $then} | FT Name,lastLogonDate

# If you would like to Disable these computer accounts, uncomment the following line:
# Get-ADComputer -Property Name,lastLogonDate -Filter {lastLogonDate -lt $then} | Set-ADComputer -Enabled $false

# If you would like to Remove these computer accounts, uncomment the following line:
# Get-ADComputer -Property Name,lastLogonDate -Filter {lastLogonDate -lt $then} | Remove-ADComputer


3. The Third Method is AD Tool :

Here is an easy way to identify and delete inactive or stale computers in an Active Directory environment.  Using the dsquery command you can easily find all of the computers in the directory that have not been logged into in a given time interval or disabled.

The following command will return all computers that have been inactive or stale for 2 weeks:

dsquery computer –inactive 2
image
The following command will return all disabled computer account information:

dsquery computer –disabled
image
You can combine this output with the dsrm command to delete these objects from Active Directory

dsquery computer –inactive 2 | dsrm -noprompt 
dsquery computer –disabled | dsrm -noprompt
image 
Following any of the above 3 method we can keep our AD and SCCM Clean.

Hope This Will Help!!
Amarpal Singh



Tuesday, July 29, 2014

SCCM 2012 Versions!!!

Some time at the time of troubleshooting we need sccm 2012 version that are out till date. So i have mentioned all the versions that i know till date!!!!

CM 2012 RTM - 5.00.7711.0000
CM 2012 CU1 - 5.00.7711.0200
CM 2012 CU2 - 5.00.7711.0301
CM 2012 SP1 - 5.00.7804.1000
CM 2012 SP1 CU1 - 5.00.7804.1202
CM 2012 SP1 CU2 - 5.00.7804.1300
CM 2012 SP1 CU3 - 5.00.7804.1400
CM 2012 SP1 CU4 - 5.00.7804.1500
CM 2012 R2 - 5.00.7958.1000
CM 2012 R2 KB2905002 - 5.00.7958.1100
CM 2012 R2 CU1 - 5.00.7958.1203
CM 2012 R2 CU2 - 5.00.7958.1303

Hope This Will Help!!
Amarpal Singh

Monday, July 14, 2014

Failed To Start SMS SITE BACKUP Service

Hi Guys ,

I would like to share my experience on the issue that i came across in SCCM 2012 when i was running the SMS SITE BACKUP....


ISSUE :

Trying to start SMS SITE BACKUP service manually, but it failed to start. Giving system error 2, specified service cannot find

Resolution :

After checking logs i though to give a try by directly running smsbkup.exe. When i went to the path to execute the smsbkup.exe it was not there..???? And when i looked again at error it was saying File not find...So now next challenge was to get the file , but how????? There i applied the the applied the logic of copy & paste and it work..Woooo. Hooo....

smsbkup.exe was missing from E:\Program Files (x86)\Microsoft Configuration Manager\bin\X64 path, copied same from CAS server and then i was able to start the SMS_SITE_BACKUP service..


Hope This Will Help!!!
Amarpal Singh sandhu

Friday, June 27, 2014

Setup is unable to connect to SQL Server Port 1433

Hi All,

I was trying to install System Center 2012 SP1 Configuration Manager on Server 2008 R2 OS. During the installation i encountered an issue with SQL Server connectivity. I was quite surprised to see this error because I installed the SQL on same server where I was installing the SCCM2012. I followed all the steps that were given in document. To find out what was wrong I started checking the reasons that were suspected On the Database Information wizard screen.




Setup is unable to connect to SQL Server with the connection information provided.  Verify the following:
1.  The SQL Server and instance names are entered correctly
2.  The specified SQL Server instance is not configured to use dynamic ports
3.  If a firewall is enabled on the SQL Server, inbound rules exist to allow connections to the correct ports
4.  The account used to run Setup has permissions to connect to the specified SQL Server instance

As you can see it has given me few details to check with. And then I started checking everything 1 by 1.
For the first issue, I was sure that it could not be the issue because I used the default instance and not the custom one, so now one down…
For the second issue, SQL Server instance is not configured to use dynamic ports  Smile what that means!! Lol  This was the issue…. I will talk about in next step
For the third issue I have manually created Firewall Port exception. Also SQL Server was the same server on which I was installing sccm 2012 so big no to this point.
For the last issue I have used the default system account that SQL Server 2012 configured so this was also ruled out.

Now, let’s come back to Point 2 i.e. The specified SQL Server instance is not configured to use dynamic ports. In this example, this is the reason we are getting the error when using the Named Instance. Also “Named pipes” was disabled I enabled it as well. J to avoid further MP communication issue J

Here is the Resolution :

1.      Open the SQL Server Configuration Manager console

3.      In SQL Server Configuration Manager, expand SQL Server Network Configuration. Click on Protocols for SCCM(SCCM is your Named Instance)
In the right side pane, right click on the TCP/IP (Status Enabled) and click on Properties




5.  In that click on IP Addresses tab. Scroll down to the bottom & make a change to IPALL. TCP Dynamic Ports -> Blank. TCP Port -> 1433 (as this is our default port for SQL Server Database Connection). Click on Apply.



6.  And notice that you need to restart SQL Server (SCCM) Service..



7.        To restart a service. Click on SQL Server Service. Right click on Instance Name: SQL Server (SCCM) and click on Restart. Wait for few seconds.




After that setup SCCM 2012 installed and I was happy to see the 2012 console. J

Hope This Will Help!!!
Amarpal Singh