Friday, December 14, 2012

Disable services on list of servers

Below script will be useful for disabling the services

'create a file called list.Txt
Set Fso = CreateObject("Scripting.FileSystemObject")
Set InputFile = fso.OpenTextFile("list.Txt")
Do While Not (InputFile.atEndOfStream)
sComputer = InputFile.ReadLine
aTargetSvcs= Array("WDSServer")
'For list of services use below...
'arrTargetSvcs = Array("service1", "service2", "service3")

Set oWMIService = GetObject("winmgmts:" & "{impersonationlevel=impersonate}!\\" _
 & sComputer & "\root\cimv2")
Set cServices = oWMIService.ExecQuery("SELECT * FROM Win32_Service")

For Each oService In cServices
 For Each sTargetSvc In aTargetSvcs
  If LCase(oService.Name) = LCase(sTargetSvc) Then
   If oService.State <> "Stopped" Then
   End If

   If oService.StartMode <> "Disabled" Then   
   End If 

  End If 
MsgBox "Done"


Microsoft System Center products list

Microsoft System Center is a set of server products aimed specifically at helping corporate IT administrators manage a network of Windows Server and client desktop systems.

1.    System Center Advisor – Software as a service offering that helps change or assess the configuration of Microsoft Servers software over the Internet

2.    System Center App Controller - Unified management for public and private clouds, including cloud-based virtual machines and services

3.    System Center Configuration Manager – Configuration management, hardware/software asset management, patch deployment tools for Windows desktops (previously Systems Management Server)

4.    System Center Data Protection Manager – Continuous data protection and data recovery
System Center Endpoint Protection - Anti-malware and security solutions for Microsoft products

5.    System Center Essentials – Combined features of Operations Manager and Windows Software Update Service (WSUS), aimed at small and medium sized businesses
System Center Mobile Device Manager – Mobile device management (PDAs, smartphones, etc.)

6.    System Center Opalis - Opalis is an automation platform for orchestrating and integrating IT tools to decrease the cost of datacenter operations while improving the reliability of IT processes. It enables IT organizations to automate best practices, such as those found in Microsoft Operations Framework (MOF) and Information Technology Infrastructure Library (ITIL). Opalis operates through workflow processes that coordinate System Center and other management tools to automate incident response, change and compliance, and service-lifecycle management processes.

7.    System Center Orchestrator - (formerly Opalis) for orchestration and automation solutions

8.    System Center Operations Manager – Services and application monitoring

9.    System Center Reporting Manager

10.  System Center Service Manager – Ties in with SCOM, SCCM for asset tracking as well as incident, problem, change and configuration management (code name: Service Desk)

11. System Center Virtual Machine Manager 2008 R2 – Virtual machine management and datacenter virtualization


Wednesday, December 12, 2012


Debugging for sccm logs with in the winpe to enable... use  SMSTS.ini  file.


During an OSD Task Sequence, when the PC boots into WinPE from the Boot Image, the SMSTS.log settings are not controlled via the same registry keys as in the full Windows OS. Instead the SMSTS.log settings are controlled via entries in a file called SMSTS.ini file which resides in the Windows directory of WinPE.
In order to change the logging options for the SMSTS.log file while in WinPE, the SMSTS.ini files has to be either created or modified with the appropriate parameters. If no SMSTS.ini file exists in the Windows directory of WinPE, then default values are used. By default, the SMSTS.ini file does not exist in the default Boot Images of ConfigMgr and therefore the default options are used.
The logging options and values that can be modified are:
The value names are basically the same as the registry value names from the full OS, but without the preceding CCM prefix. Similar to logging in the full OS, for the purposes of the SMSTS.log and OSD, the only three parameters that usually are changed are LOGLEVEL, LOGMAXHISTORY, LOGMAXSIZE. The value of LOGMAXSIZE is specified in bytes.
To modify the values, in NotePad, create a SMSTS.ini file with a [Logging] section that contains the parameters that need to be modified. The file then needs to be injected in the Windows directory of the Boot Image. The SMSTS.ini file has to be in place BEFORE the Task Sequence begins in WinPE. For this reason, the SMSTS.ini file cannot be added or copied to the appropriate location as part of the Task Sequence.
For example, to change the SMSTS.log file size to 5MB, set the log level to the most verbose level, and increase the amount of rolled over/historical logs to 3, the following would be the contents of the SMSTS.ini file:
Note: The logging options in the SMSTS.ini file are case sensitive and should be entered in all uppercase.
Injecting the SMSTS.ini file into the Boot Image
ConfigMgr stores files to be injected into the Boot Images under the following two directories on the site server:
x86 Boot Images

x64 Boot Image
The files located in the above two directories are not necessarily automatically injected into the Boot images. An XML file is used which defines which files need to be injected, where the files are located within the BIN directory, and where they need to be copied to within the WinPE Boot Image. The name of this XML file is osdinjection.xml. It is located in the following directory on the site server:
Please note that the above directory is NOT the same as where the files to be injected reside. Additionally only one osdinjection.xml file is needed for both x86 and x64 Boot Images.
To inject the SMSTS.ini file into the Boot Images:
  1. Using NotePad, create an SMSTS.ini file with the desired parameters. When saving the file in NotePad, make sure it has the extension of .ini and not .txt.
  2. Copy the SMSTS.ini file created in Step #1 into the appropriate directories on the ConfigMgr site server where the Boot Images are located. The file has to be copied to two separate directories - one for x86 Boot Image and one for x64 Boot Images.

    The directories to copy the file to are:



  3. Once the SMSTS.ini file is copied to the appropriate directories on the ConfigMgr site server, navigate to the following directory:

  4. Create a backup of the file osdinjection.xml located in the \bin\i386 directory.
  5. Open the original osdinjection.xml file in NotePad. Add sections to both the i386 and x64 portions of the osdinjection.xml file specifying to inject the SMSTS.ini file into the Windows directory of the x86 and x64 Boot Image:
    • For the x86 Boot Image, find the section:


Add the following section immediately after the above section but before the line containing :

  • For the x64 Boot Image, find the section:


    Add the following section immediately after the above section but before the line containing
  • :

  • Save the osdinjection.xml file in NotePad.
  • In the ConfigMgr 2007 console, navigate to "Site Database" --> "Computer Management" --> "Operating System Deployment" --> "Boot Images".
  • Right click on the desired Boot Image to be updated with the SMSTS.ini file and choose "Update Distribution Points".
  • In the "Summary" page of the "Manage Distribution Points Wizard" window, click on the "Next >" button and allow the Boot Image to be rebuilt.
  • Once the Boot Image is finished rebuilding, in the "Wizard Complete" page of the "Manage Distribution Points Wizard" window, click on the "Close" button.
  • Repeat Steps 8-10 for each Boot Image in the environment.
  • Once the Distribution Points have finished updating for each Boot Image, each Boot Image should have the updated log settings for the SMSTS.log.
    As an option, instead of using the above process, after the SMSTS.ini has been created, it can be manually injected into the Windows directory of the Boot Image using ImageX or DISM. However using the above process preserves and does not modify the original Boot Image (boot.wim), so it is the preferred method.

    read here more for enable

    location of smsts.log file
  • Windows PE before HDD format: x:\windows\temp\smstslog\smsts.log
  • Windows PE after HDD format: x:\smstslog\smsts.log and copied to c:\_SMSTaskSequence\Logs\Smstslog\smsts.log
  • Full version Windows before SCCM agent installed: c:\_SMSTaskSequence\Logs\Smstslog\smsts.log
  • Full version Windows after SCCM agent installed: c:\windows\system32\ccm\logs\Smstslog\smsts.log
  • Full version Windows (x64) after SCCM agent installed: c:\windows\sysWOW64\ccm\logs\Smstslog\smsts.log
  • After Task Sequence has finished running: c:\windows\system32\ccm\logs\smsts.log
  • After Task Sequence has finished running (x64): c:\windows\sysWOW64\ccm\logs\smsts.log