Using a PowerShell Configuration Baseline to Deploy CMTrace

As a Premier Field Engineer, I spend a lot of time with customers coast to coast. One common thing I have seen is customers constantly looking for their favorite log viewer (at least mines 🙂 .

Configuration Baselines to the rescue.

Anyone that knows me knows I am a huge fan of configuration baselines since they can enable so much outside the box thinking, valuable workflows, and automation workflows that can be presented, OMG it’s insane, the fun stuff you can do with Configuration Baselines. Another story for another day Smile

So getting CMTrace out in the infrastructure is fairly straightforward, so let’s get started.

Objective:

  • From an RUN Command, type in CMTRACE and have CMTrace pop up.

To get started here 1st we need to figure out the commands needed to test for the existence of CMTrace. Now before we do that, we need to consider the 1st objective. We need CMTrace in the windows\system32 folder to be able to execute CMTrace from the RUN command line.

Phase One: (Testing for the file)

To test for the existence of CMTrace we can use the Test-Path PowerShell command. Why PowerShell you may ask because POWERSHELL IS KING, and I can further tune this as much as I would like for any scenario.

#look for cmtrace.exe
$cmtrace = Test-Path “c:\windows\System32\cmtrace.exe”
$cmtrace

As you can see I store the results of the Test-Path commandlet as a variable, so I can use that variable to evaluate the True or False from the variable.

The below picture is a negative evaluation. (Meaning CMTrace IS NOT in the tested location)

clip_image002[1]

After I put CMTrace in the tested path you get the picture below showing a good evaluation. (Meaning CMTrace IS in the tested location)

clip_image004[1]

Phase Two: (Remediating the file)

Now that we know how to test for the existence of the file and we also have the extra value of evaluating the file existence on True or False, we can get down to remediation if the value equals false.

#copy cmtrace to c:\temp

Copy-Item -Path “\\scapss\SMS_SCA\tools\cmtrace.exe” -Destination “C:\Windows\System32\cmtrace.exe” -Verbose

Phase Three: (Putting it Together)

Now that we know how to detect for the file and remediate of the file IS NOT there. Off to create our Configuration Item with Remediation and Configuration Baseline to deploy.

Below you will see screenshots of how the Configuration Item is Configured.

clip_image006[1]

clip_image008[1]

clip_image010[1]

clip_image012[1]

Configuration Baseline Configuration:

clip_image014[1]

NOTES:

Change values and locations as needed within the script. This script and Configuration Baselines are meant for testing use only.

 

@SCCMAvenger

Posted in Configuration Baselines, configuration mamanger, configuration manager 2012 | Tagged , , , , , , , , , , , , , , | Leave a comment

Windows Server 2003 as a Distribution Point

I had a project where a client wanted to use a 2003 Server as a distribution point. This blog will explain what is needed to be done to make a 2003 Server a distribution point.

 

So as usual you will need to go through the admin section and setup a site system, and pick the server as a distribution point. Once you make that server a distribution point you will notice the status in the monitoring section (Monitoring –> Overview –> Distribution Status –> Distribution Point Configuration Status) will not turn green. Yes you may have selected to make the server a distribution point and install IIS but; it won’t.

The blow screenshot is what your screen will look like and stay like unless you perform the following steps in this blog:

image

 

If you go to the server and look at the location where the CM12 distribution folders are located you will see this:

image 

If you notice there is A LOT missing here.

 

In the distmgr.log you will also see errors similar to the ones below.

image image image
image image image

 

So exactly how do you get the server to function as a distribution point?

 

So if you look at TechNet.com you will see the requirements for a DP are as follows:

image

 

Notice that the VERY 1st feature is REMOTE DIFFERENTIAL COMPRESSION.

So Windows 2003 Server DOES NOT have this by default. BUT, if you look in your share of your CM12 server, (\\CM12\SMS_PS1\Client\i386) the client folder under the i386 folder, you will notice the exe msrdcoob.exe. Guess what that is? 🙂

image

Once you execute the EXE you get the below install:

image

 

image 

 

image

 

image

 

Once you install that, you go back and look at your log files and the status and you still see red:

image

 

You need to install IIS on the server manually.

The below screenshot comes directly from TechNet.com, under the same screenshot as above where the requirements are.

image

 

YEAP, you have to install IIS manually on the 2003 Server.

image

 

Once the server has IIS installed and RDC installed, you get a clean log file and a clean green status area.

image

 

I hope this helps someone, and feel free to leave comments

/Ironman

Posted in Uncategorized | 1 Comment

Windows 7 as Distribution Point

Did you know you can turn a windows 7 workstation into a distribution point?

Below you will see I have a small lab setup:

  • Domain Controller (DC01)
  • CM12 Server (CM01)
  • Windows 7 x64 Enterprise Workstation (Win701)

Distribution Point Notes:

  • Individually, each primary site supports up to 250 distribution points and each distribution point can support up to 4,000 clients.
  • Individually, each secondary site supports up to 250 distribution points and each distribution point can support up to the same number of clients as supported by the hardware configuration of the secondary site server, up to no more than 4,000 clients.
  • Each primary site supports a combined total of up to 5,000 distribution points. This total includes all the distribution points at the primary site and all distribution points that belong to the primary site’s child secondary sites.
  • Each distribution point supports a combined total of up to 10,000 packages and applications.
  • Distribution point performance relies most on network I/O and disk I/O.

Distribution Point Requirements:

Features: Minimum Hardware:
  • Remote Differential Compression
  • IIS Configuration:
    • Application Development:
      • ISAPI Extensions
    • Security
      • Windows Authentication
    • IIS 6 Management Compatibility
      • IIS 6 Metabase Compatibility
      • IIS 6 WMI Compatibility
  • 2 cores (Intel Xeon 5140 or comparable CPU)
  • 8 GB of RAM
  • Disk space as required for the operating system and content you deploy to the distribution point.

 

Below are the computer properties of that workstation we will be turning into a distribution point:

2
Here is the screenshot of the c drive & computer before turning this workstation into a distribution point:

3

4

As you can see there’s only 1 disk drive, and there is only 5 folders in the root of the c drive.

Now lets prepare this machine to be a distribution point:

In this step we need to go to the computer management console and add the cm site server “computer name” to the local administrators group.

5 6
BEFORE AFTER

Ok so that’s the workstation part. As you can see its just like any other workstation you have in your office.

Now its time to hit the server side.

So now log into your CM12 Site Server.

You need to get to this area in the administration section, right click and Click “Create Site System Server”

image

You will need to go through a setup wizard. Just follow the screenshots below:

This identifies the workstation to be a distribution point

7

For this example i am NOT using a proxy server so there’s no need to inter information here, but if you are using a proxy server you would need to put that information here

8

Here as you can see were selecting the role the server will consume

9

As you can see a distribution point relies on IIS being on the distribution point. So here you will configure if you want the PSS (Primary Site Server) to install & configure IIS on the targeted workstation. (For this example here the Windows 7 Workstation)

10

In this step you will configure the storage limits and direction for the targeted workstation

11

This step will configure this targeted device to allow other distribution points to pull packages from this distribution points

12

This step will configure the distribution point to be a PXE Service Point. A PXE service point will answer PXE request coming from workstations. If you need this to be configured then this is where you do it

13

This step will configure the distribution point to deploy its contents using multicast

14

You can have the content on the distribution point validated on a schedule

15

This step will configure the boundaries the distribution point will serve. So make sure you pick the correct boundary group

16

Ok so once you finish out the wizard look in the administration section & click on distribution points. You should see the details of the distribution point. You should see the hard disk drives and there sized as shown in the screenshot below:

18

If you look at the monitoring section and go to distribution point configurations you will see some errors. In this lab it looked like this RIGHT after making that system a distribution point through the steps above.

19

After about 5 min the all were green as below:

21

Once there all green this confirms that IIS was configured, installed, and functioning on the distribution point.

You con confirm by viewing the log file on the Site Server (distmgr.log) This will confirm the setup of the distribution point and the package ID’s that went to the distribution point.

You can see once the workstation is configured as distribution point, you get some extra files. keep in mind I only used 1 drive here on this lab. so if you used another drive look at the root of the drive you will find some folders created by CM12

22

/IronMan

Posted in configuration mamanger, configuration manager 2012, configuration manager 2012 sp1, configuration manager distribution point, distribution point, Windows 7 Distribution Point | 2 Comments

MMS 2013 PowerPoint’s

I don’t want any credit for this just sharing what any of us could have figured out.

Using the same script from Stefan Roth, (located here) I was able to run the Create-MMS2013SessionFile to create the session.txt file

Once I opened it I saw all the extensions were .WMV, I just replaced the .WMV extensions with the .PPTX extensions and bam. There goes the PowerPoint’s.

 

As you can see not all sessions are up are the name of the PPTX is NOT the same as the video name. You will need to get those manually are wait until all the PPTX’s are uploaded…

Per the script though you will get a sessions_notavalable.txt file you can refer to.

If your like me you might not get all the videos, to watch but at least you can get the PPTX’s to review while your flying home.

Happy travels everyone

@dguilloryjr

Posted in Uncategorized | Leave a comment

In-place Upgrade to Server 2012

So yesterday I got my hands on a copy of: Windows Server 2012 Datacenter RTM. So I got home and updated my Network at the house. I logged into my DC (Server 2008 R2) and did a upgrade obviously just as with other versions you need to run the:

adprep.exe /forestprep

adprep.exe /domainprep

Once you run the preps above, you should be good to go with the upgrade of your domain controller.

You can follow the steps below in this: short video:

Posted in Uncategorized | Leave a comment

Transfer Server Roles (from 2008 x64 to 2008 R2)

Got a call today from a customer that wanted to phase out a old server. Threes a physical box that’s old as dirt. So they have a virtual setup and i built a domain controller on it and joined it to the domain…

There is a video below but i will roughly go through the steps…

I loaded the ISO of Server 2008 R2 as CD/DVD

Existing Server (Server 2008 X64)

  • Open CMD Prompt
  • C:\Users\Administrator>d:\support\adprep\adprep.exe /forestprep
    • This will prepare the forest
  • C:\Users\Administrator>d:\support\adprep\adprep.exe /domainprep
    • This will prep the Domain

New Server (Server 2008 R2)

  • Built a server 2008 R2
  • Joined it to the domain
  • Promoted the Server to a DC (ran dcpromo)
    • DNS
    • Global Catalog

Transferring the roles (perform these on the 2008 R2 Server)

  1. Open CMD Prompt (type the following commands)
    1. regsvr32 schmmgmt.dll
    2. ntdsutil
    3. roles
    4. connections
    5. connect to server DC02
    6. q
    7. ?
    8. transfer role
    9. Transfer infrastructure master
    10. Transfer naming master
    11. Transfer PDC
    12. Transfer RID master
    13. Transfer schema master
    14. exit
    15. netdom query /domain:contoso fsmo

Notes: (http://support.microsoft.com/kb/255504)

The Active Directory Installation Wizard (Dcpromo.exe) assigns all 5 FSMO roles to the first domain controller in the forest root domain.

We recommend that you transfer FSMO roles in the following scenarios:

  • The current role holder is operational and can be accessed on the network by the new FSMO owner.
  • You are gracefully demoting a domain controller that currently owns FSMO roles that you want to assign to a specific domain controller in your Active Directory forest.
  • The domain controller that currently owns FSMO roles is being taken offline for scheduled maintenance and you need specific FSMO roles to be assigned to a “live” domain controller. This may be required to perform operations that connect to the FSMO owner. This would be especially true for the PDC Emulator role but less true for the RID master role, the Domain naming master role and the Schema master roles.

Video

Posted in Uncategorized | Leave a comment

Who’s the Primary (Find the Primary DC)

 

If you have a environment with a lot of Domain Controller’s are just want to know which one is the primary…

You can run the below command to find who’s the primary dc

nltest /dclist: danny.local

this command will list all DC’s in a environment and accent the Primary DC with [PDC] as you can see from the cmd line below.

image

nltest /dcname: danny

the below command will list only the primary domain controller for the domain you list after dcname:

image

Posted in Uncategorized | Leave a comment