CM 12 R2 Prerequisites on Server 2012 R2

In a next couple of posts I will try to share automated scripts for various installations. First of them will be for installing all prerequisites for installation of System Center Configuration Manager 2012 R2 on Windows Server 2012 R2

Script is simple and code will be shown here, but at the bottom of this post you can find download link so you don’t need to type script.

NOTE: In this script you need to be adjust path to configuration file and name of configuration file if you will use other than this

Open PowerShell and type:

Install-WindowsFeature –ConfigurationFilePath <CM12Prereqs.xml>

(mine is looking like this:

Install-WindowsFeature -ConfigurationFilePath ./CM12Prereqs.xml)

Here you can find .ps1 and .xml file for download as a .zip file CM12Prereqs.zip
More about this can be foud here

Server 2008 R2 wont boot after restart

At Friday I had strange problem. Windows 2008 R2 server didn’t start up after restart. It stop on message where loading Group Policy Client. When we finally receive option to boot to safe mode, server stops at loading classpnp.sys file.

Why we had this problem? At first problem was with IBM 8k RAID controller. Controller was dying and it works in unusual way. Windows show this in system log

ErrorLog

I change controller but problem still exist. It seems that windows wrote some bad records in rebooting process. I was pretty certain in that, after we change everything on server except HDDs I was leave server to boot to safe mode for two hours. After two hours server still tries to loading classpnp.sys.

DART tools didn’t help me, because boot stops after finding installation. Instead getting DART console, only I can see is loading circle of Windows Server 2008 R2. Colleague of mine Romeo Mlinar help me with advice. On this controller I hade two arrays: RAID 1 and RAID 5. He told me: try to remove RAID 5 array and try to boot. He got a point

But instead of DART tools I use Windows Server 2008 R2 installation CD. Boot from CD use option to repair installation and get CMD.

First step was to do: sfc /SCANNOW /OFFBOOTDIR=C:\ /OFFWINDIR=C:\WINDOWS\

Second step was to do: StartRep.exe from recovery directory in installation CD.

After this two steps everything was back to normal an my server was booting normaly

SCCM Client won’t show device is server console

Usually when You install SCCM 2012 client after few minutes device appear in console view. But what if device wont show after couple restarts? (couple days)

I don’t know why this error occurred but, this is steps for resolving problem.

No Site Configured

At first, you must check connectivity to SCCM 2012 server. If connectivity is ok and you can reach server by its name do this.go to tab SITE

go to tab SITE

Site Configuration

Write number of assigned site and press Find Site

You will receive notification that Configuration Manager has successfully find site to manage this client

Site COnfigured

Check General tab again now it looks like this

Site showed up in Config client

Notify that you still don’t have “Client certificate” and “Connection Type”

But after few minutes everything is fine

After Few minutes

Your client is now visible in your SCCM console and you can manage it.

Managed Service Accounts in Active Directory

We all heard that one of many features in Windows server 2008 R2 is Managed Service Account.

Prerequisites for that is domain functionality raised to Windows Server 2008 R2

Most common mistake is that you will create managed service account using Active Directory Users And Computers snap-in. You will not.

Either if you are created account in Managed Service Accounts container it is still user account. To make it work you must give user rights “logon as a service” and “logon as a bat job”.

To create Managed Service Account you must use Power Shell. Creating service accounts is not so complicated. You can create it using simple script

New-ADServiceAccount –name (desired name of account).

Of course before you must “tell” powershell to use Active Directory module. Syntax for this is:

Import-module ActiveDirectory

And before that you must have installed feature:

Active Directory module for Power Shell

image

I’ve described this reversed with reason.

Most common is that you first load module to Power Shell and then start wit Your managed service accounts.

When you are created service account you need to install it on server where You want to use it. Syntax is:

install-ADServiceAccount –identity “(name of service account)”

To install account you must “run as administrator” Power Shell or you will receive error.

image

REMEMBER: You must have ONE managed service account per server. This is the big difference between managed service account and former virtual account.

Now you are ready to use managed service account with specific services

image

image

 

 

For more on this topic you can contact this link

Querying Computers in Active Directory

If you need to do some reports in active directory best tool for use is DSQUERY which is part of Remote Server Administrative Tools

First common query is how to list all computers spreaded in different Ous

And here it is:

dsquery computer

As dsquery shows first 100 results option for showing more is:

dsquery computer –limit 1000

This will show first 1000 computers in your active directory. If You have more than 1000 computers just change number.

If You need this for some reports You can put results in a text file and later on import it to excel

Syntax for this is:

dsquery computer –limit 1000 >computers.txt

If You need to know which computer is running which OS syntax will be:

dsquery * domainroot -filter "(&(objectCategory=computer)(operatingSystem=Windows XP*))"

OR

dsquery * domainroot -filter "(&(objectCategory=computer)(operatingSystem=Windows Server*))"

For those who wants to know what service pack is on those OS:

dsquery * -scope subtree -attr "cn" "operatingSystem" "operatingSystemServicePack"  -filter "(&(objectclass=computer)(objectcategory=computer)(operatingSystem=Windows XP*))" -limit 100000

Last two syntax is announced on sheenaustin.com