Showing posts with label System Center. Show all posts
Showing posts with label System Center. Show all posts

Wednesday, May 23, 2018

System Center Service Manager HTML email notification

When you are using  HTML template, now the formatting is stripped; cause a line break should be written as <br /> and not with the enter key on the keyboard.
The solution to this is to use <pre>

Just add to your incident description in html:
<pre>$Context/Property[Type='WorkItem!System.WorkItem']/Description$</pre>

Source

System Center Service Manager delete the items and reset

After Installing new Service Manager server to delete test incidents, and reset IR number follow this instruction: 

Install the SMLets database on the SCSM server, 
open the Powershell  to removal of Incident events:
Import-Module SMLets
Get-SCSMObject -Class (Get-SCSMClass -Name System.WorkItem.Incident$) | Remove-SCSMObject -Force -Confirm

Login to the Service Manager database (SQL Server):
select * from AutoIncrementAvailableRange

Select MT.TypeName,MT.ManagedTypeId,MTP.ManagedTypePropertyName,MTP.ManagedTypePropertyID,AIAR.FirstAvailableValue
from ManagedType as MT, ManagedTypeProperty as MTP, AutoIncrementAvailableRange as AIAR
where MT.ManagedTypeId = AIAR.ManagedTypeId and MTP.ManagedTypePropertyId = AIAR.ManagedTypePropertyId

All project number, is according to the table in the last line of data coding, that is to say, if you want to make Incident ID digital restart from the beginning of 1, change:

update AutoIncrementAvailableRange
set FirstAvailableValue = 1 
where ManagedTypeId = 'F59821E2-0364-ED2C-19E3-752EFBB1ECE9' and ManagedTypePropertyId = '28B1C58F-AEFA-A449-7496-4805186BD94F'

*If youare using Datawarehouse  Server , to reset reports, most easy way is to unregister dataworhouse server and install new  server.



Monday, May 21, 2018

Remove Incident SCSM


To remove for example IR10:

Import-Module SMLets

Get-SCSMClassInstance -Class (Get-SCSMClass -Name System.WorkItem.Incident) | Where-Object {$_.ID -eq "IR10"} | Remove-SCSMClassInstance

Monday, April 16, 2018

System Center remove all Incdents

After testing fresh installed server  to remove all test incidents use SMLets:

install SMLets.msi

run powershell as Administrator

Import-Module SMLets

$IRClass = Get-scsmclass System.WorkItem.Incident$
$IRsList = Get-SCSMObject -Class $IRClass 

Foreach ($IR in $IRsList) { 
     Remove-SCSMObject $IR -Confirm:$False -Force
}

Thursday, March 15, 2018

Service Manager 2012 service not starting after update KB2677070


After applying the recently released security update KB2677070 the System Center Data Access Service and the System Center Management Configuration Service wont start. Both services will log a "Error 1053: The service did not respond to the start or control request in a timely fashion"



Change the Group Policy settings. To do this, follow these steps:
  1. Under the Computer Configuration node in the Local Group Policy Editor, double-click Policies.
  2. Double-click Windows Settings, double-click Security Settings, and then double-click Public Key Policies.
  3. In the details pane, double-click Certificate Path Validation Settings.
  4. Click the Network Retrieval tab, click to select the Define these policy settings check box, and then click to clear the Automatically update certificates in the Microsoft Root Certificate Program (recommended) check box.
  5. Click OK, and then close the Local Group Policy Editor.

Monday, August 15, 2016

Install System Center Operation Manager

SCOM PREREQUISITES :

Start-Transcript -Path c:transcript0.txt -noclobber
# This scripts needs unrestricted access
Write-Host "This scripts needs unrestricted access (Set-ExecutionPolicy Unrestricted.)" -ForegroundColor Green
Write-Host "The prereq setup for System Center 2012 R2 Operations Manager takes around 15 minutes depending on your internet speed" -ForegroundColor Green
# Setting the variables.
$folderpath0 = 'C:Source'
$ShareName = "Source$"
#Check if folder exists, if not, create it
if (Test-Path $folderpath0){
Write-Host "The folder $folderPath0 exists."
} else{
Write-Host "The folder $folderPath0 does not exist, creating..." -NoNewline
New-Item $folderpath0 -type directory | Out-Null
Write-Host "done!" -ForegroundColor Green
}
# Check if file exists, if not, download it
$file0 = $folderPath0+"SQLSysClrTypes.msi"
$file1 = $folderPath0+"Reportviewer.msi"
if (Test-Path $file0){
write-host "The file $file0 exists."
} else {
# Download System CLR Types for SQL Server 2012
Write-Host "System CLR Types for SQL Server 2012" -nonewline -ForegroundColor yellow
$clnt = New-Object System.Net.WebClient
$url = "http://download.microsoft.com/download/F/E/D/FEDB200F-DE2A-46D8-B661-D019DFE9D470/ENU/x64/SQLSysClrTypes.msi"
$clnt.DownloadFile($url,$file0)
Write-Host "done!" -ForegroundColor Green
}
if (Test-Path $file1){
write-host "The file $file1 exists."
} else {
# Download Microsoft Report Viewer 2012 Runtime
Write-Host "Microsoft Report Viewer 2012 Runtime" -nonewline -ForegroundColor yellow
$clnt = New-Object System.Net.WebClient
$url = "http://download.microsoft.com/download/F/B/7/FB728406-A1EE-4AB5-9C56-74EB8BDDF2FF/ENU/x86/ReportViewer.msi"
$clnt.DownloadFile($url,$file1)
Write-Host "done!" -ForegroundColor Green
}
# Install Windows Features.
Get-Module servermanager
Install-WindowsFeature -Name Web-Server
Install-WindowsFeature -Name Web-Default-Doc
Install-WindowsFeature -Name Web-Dir-Browsing
Install-WindowsFeature -Name Web-HTTP-Errors
Install-WindowsFeature -Name Web-Static-Content
Install-WindowsFeature -Name Web-Http-Logging
Install-WindowsFeature -Name Web-Request-Monitor
Install-WindowsFeature -Name Web-Stat-Compression
Install-WindowsFeature -Name Web-Filtering
Install-WindowsFeature -Name Web-Windows-Auth
Install-WindowsFeature -Name Web-Net-Ext
Install-WindowsFeature -Name Web-Net-Ext45
Install-WindowsFeature -Name Web-Asp-Net
Install-WindowsFeature -Name Web-ISAPI-Ext
Install-WindowsFeature -Name Web-ISAPI-Filter
Install-WindowsFeature -Name Web-Mgmt-Console
Install-WindowsFeature -Name Web-Metabase
Install-WindowsFeature -Name NET-Framework-Core
Install-WindowsFeature -Name NET-HTTP-Activation
Install-WindowsFeature -Name NET-WCF-HTTP-Activation45
Install-WindowsFeature -Name Windows-Identity-Foundation
Install-WindowsFeature -Name Telnet-Client
# Install System CLR Types for SQL Server 2012
Write-Host "Installing System CLR Types for SQL Server 2012.." -nonewline
$PSScriptRoot = Split-Path -Path $MyInvocation.MyCommand.Path
msiexec /qb /i "$folderPath0SQLSysClrTypes.msi" | Out-Null
Write-Host "done!" -ForegroundColor Green
Start-Sleep -s 10
# Install Microsoft Report Viewer 2012 Runtime
Write-Host "Microsoft Report Viewer 2012 Runtime.." -nonewline
$PSScriptRoot = Split-Path -Path $MyInvocation.MyCommand.Path
msiexec /qb /i "$folderPath0ReportViewer.msi" | Out-Null
Write-Host "done!" -ForegroundColor Green
Start-Sleep -s 10
Write-Host "The server needs to be restarted before you start the System Center 2012 R2 Operations Manager installation." -nonewline -BackgroundColor Black -ForegroundColor Red
Stop-Transcript




 Install Sql server
Database
new SQL instance: SCOM


SQL Server role: Database Engine Services, Full-Text Search and Reporting Services


SQL Memory Limitation: 8G

SQL Server Agent: Operational, only for SCOM reporting server start and check automatic.


SCOM server



Just all server role in one server except the reporting services


We should passed all of the prerequisites now

Create a new management group

Configure the operational database: the first 7 days database

Configure the warehouse database

Install Web console, SSL is optional, but I’d like to have a HTTPS web console site




Configure all of the service account, for my small lab, I just use the same service account

I’m lazy just give the service account domain admin privilege, ignore the warning


All done, enjoying play with SCOM 2012 R2


Install SCOM reporting server: Operational
Switch to the SQL server reporting service server which you want to install the SCOM reporting server on, install the reporting server from the SCOM installation media
Select "Reporting server"

Specify the SCOM Management server

Specify the SQL server reporting server instance and the service account


Now we can see something created in the SQL server reporting

And the "Reports" tab shown up in the SCOM management console