Showing posts with label from. Show all posts
Showing posts with label from. Show all posts

Thursday, 22 June 2017

How to stop SCCM from installing Files on System or C drive

* SCCM by default install site server role component on first available NTFS drive.

* In order to avoid the files being installed, we need to create a magic file on the drive so that SCCM understand and ignore me.

*The Magical file name is "no_sms_on_drive.sms"

* You need to create this empty file and place on the drive which you want SCCM to ignore.

Wednesday, 26 April 2017

Install Bash Shell on Windows to Execute Linux Commands from Windows

Install Bash Shell on Windows to Execute Linux Commands from Windows


  • To install Bash,your PC should be running a 64-bit version of Windows 10 Anniversary Update build 14393 or later
  • Now Open Settings -> Update and Security -> For developers
  • Select the Developer Mode radio button

  • Then from Start, search for "Turn Windows features on or off" (type 'turn')
  • Select Windows Subsystem for Linux (beta)

  • Click OK
  • Now Open a PowerShell prompt as administrator and run:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux


  • Restart your computer when prompted

Saturday, 10 September 2016

Windows 10 Upgrade Failed with Error code 0x80200056 while deploying from SCCM 2012 R2

Windows 10 Upgrade Failed with Error code 0x80200056 while deploying from SCCM 2012 R2


  • Windows 10 Upgrade Pushed from SCCM can fail because of various reasons.
  • You need to read the error code and understand it to further troubleshoot.
  • One of the frequest errors i see while upgrade is Error code "0x80200056"
  • This error means that there was some interuption while u upgrade the OS.
  • Reason couble be user has switched off the Laptop,Or it got restarted because of some power issues, or Network got disconnected.
  • To fix this instruct the user not to turn off or disconnect the PC from network till the upgrade is compelete.This should resolve the issue

Windows 10 Upgrade failed with error 0x80073712 while deploying from SCCM 2012 R2

Windows 10 Upgrade failed with error 0x80073712 while deploying from SCCM 2012 R2


  • Windows 10 Upgrade is giving lot of issues.
  • There are also lot of complains. One error i see while Deployement fails is with error code "0x80073712"
  • This error indicates that there is issue with the file which is needed is damaged or missing.
  • Mostly your ISO that you created is missing some files or is damaged.
  • So make a fresh copy of ISO from Install media and try again
  • This time it succeded without any errors.

Monday, 5 September 2016

How to Login to your Azure from PowerShell

How to Login to your Azure from PowerShell

  • To login to your Azure account, use the Add-AzureRmAccount cmdlet.

Add-AzureRmAccount

  • The cmdlet prompts you for the login credentials for your Azure account. 
  • After logging in, it downloads your account settings so they are available to Azure PowerShell.
  • The account settings expire, so you need to refresh them occasionally. 
  • To refresh the account settings, run Add-AzureRmAccount again.

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, 29 March 2016

Upgrading an Operating System from Windows 2003 to Windows 2008: How to Prevent Discovery Problems

Upgrading an Operating System from Windows 2003 to Windows 2008: How to Prevent Discovery Problems


  • Before you upgrade the operating system on a monitored computer, uninstall the Operations Manager agent. After the upgrade, reinstall the Operations Manager agent.

Reason:

  • The objects that the management pack discovers, such as logical disks, are hosted by a parent class that is not version-specific. When you upgrade the operating system, the order in which discovery occurs can result in duplicate objects being discovered.
  • For example, you upgrade a computer running Windows Server 2003 to Windows Server 2008. 
  • If the Windows Server 2003 discovery rules run first after the upgrade, the instance of the computer running Windows Server 2003 and its objects will be removed from discovery because the operating system base class has been removed. When the Windows Server 2008 discovery rules run, the computer and its objects will be discovered again.
  • If the Windows Server 2008 discovery rules run first after the upgrade, the computer running Windows Server 2008 and its objects will be discovered. When the Windows Server 2003 discovery rules run, the instance of the computer running Windows Server 2003 will be removed from discovery, but the objects hosted by that instance will not be removed.
  • So If you upgrade a computer without uninstalling the agent first and then discover duplicate objects, uninstall the agent to mark all hosted objects as deleted in the database. Next, reinstall the agent to only discover existing applications/objects.  


Monday, 8 February 2016

RightFax Management Pack from Infront consulting


RightFax Management Pack from infront

  • Infornt Consulting has released a deep dirve Management pack for RightFax.
  • This helps Montior RightFax End to end and give great visibility of the problems that arises.
  • You can see a detail video from Infornt Consulting on how it works below


Sunday, 21 June 2015

Powershell Command to create Folder

Command to create Folder from Powershell


  • Powershell is very powerful tool.You can create a Folder from within Powershell using "MD" command
Below command creates a folder called test4 from within Powershell.

md "c:\test4"

Powershell Script to get Event from Application Event Log

Powershell Script to get particual Event from Application Event Log



.You can use the below script to get Eventlog message using Powershell.

$Server='Your Computer Name"
$Yesterday="From Date in DD/MM/YYYY format"
$Today="To Date in DD/MM/YYYY format"
$Event = "Event ID you are looking for"
Get-EventLog -ComputerName $Server -LogName "Application" -after $Yesterday -before $Today| where {$_.EventID -eq $Event}

Tuesday, 9 June 2015

Powershell Command to extract sealed Management pack from SCOM 2012 R2

Powershell Command to extract sealed Management pack from SCOM 2012 R2:


  • Many times we face situation where we want to export the sealed MP's
  • But guess what the MP was earlier imported by 1 of your collegue and he is no longer in the organization
  • Then you don't know where the MP's are and you can;t export sealed MP's in SCOM .
  • But there ise Command Shell (SCOM version of Powershell to help you)
  • Get-SCOMManagementpack "*veeam*" | Export-SCOMManagementpack -Path "c:\export" 
  • This command will get you the sealed Management pack in xml form which is the same.
  • This xml version will also help you customize the vendor provided MP.

Wednesday, 22 April 2015

Exchange 2010 MP not raising alerts after upgrading from SCOM 2007 to SCOM 2012 R2

Exchange 2010 MP not raising alerts after upgrading from SCOM 2007 to SCOM 2012 R2


  • Recently we upgraded from SCOM 2007 to SCOM 2012, after upgrade we also migrated the MP's.
  • Everything seems to work fine and after couple of days we got a call from Exchange team that they are not receiving Exchange 2010 related alerts.
  • Exchange 2010 raises alerts based on correlation engine. So Correlation Engine decides when to raise an alert.
  • So we immediately went and check on the RMS emulator server where the correlation engine was installed.
  • We checked the "Application Logs" and there is lot of  Event ID 717 logged.
  • When further investigated we found that the Exchange Correlation Auto alert resolution feature is failing because of which you see this Event ID 717.
  • Looks like Exchange 2010 Correlation Engine is no longer compatible with SCOM 2012.
  • To resolve this 
  • We uninstalled the Exchange Correlation engine from Management Server (RMS emulator).
  • We Installed Exchange Correlation engine on normal system which is not a Management Server.
  • Then Stopped the Microsoft Exchange Monitoring Correlation service and Copied SCOM 2007 R2 SDK binaries into the Correlation Engine install directory %\Program Files\Microsoft\Exchange Server\v14\Bin. 
  • Microsoft.EnterpriseManagement.OperationsManager.Common.dll
  • Microsoft.EnterpriseManagement.OperationsManager.dll
  • MomBidLdr.dll
  • Start the Microsoft Exchange Monitoring Correlation and the alerts started flowing again.

Sunday, 21 December 2014

Show-Eventlog:How to open Event viewer from Powershell

How to open Event viewer from Powershell


  • Manytime you might want to open Eventviewer while working in Powershell.
  • There is a way to directly open the event viewer from Powershell.
  • The Command is Show-Eventlog

  • This will directly open the event viewwer from the Powershell

Saturday, 20 December 2014

SCOM 2012 maintenacemode from Powershell or Command Shell

SCOM 2012 maintenacemode from Powershell or Command Shell


  • Now you can set the maintenace mode in SCOM using command shell or powershell
  • You the following command Start-SCOMMaintenanceMode

Thursday, 1 August 2013

How to get Rule Name from Instance ID.

Lot of times in SCOM you will get the Instance ID and Workflow name of the rule that is causing the error.

This is of no use in troubleshooting as you dont knwo the Rule that is causing the issue.

Follow the below steps to decode the Rule Name from WorkFlow Name


  • From the Error Copy the "WorkFlow Name"
  • Now connect to the "OperationsManager" database and run the below SQL query


               SELECT * FROM Rules WHERE RuleName = ‘MomUIGeneratedRulexxxxx’

 Replace "MomUIGeneratedRulexxxxx" with the data you got from WorkFlow Name


  • The query will retun lot of column's, you need to check the "RuleID field" coloum and copy the information



  • Now login to you SCOM RMS and open Command Shell and thpe the below command


                                  Get-Rule -Id XXXX-XXX-XXXX

Replace "XXXX-XXX-XXXX" with the info that you got from the "RuleID field" coloum of the SQL query


  • This command will return information about this rule, Copy the DisplayName and find the rule in the Operations Console and troubleshoot it.