Issue: Unable to add a Distribution Point to a package in SCCM 2007

 

This is just a quick blog post on an issue in SCCM 2007 that I’ve seen a couple of times. You create a new package and then try to add a Distribution Point to it. Nothing happens…

In my experience, these are the main two reasons for this happening:

1. The package source is missing or wrong
2. There is a file locked in the source directory

Tagged with: , , , , ,
Posted in Blog, Microsoft, SCCM 2007, System Center

Guide: How to force clients to re-run an advertisement in SCCM 2007

In SCCM 2007, once a client has run an advertisement, it will not run it again by default.

If you want to force the clients to rerun the advertisement automatically, you have to change the date of the schedule for the advertisement.

Here’s how you do it:

Start by going to Computer Management -> Software Distribution -> Advertisements -> Select the Advertiement -> Right-Click -> Properties

How to force clients to re-run an Advertisement in SCCM 2007

Go to the “Schedule” tab. In order to force the clients to re-run an Advertisement, you need a Mandatory assignment. In this case, there is already one, and we choose the middle button.

If you were to create a new Mandatory assignment, you would have chosen the icon to the left, representing a sun.

How to force clients to re-run an Advertisement in SCCM 2007

After clicking on the button, select Schedule. You could also change to “Assign immediately after this event”, which basically does the same thing.

How to force clients to re-run an Advertisement

Change the date to something else, but the date needs to be earler than today’s date.

How to force clients to re-run an Advertisement

Press OK.

Now, you need to change “Program rerun behavior”. If you select something other than “Always rerun program”, you will most likely not succeed in re-running the advertisement on all clients that the advertisement is advertised to.

How to force clients to re-run an Advertisement in SCCM 2007

Press OK to close the dialog box. The clients should now re-run the advertisement as soon as their policy has refreshed. The default time for this is every 60 minutes.

Tagged with: , , , , ,
Posted in Blog, Guides, Microsoft, SCCM 2007, SCCM 2007, System Center

Guide: How to remove a Primary Site in SCCM 2007

Removing a Primary Site in System Center Configuration Manager 2007 is not quite the same as removing a Secondary Site.

Basically, what you need to do is to de-attach the Primary Site from it’s Parent (The Central Site).

Here is how you do it:

Open the SCCM console:

How to remove a Primary Site in SCCM 2007

Connect to the Site Database of the Primary Site -> Right-click the Primary Site and select Properties

How to remove a Primary Site

Change from “Report to parent site:” to “Central site” 

How to remove a Primary Site in SCCM 2007

Press OK and the uninstallation of the primary site will start :) If you connect to the Central Site, you will see that it will not be visible any more.

How to remove a Primary Site in SCCM 2007

Tagged with: , , , , , ,
Posted in Blog, Guides, Microsoft, SCCM 2007, SCCM 2007, System Center

Guide: How to create and configure virtual machines in Hyper-V Server 2012 using Powershell

From the CMD, type Powershell to get in to the Powershell prompt.

Powershell

New-VM -Name DC -MemoryStartupBytes 512MB -Path D:\ws2012.local

This will create a Virtual Machine called DC in D:\ws2012.local with 512 MB memory. Note that a subfolder will be created with the name of the Virtual Machine. So in my case, the Virtual Machine will be placed in D:\ws2012.local\DC .

Create Virtual Machine Powershell Windows Server 2012

 

Now we will create a new dynamically expanding Virtual Hard Drive with the new *.vhdx file extension and with a maximum size of 60 GB using:

New-VHD -Path D:\ws2012.local\DC\DC.vhdx -SizeBytes 60GB -Dynamic

New Virtual Hard Drive VHDX Powershell Windows Server 2012

The next step is to connect the newly created Virtual Hard Drive with the Virtual Machine.

Add-VMHardDiskDrive -VMName DC -Path D:\ws2012.local\DC\DC.vhdx"

Now you might want to connect an *.iso file for the Windows installation:

Set-VMDvdDrive -VMName DC -ControllerNumber 1 -Path "<path to ISO>

Connect DVD Iso Virtual Machine Powershell Windows Server 2012 Hyper-V

Start the VM:

Start-VM –Name DC

View the status of the VM:

Get-VM DC

Start Virtual Machine Powershell Windows Server 2012 Hyper-V

I prefer to also set up Dynamic Memory for my machine. In order to do this you first need top the machine using:

Stop-VM DC

Then run:

Set-VMMemory -VMName DC -DynamicMemoryEnabled $true -StartupBytes 512MB -MinimumByter 512

There are of course a lot more settings you can configure, but this will get you up and running. Once you get the hang of Powershell, you won’t be going back to create your machines in the GUI, as this is much faster :)

Tagged with: , , , , ,
Posted in Blog, Guides, Hyper-V, Hyper-V, Microsoft, Powershell, Powershell, Windows Server 2012, Windows Server 2012

What is Hyper-V Server 2012 and how do I install and administer it?

Hyper-V Server 2012 is a stand-alone product offered for free by Microsoft. Basically, it’s a stripped down Windows Server 2012 Core installation, which is meant to only be running Hyper-V. This might work fine for you if you are only using the host as a hypervisor, as it’s free and leaves minimal footprint and attack surface.

This is really practical if you’re running your server for lab environments or if you just want to run all of your server/client machines virtually, without installing a full-blown Windows Server 2012. The best thing is that you won’t need a license and will therefore not need to reinstall your Hyper-V host when your evaluation license runs out :)

To be able to download it, go here http://www.microsoft.com/click/services/Redirect2.ashx?CR_EAC=300055432 and login with your Microsoft account.

Installation

The easiest way to install Hyper-V Server 2012 is to put the media on a USB, make it bootable and run the installation from it. You can read my previous blog post on how to create a bootable Windows 8 USB using Diskpart, as the steps are exactly the same.

Once booted up, you’re prompted with the standard installation screen, where you can choose language, time, keyboard layout.

Running the installation on my server with an SSD took well under 5 minutes.

Configuration

Once the installation is complete, you will be automatically prompted with a command line tool called sconfig, that you can use to set up all the basic things:

sconfig Windows Server 2012

By default, Hyper-V Server 2012 will use DHCP, so you will most likely already have network connectivity if you are plugged in to your network. But if you want to you can just press option 8 to go to Network Settings if you want to specify a Static IP, Subnet Mask, Gateway and/or DNS server.

Remote Management is enabled by default and Remote Desktop is disabled. As you can see I’ve enabled Remote Desktop, but that is only for me taking these screenshots :) Otherwise, you will be fine with just enabling Remote Management, for administration via Powershell or the Server Manager in the RSAT tools for Windows 8.

The first thing I would do, before configuring anything else would be to run Option 6, “Download and Install Updates”.

Remote configuration

Now, you could make all the configuration steps sitting by the local server, but I would much rather just install it, make the intital configurations as mentioned earlier, and then sit at my workstation configuring it.

My recomendation would be to install RSAT for Windows 8 and run the Server Manager.

Administration using RSAT for Windows 8

Start by opening Server Manager and selecting Add other servers to manage

RSAT Windows 8

Now, you can search for the server in Active Directory or via DNS. I will search via DNS as my Hyper-V host is in a Workgroup and I haven’t set up a domain yet.
Search for the server and then press the arrow to choose it:

Add Server in Server Manager Windows Server 2012

When adding a server in a Workgroup you need to add the server name to the Trusted Hosts list of the machine that is running  Server Manager. Enter this command in Powershell on the Workstation you are running Server Manager on.

Set-Item wsman:\localhost\Client\TrustedHosts hyperv -Concatenate -Force

If you don’t add the server to the Trusted Hosts list, you will receive the error below:

WinRM Negotiate authentication error

WinRM Error Windows Server 2012 Trusted Hosts

WinRM Error Trusted Hosts Windows Server 2012

Once you’ve added the server to the Trusted Hosts list, the status of the server should change in Server Manager:

WinRM Error Windows Server 2012

Now just right click the server and open Hyper-V Manager

Hyper-V Manager Server Manager Windows Server 2012

If you prefer to use Powershell for Remote Administration, just select Windows Powershell instead of Hyper-V Manager.

How to create and configure Virtual Machines will be covered in another blog post.

Tagged with: , , , , , , , , , , ,
Posted in Blog, Guides, Hyper-V, Hyper-V, Microsoft, Powershell, Windows 8, Windows Server 2012, Windows Server 2012

How to change between a Full Installation (GUI) and Server Core in Windows Server 2012

Windows Server 2012

Server Core was introduced in Windows Server 2008, but was confusing to a lot of administrators. This was mainly due to the fact that you as an administrator was restricted to a command line and needed to know the commands for doing your tasks. One of the main problems with it, was that if you installed your server as a Server Core, you would need to reinstall it if you wanted the GUI.

This has changed in Windows Server 2012. Now it’s possible to install your server with a GUI and remove the GUI once you’ve set everything up. It’s also possible to install your server as a Server Core and then add the GUI if needed, by just entering a simple Powershell command..

Adding the GUI to a Server Core installation

Enter this command in to a Powershell prompt, running as Administrator. To enter Powershell, simply type Powershell from the Command Prompt :)

Then run:

Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra

Add GUI Server Core Windows Server 2012 Powershell

Once installed, you need to restart the server. Use this command:

Restart-Computer

If you do not have Internet connectivity, the installation will hang at 68% and after a while display an error message to you:
Install-WindowsFeature : The request to add or remove features on the specified server failed.
This means that the source files for the GUI installation cannot be located.

.Installation 68% Powershell Windows Server 2012 GUI Core

Installation failed source Windows Server 2012 Powershell

To solve this, follow these steps:

Start by creating a mount directory (i.e C:\Mount)

mkdir c:\mount

Get the index number of the WIM file for the GUI (if WS2012 media is on D:). Since all of the Windows Server 2012 installations are stored in the same *.wim, we need to specify what version we want to mount. In this case, we’ll be using the Datacenter version with GUI, which is Index #4

dism /get-wiminfo /wimfile:d:\sources\install.wim

dism Windows Server 2012 GUI Powershell Index Datacenter

Mount the WIM file:

dism /mount-wim /wimfile: d:\sources\install.wim /Index:3 /mountdir:C:\Mount\ /readonly

Dism Windows Server 2012 Mount Datacenter GUI Powershell

Install and specify the source:

Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra -Source C:\Mount\Windows\SXS

Install GUI Server Core Windows Server 2012 Powershell Datacenter
Once installed, you need to restart the server. Use this command:

Restart-Computer

Add GUI Windows Server 2012 Server Core Powershell Windows Feature

Removing the GUI from a full installation, using the GUI:

Open Server Manager, open the Manage menu and go to Remove Roles and Features

Remove GUI Windows Server 2012 Core

Press Next until you reach the Features page

There are two different features that you can choose:

  • Graphical Management Tools and Infrastructure (server-GUI-mgmt-infra) basically provides Powershell, MMC and Server Manager.
  • Adding the Server Graphical Shell (server-GUI-shell), will add the rest of the GUI experience. This feature is dependent on the first, so you can’t just add this one.

Note that if you remove Graphical Management Tools and Infrastructure, you will also remove Server Graphical Shell.

Remove GUI Windows Server 2012 Core

Once deselecting one of the features, you will get a popup. Here, press Remove Features.

Remove GUI Windows Server 2012 Server Core

The User Interfaces and Infrastructure feature should now be deselected. Proceed by pressing Next.
Remove GUI Windows Server 2012 Server Core

The final step is to confirm the removal process. Press Remove and select Restart the destination server automatically if required.

Remove GUI Windows Server 2012 Server Core

Removing the GUI from a full installation, using Powershell:

Enter this command:

Uninstall-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra

Remove GUI Powershell Windows Server 2012

Remove GUI Server Core Windows Server 2012 Powershell Remove GUI Server Core Windows Server 2012 Powershell

Tagged with: , , , , ,
Posted in Blog, Guides, Microsoft, Powershell, Powershell, Windows Server 2012, Windows Server 2012

Windows Server 2012 Release Candidate Expiration Date

Windows Server 2012

Just a quick post as a reminder to those of you who have Windows Server 2012 RC installed, to upgrade to RTM as the RC expired yesterday and will cause reboots every hour if not reinstalled.

If you’re interested in getting a hold of the 180-day evalution, please refer to one of my previous blog posts:

http://www.danielclasson.com/windows-server-2012-rtm-180-day-evaluation-now-available-for-download/

Tagged with: , , , , , , ,
Posted in Blog, Microsoft, Windows Server 2012

System Center 2012 SP1 Configuration Manager Package Conversion Manager 2.0

System Center Configuration Manager

If you are migrating your environment from SCCM 2007 to ConfigMgr 2012, you might want to convert your old applications into the new application model.

Package Conversion Manager 2.0 will let you analyze your packages and convert SCCM 2007 Packages and Programs into ConfigMgr 2012 Applications and Deployment Types.

Feature Summary:

  • Analyzes Packages
  • Automatic Conversion
  • PCM Plug-In
  • Fix and Convert Wizard
  • Package Conversion Dashboard
  • Online Help
  • PCMTrace.log
  • Bulk Analyzer

System Center 2012  SP1 Configuration Manager Package Conversion Manager 2.0 is available for download here:
http://www.microsoft.com/en-us/download/details.aspx?id=34605

Tagged with: , , , , , , , ,
Posted in Blog, Microsoft, SCCM 2007, SCCM 2012, System Center

How to check status of Bitlocker encryption on a client

If you have just installed a client and have Bitlocker enabled in your environment, it’s likely that you will run in to performance issues while Bitlocker is encrypting the drive. With the help of this simple command, you can see the encryption status. This command can also be run remotely on a client.

manage-bde -status c:

Bitlocker encryption status Powershell

Tagged with: , , , , ,
Posted in Blog, Guides, Microsoft, Powershell, Security, Windows 7, Windows 8, Windows 8

Windows 8 Release Preview, Consumer Preview and Developer Preview will soon expire!

Windows 8 logo

If you are still running Windows 8 Release Preview, Consumer Preview or Developer Preview, don’t forget to upgrade to RTM as the all three versions will expire on January 15th!

This is what Microsoft says about the expiration date:

“You have no right to use the software after the expiration date,” stated the Release Preview’s end-user license agreement (EULA). “Starting from the expiration date, you may not be able to access any unsaved data used with the software. Any applications you receive through the Windows Store will also cease to be available to you in future versions, unless they are made available for re-download and you re-acquire them. You may not receive any other notice.”

After the expiration date, the computers running any of these versions will restart every 1-2 hours.

Starting from 1 Jan 2013, users might start to see messages stating that the Windows 8 copy is about to expire. I must admit that I’m still running the Release Preview, and I haven’t seen any notifications yet.

It is possible to do an upgrade to the RTM version of Windows 8, but this is not recommended by Microsoft, as it will not transfer any previously installed applications. If you are upgrading from Developer Preview or Consumer Preview, the files will be transferred to the RTM and put in a folder called ‘Windows.old’, where you can retrieve the files manually. Upgrading from the Release Preview will transfer your personal files, but nothing more.

Windows 8 Start screen

Tagged with: , , , , ,
Posted in Blog, Microsoft, Windows 8
Categories
Twitter