Wednesday, May 23, 2018

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

Saturday, March 31, 2018

SharePoint 2013 Certificate Error Causes Performance Issues

Opening the Application log within Event Viewer showed the following critical error with the text
“A certificate validation operation took 30015.2428 milliseconds and has exceeded the execution time threshold.  If this continues to occur, it may represent a configuration issue.  Please see http://go.microsoft.com/fwlink/?LinkId=246987 for more details.”
to fix this run sharepoint powershell as Administrator:
$SProotCert = (Get-SPCertificateAuthority).RootCertificate
$SProotCert.Export(“Cer”) | Set-Content C:\SProotCert.cer –Encoding Byte
this command will export certificate to C:\ drive
Open the Certificates MMC by opening a Run command and type MMC.  Choose File -> Add/Remove Snap-in.  Select the Certificates Snap-in and click Add.  On the next screen select Computer account and click Next followed by Local computer and Ok.
Right-click on Trusted Root Certificates and choose All Tasks -> Import
certificate C:\SProotCert.cer
These steps fixed the error on most of our SharePoint servers, but it remained on two.  In order to fix the error on the two remaining servers I configured proxy access through Internet Explorer, then from an elevated command prompt ran “netsh winhttp import proxy source=ie”  This configures Windows to use the IE proxy configuration as a default.  The servers were then able to access the internet and verify the certificates.