Sunday 24 April 2016

Special Characters that can be used in Windows PowerShell output

Special Characters that can be used in Windows PowerShell output


Special Characters that can be used in Windows PowerShell output are below this will be useful when you want to include these below special characters in your output.

  • `0 -- Null
  • `a -- Alert
  • `b -- Backspace
  • `n -- New line
  • `r -- Carriage return
  • `t -- Horizontal tab
  • `' -- Single quote
  • `" -- Double quote

ADD-Content: Powershell command to add content to text file.

ADD-Content: Powershell command to add content to text file.

  • There are times when you want to ADD a content to text file after taking some actions in powershell
  • ADD-Content is the Command to use to add.
ADD-CONTENT C:\TEMP\test.txt "This is the Begning"

  • One more scenario is that you have list of text files and want to add a common thing to all then you can use the WildCards like below
$NTime=Get-Date
ADD-CONTENT C:\Temp\*.txt $Ntime

  • This will add the current date and time to all the text files in temp folder.

SCOM 2012 R2 Windows Server 2012 R2 Storage Direct Management Pack

SCOM 2012 R2 Windows Server 2012 R2 Storage Direct  Management Pack


  • Microsoft has released a new Storage Management Pack for Window Server 2012 R2.
  • This management pack supports up to:
    16 Storage Nodes
    12 Storage Pools
    120 File Shares.
  • This Management Pack contains rules to monitor physical disk and enclosure state in storage spaces.
  • Health is calculated by the storage service and is passed to Virtual Machine Manager (VMM) using the Storage Management API (SM-API), and is in turn passed to Operations Manager (OM) through the OM connector for VMM.

  • There are no state or alert visualizations as part of this MP. 
  • All alerts for physical disks and enclosures must be manually closed and any health state impact manually reset.
  • You can see file share and storage pool health on the VMM Fabric Dashboard or you can build your own views in a custom MP. 
  • If OM agent proxy setting is not enabled for file server nodes and VMM server, it needs to be turned on. This can be done from Administration space in OM console.
You can see the Rollup Model below for the MP


You can Download the Management pack from here -->Click here to download

Tuesday 19 April 2016

How to Remove SCOM Certificates Imported with MOMCertImport Tool in SCOM 2012 R2

How to Remove SCOM Certificates Imported with MOMCertImport Tool in SCOM 2012 R2


To remove a SCOM certificates imported with the MOMCertImport tool

  • Log on to the computer with an account that is a member of the Administrators group.
  • On the Windows desktop, click Start, and then click Run.
  • In the Run dialog box, type cmd, and then click OK.
  • At the command prompt, type <drive_letter>: (where <drive_letter> is the drive where the System Center 2012 – Operations Manager installation media is located), and then press ENTER.
  • Type cd\SupportTools\amd64 and then press ENTER.
  • Type the following:
  • MOMCertImport /Remove, and then press ENTER.

Monday 18 April 2016

Step by Step Guide to recovery or Move Operations Manager Database from Old Server to New Server

Step by Step Guide to Move Operations Manager Database from Old Server to New Server




  • Step1:Stop Operation Manager services
On all the management servers in the management group, stop the Operations Manager services:
* System Center Data Access
* System Center Management
* System Center Management Configuration

  • Step2: Create Backup of Old OperationManager Database and move it to new Server

* On the original operational database server, use Microsoft SQL Server Management Studio to create a full backup of the operational database. The DB name is OperationsManager.
* Copy the backup file to a local drive of the new database server.

  • Step3: Restore the operational database on the new server

* Use Microsoft SQL Server Management Studio to restore the operational database.In this step, you can change the name of the database and choose the file location.
* Make the database online.verify that the database is online.

  • Step4:Update the registries and configuration files on the management servers

* Do these steps on each management server in the management group:
* Update the registry to refer to the new SQL Server-based computer.
*Log on to the management server with Administrator permissions.
* Click Start, select Run, type regedit in the Open box, and then click OK to start Registry Editor.
* Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Setup.
* For each of the following keys, double-click the name, change the value to the hostname of the SQL Server-based computer now hosting the operational database, and then click OK to save   your changes.
  1. DatabaseName
  2. DatabaseServerName
* Close the Registry Editor.
On each management server, edit the following file:

* %ProgramFiles%\System Center 2012\Operations Manager\Server\ConfigService.config 

* In the <Category> tags named “Cmdb” and “ConfigStore”, change the value for ServerName to the name of the new SQL server.

Step5: Update Operations Database to point to new server

* Open SQL Server Management Studio.
* Expand Databases, OperationsManager, and Tables.
* Right-click dbo.MT_Microsoft$SystemCenter$ManagementGroup, and then click Edit Top 200 Rows.
* Note If the SCOM was installed by upgrading from SCOM 2007 instead of by using the SCOM 2012 install media, you need to modify the dbo.MT_ManagementGroup table instead of the   dbo.MT_Microsoft$SystemCenter$ManagementGroup table.
* Change the value in the SQLServerName_6B1D1BE8_EBB4_B425_08DC_2385C5930B04 column to reflect the name of the new SQL Server-based computer.
  Save the change.

Step6: On the new server, update the operational database with the new database server name to specify the location of the Application Performance Monitoring tables

* Open SQL Server Management Studio.
* Expand Databases, OperationsManager, and Tables.
* Right-click dbo.MT_Microsoft$SystemCenter$OpsMgrDB$AppMonitoring, and then click Edit Top 200 Rows.
* Change the value in the MainDatabaseServerName_5C00C79B_6B71_6EEE_4ADE_80C11F84527A column to reflect the name of the new SQL Server-based computer.
* Save the change.

Step7: Update security credentials on the new server hosting the operational database

Expand Security, expand Logins, and then do the following:

* Add the data writer account. For more information, see How to Create a SQL Server Login.
* Add the action account.
* Add the Data Access Service (DAS) computer account, using the form “domain\computername$”.

For the DAS computer account, add the following user mappings:
* ConfigService
* db_accessadmin
* db_datareader
* db_datawriter
* db_ddladmin
*db_securityadmin

Step8: Execute these SQL commands on new Operations database instance:

 sp_configure ‘show advanced options’,1
 reconfigure
 sp_configure ‘clr enabled’,1
reconfigure
sdk_users
sql_dependency_subscriber


Run the following SQL query:

SELECT is_broker_enabled FROM sys.databases WHERE name='OperationsManager'

If the result of this query was an is_broker_enabled value of 1, skip this step. Otherwise, run the following SQL queries:

ALTER DATABASE OperationsManager SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE OperationsManager SET ENABLE_BROKER
ALTER DATABASE OperationsManager SET MULTI_USER

  • Step9: Start Operation Manager services

On all the management servers in the management group, start the Operations Manager services:
* System Center Data Access
* System Center Management
* System Center Management Configuration

Saturday 16 April 2016

Test-Connection:Powershell alternate command to Ping is Test-Connection

Powershell alternate command to Ping is Test-Connection



  • Ping is the first network utility that we use to test the connection
  • In Powershell Ping is called Test-Connection
  • It provides the same functionality of Ping

Tuesday 12 April 2016

ADD-ADGroupMember:Powershell Command to ADD users to AD group

Powershell Command to ADD users to AD group

  • Today we will see how to add Active Directory users to Active directory group.
  • To add users to AD group use "ADD-ADGroupMember" command.
Ex: To add 2 users Mark and Kathy to the Security group "WebAdmins" Group

ADD-ADGroupMember WebAdmins Mark,Kathy

SCOM Management Server showing warning with Event ID 1825 - A security package specific error occurred

SCOM Management Server showing warning with "Event ID 1825 - A security package specific error occurred"


  • Today when i checked the SCOM management Server it was in Warning state.
  • When i open the health explorer i could see only "Failed to access event log" is selected and its in warning state with error in details "A security package specific error occurred".
  • When i tried to access the event log from the SCOM management server it failed with the same error.
  • so i decided to do a nslookup of the server and found that the reverse lookup is pointing to the alias of the server rather then the actual server name.
  • Once it was resolved things got health again.
  • So when you have this issue, its usually issue with the DNS entries which needs to be fixed

Wednesday 6 April 2016

How to get list of All commands for SCOM 2012 R2 Module in Powershell

How to get list of All commands for SCOM 2012 R2 Module in Powershell


  • Today i am going to Show you how get list of all commands available in SCOM module.
  • First Open the Powershell and Import the SCOM module
                    Import-Module OperationsManager
  • This will load the SCOM module in Powershell
  • Then to see all the commands in the OperationsManager Modulle type the below command
                   get-command - module OperationsManager | more
  • This will list all the commands in SCOM.

Tuesday 5 April 2016

Easy way to access your network cards and configure them - ncpa.cpl

Easy way to access your network cards and configure them -ncpa.cpl

  • Opening the network card is a bit of challenge in the computer. It usually takes to network page from where you have to again click on another tab to go to your network card. I was always feeling if there is easy way to do it and the yes there is
  • Click on Start --> in search box type "ncpa.cpl"
  • This will directly open the Network card page.
  • I hope it makes your life easier like mine :)