Ole Skovgaard, IT-Architect @ Infrahouse, Lersø Parkallé 107 , 2100 København Ø, Denmark

Tuesday, November 22, 2011

Run Programs as Local System Account

By default all Configuration Manager Task sequence steps are running as the local system account therefore it occasionally can be helpful to validate any setup packages or scripts with local system privileges before applying them to any given task sequence.

To accomplish this I prefer using a program named PSEXEC.exe from Sysinternals now owned by Microsoft. In this I open a Command Prompt and from that shell I am able to execute any setup or script file I intend to run.

Quick Step
  1. Download PsTools. (Link)
  2. Run (with elevated rights): psexec -i -s cmd.exe
  3. To ensure that you are running as Local System Account type Whoami in the console
  4. Run your setup or script file that you want to test.
Start CMD with PSExce.exe










WhoamI - from here you can execute any program as Local System.
















NOTE: In Configuration Manager 2007 SP1 and earlier, task sequences always run by using the local system account, so there is no option of running a task sequence for each individual step. In Configuration Manager 2007 R2, the task sequence command-line step can be modified to run as a different account.

Tuesday, October 18, 2011

Eliminated Distribution Points still show up in 'Site System Status', Configuration Manager.

Occasionally I experience that eliminated Distribution Points still show up in Site System Status in Configuration Manager with failed status. These issues often occur either because the DP has been removed incorrectly from Configuration Manager or because of some variety error in the removal process. In the below text you will find a quick guide in how to remove the DP from Site system components status.


This is not supported by Microsoft and use is at your own risk

Run below SQL command on the Config Mgr. Database server. Change the Sitecode='CEN' to your own Sitecode.

Search the database for obsolete records:
SELECT * FROM dbo.Summarizer_SiteSystem WHERE sitecode='CEN' AND status <> 0

Copies the records to a new table for backup just in case it is needed:
SELECT * INTO Summarizer_SiteSystem2 FROM dbo.Summarizer_SiteSystem WHERE sitecode='CEN' AND status <> 0

Delete obsolete records:
DELETE FROM dbo.Summarizer_SiteSystem WHERE sitecode='CEN' AND status <> 0

Update status record to set new status:
UPDATE dbo.Summarizers_Status SET status=0 WHERE sitecode='CEN'

Wednesday, September 28, 2011

Run program based on Config Mgr. task sequence variables

I regularly come across tasks where it is necessary to execute an MSI or EXE file with separate parameters based on ex. geographical location, organization structure, Production/Test environment etc.
To manage this I create a script based on Task sequence variables and execute the program by using these variables.  

These Task Sequence variables can either be set as collection variables in Config Mgr. or as a fronted HTA. 

Usage: Place the script in the same package/folder as the MSI/EXE you want to execute.

This script gathers a total of five Task Sequence variables (ProductionORTest, testenvironment-BaseSERVER, testenvironment-DBSERVER, Production-DBSERVER, Production-BaseSERVER).  All the variables are set by a Fronted HTA that has been created. The variables could also have been set to Confg Mgr. collections containing machine accounts for either test or production.

In the below sample script the Task sequence variable “ProductionORTest” is used to determine if the MSI file should install an client in production environment or in test environment.


Save below sample script as ZTI-RunProgramTSvar.vbs

' //*************************************************************************
' // ***** Script Header *****
' // 
' // File: ZTI-RunProgramTSVar.vbs
' //
' // Purpose: Execute program (MSI/EXE) based on Task Sequence Variables
' //
' // Usage: cscript ZTI-RunProgramTSVar.vbs
' //
' // Script Version: 1.0.0
' //
' // 1.0.0  Created by Ole Skovgaard (www.Infrahouse.com)
' //
' // Customer History:
' //
' // ***** End Header *****
' //*************************************************************************

Onerrorresumenext

Dim objShell
Dim objFSO

Set objShell        = WScript.CreateObject("WScript.Shell")
Set objFSO          = CreateObject("Scripting.FileSystemObject")

strWinDir             = objShell.ExpandEnvironmentStrings("%SYSTEMROOT%")
strSystemDir         = objShell.ExpandEnvironmentStrings("%SYSTEMDRIVE%")

objShell.CD           = objFSO.GetParentFolderName(Wscript.ScriptFullName)
ScriptDir              = objShell.CD

Set env               = CreateObject("Microsoft.SMS.TSEnvironment")

ProductionORTest    = env("ProductionORTest")


IfLCase(ProductionORTest) = LCase("testenvironment") Then

BaseSERVER          = env("testenvironment-BaseSERVER")
DBSERVER            = env("testenvironment-DBSERVER")
Else

BaseSERVER          = env("Production-BaseSERVER")
DBSERVER            = env("Production-DBSERVER")

EndIf


Command =  "MSIEXEC /i """ & ScriptDir & "\Setup.msi"" /l*v+ " & strSystemDir & "\Setup.log /qb ALLUSERS=1 BaseSERVER=" & BaseSERVER & " DBSERVER=" & DBSERVER

irun = objShell.Run(Command, 0, true)

Monday, September 19, 2011

Configuration Manager Support Announcements for August 2011

Configuration Manager 2007 now supports Microsoft SQL Server 2008 R2 SP1 and Microsoft SQL Server 2008 SP3.

System Center Configuration Manager 2007 SP2, R2 and R3 now supports Microsoft SQL Server 2008 R2 SP1 and Microsoft SQL Server 2008 SP3 as a Configuration Manager 2007 site database.

The Reporting Service Point site system role and Client Status Reporting feature found in System Center Configuration Manager 2007 R2 and R3, are also supported with these versions of SQL Server.

No software updates are required.

Read more:
System Center Configuration Manager Team


Configuration Manager Supported Configurations:
http://technet.microsoft.com/en-us/library/bb680717.aspx

Wednesday, September 14, 2011

Windows 8 - Detailed preview

Microsoft showcased a detailed preview of the next major release of Windows

 Touch-First User Interface

  • Metro style. Windows 8 introduces a new Metro style interface built for touch, which shows information important to you, embodies simplicity and gives you control. The Metro style UI is equally at home with a mouse and keyboard as well.

  • Touch-first browsing, not just browsing on a touch device. Providing a fast and fluid touch-browsing experience, Internet Explorer 10 puts sites at the center on new Windows 8 devices.

More Ways to Engage With Powerful, Connected Apps

  • Powered by apps. Metro style apps built for Windows 8 are the focal point of your experience, filling your entire screen so there are no distractions.

  • Apps can work together. Apps communicate with each other in Windows 8. For example, you can easily select and email photos from different places, such as Facebook, Flickr or on your hard drive.

  • Your experience syncs across your devices. Live roams all the content from the cloud services you use most — photos, email, calendar and contacts — keeping them up-to-date on your devices. With SkyDrive, you can access your files, photos and documents from virtually anywhere with any browser or with Metro style apps in Windows 8.

Enhanced Fundamentals

  • The best of Windows 7, only better. Windows 8 is built on the rock-solid foundation of Windows 7, delivering improvements in performance, security, privacy and system reliability. Windows 8 reduces the memory footprint needed — even on the lowest-end hardware — leaving more room for your apps.

  • Preserving power-user favorites and making them better. For those who push the limits of their PC, Windows 8 features an enhanced Task Manager and Windows Explorer and new, flexible options for multimonitor setups.



Duplicate Records When You Use Unknown Computer Support with Active Directory Delta-Discovery

Known Issue and Workaround: You might see duplicate records when you use unknown computer support with Active Directory Delta-Discovery in Configuration Manager 2007 R3.

Read more:
http://blogs.technet.com/b/configmgrteam/archive/2011/09/09/known-issue-and-workaround-duplicate-records-when-you-use-unknown-computer-support-with-active-directory-delta-discovery.aspx

Friday, July 22, 2011

Configuration Manger 2007 PXE & DHCP on the same server (Quick Guide)

1.       Make sure that the server do not have PXE installed
a.       Remove all bootimage images from the affected PXE server Distribution Point
b.      From the console, remove the PXE service role.
c.       Check the Program Files\Microsoft Configuration Manager\Logs\PXEsetup.log to verify that the role is removed successfully.
d.      Remove the Windows Deployment Service.
e.      Reboot the Configuration Manager site server, if WDS was installed on the site server.
2.       Install WDS but do not configure it.
3.       Assuming DHCP and WDS are installed on the same Configuration Manager server,
a.       Make sure that DHCP Option 60 is set
                                                               i.      NETSH
                                                             ii.      NETHSH>DHCP server \\nameofserver
                                                            iii.      add optiondef 60 PXEClient String 0 comment=”Option added for PXE Support”
                                                           iv.      set optionvalue 60 STRING PXEClient
                                                             v.      show optionvalue all
                                                           vi.      exit
b.      Enabled and choose don’t listen on port 67.
                                                               i.      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WDSServer\Providers\WDSPXE
                                                             ii.      Set the UseDHCPPorts registry value to 0
4.       Install the PXE service role from the console
5.       Check the PXEsetup.log to verify that the role was installed successfully.
6.       Update the PXE distribution points for the boot images now that the new role is installed.
7.       The target client should now be able to PXE boot to the Configuration Manager server.