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

Reset password to all users in OU


Get-ADUser -Filter * -SearchScope Subtree -SearchBase "OU=Users,OU=test,DC=test,DC=local" -Server test.local|   Set-ADAccountPassword -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "pass-123" -Force)

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, April 12, 2018

Remote Desktop Application use Remote server Keyboard layout

In Remote desktop application cannot switch keyboard layout, there is only ENG keyboard, and you cannot switch to your computer keyboard layout.
To fix this add keyboard layout, what you want on terminal server and add to registry dword.

Open regedit on terminal server:

add new Dword  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout

"IgnoreRemoteKeyboardLayout"=dword:00000001 

Wednesday, April 11, 2018

Gpupdate /force failes

delete all from :

C:\ProgramData\Microsoft\Group Policy\History