Friday, April 13, 2012

Display Computer Information during an OS Deployment

Our CTO and founder Thorbjörn Sjövold came up with this handy little utility for displaying some computer information during the preinstall phase of an OS Deployment.
As Specops Deploy /OS is built on top of standard components such as MDT 2010 Update 1 it's easy for admins to manipulate steps within the task sequences to carry out additional functionality such as adding an email post os install or displaying some handy information during the preinstall phase like so..








Here's how you do it.. 


  • Download the sample HTA here and save it to <InstallationDrive>\Specops\Deploy\DeploymentRepository\Scripts directory on your Specops Deploy Image Server.
  • On the Specops Deploy /OS Image Server open the Microsoft Deployment Toolkit Deployment Workbench.
  • Open a Deployment Share and navigate to the Specops Deployment Respository which resides in  <InstallationDrive>\Specops\Deploy\DeploymentRespository.
  • Navigate to the Task Sequences node, right click on the installation Task Sequence that you want to have the computer information dialog in and select Properties.


  • Select the Task Sequence tab, open the Preinstall node and select the Report progress step
 

  • Select the add button and under general choose "Run Command Line"

  • Set the name to Display Computer Information (by default it says Run Command Line)
  • Set the Command line to cmd.exe /c start "" mshta.exe "%SCRIPTROOT%\SpecopsComputerInfo.hta"


  • Press OK and close all dialogs and the Deployment Workbench
  • Finally open the Specops Deploy /OS Admin tools and select the Image Server and Publish Deployment Repository to have the change pushed out to the Deployment Servers.
 
 
  • Start your deployment and you should see the computer information displayed during the preinstall phase.






Tuesday, April 10, 2012

Unable to Start the Specops Deploy Server service


Sometimes when the Specops Deploy Server Service attempts to start you receive an error saying the service is unable to start.  The details of the event log error message are as follows

====
Critical error when starting the service.
Exception is 'System.InvalidOperationException: Custom counters file view is out of memory.
   at System.Diagnostics.SharedPerformanceCounter.CalculateMemory(Int32 oldOffset, Int32 totalSize, Int32& alignmentAdjustment)
   at System.Diagnostics.SharedPerformanceCounter.CreateInstance(CategoryEntry* categoryPointer, Int32 instanceNameHashCode, String instanceName, PerformanceCounterInstanceLifetime lifetime)
   at System.Diagnostics.SharedPerformanceCounter.GetCounter(String counterName, String instanceName, Boolean enableReuse, PerformanceCounterInstanceLifetime lifetime)
   at System.Diagnostics.SharedPerformanceCounter..ctor(String catName, String counterName, String instanceName, PerformanceCounterInstanceLifetime lifetime)
   at System.Diagnostics.PerformanceCounter.Initialize()
   at System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName, String instanceName, Boolean readOnly)
   at SpecopsSoft.SpecopsDeploy.Server.ServerPerformanceCounters.SetInstanceValue(Guid instanceName, Int32 instanceValue, DeploymentOperationClientState clientStateToSet)
   at SpecopsSoft.SpecopsDeploy.Server.SpecopsDeployServer.SynchronizePerformanceCounters()
   at SpecopsSoft.SpecopsDeploy.Server.SpecopsDeployServer.Initialize()
   at Specopssoft.GroupPolicy.GpExtensionServerBase.Start()
   at SpecopsSoft.SpecopsDeploy.Server.SpecopsDeployService.OnStart(String[] args)'
====

This error can be caused when .Net hits the cap for the amount of memory it is allowed to allocate to performance counters.

Make the following configuration change on the Specops Deploy Server to increase the amount of memory available for this purpose:

Add the following three lines  within the configuration section of the machine.config file in %windir%\Microsoft.NET\Framework\v2.0.50727\CONFIG for x86 based systems or %windir%\Microsoft.NET\Framework64\v2.0.50727\CONFIG for x64 based systems

<system.diagnostics> 
<performanceCounters filemappingsize="1048576" /> 
</system.diagnostics>
</configuration>  - Existing line do not modify

You can set the value as high as 33554432 and the default is 524288. The value represents the maximum amount of memory that the performance counters can use.  Save the file to your desktop as machine.config then manually copy of the existing file in the appropriate folder.

Reboot the Specops Deploy Server in order to apply the change correctly.