1) Click start
2) Click run
3) Type cmd and click ok
4) type wmic bios get serialnumber (Will display the serial number)
5) If you type wmic csproduct get name, this will display the Make and Model Name
Scripts
Run batch file only if service exists
@ECHO OFF
REM – Check for an existing installation of ________________________
REM – For 32 Bit Windows
if exist “C:\Program Files (x86)\app name\software.exe” goto EOF
REM – For 64 Bit Windows
if exist “C:\Program Files\app name\software.exe” goto EOF
REM Deploy SOftware
Your script goes here
REM — End of the script
:EOF
Note: You may need to reenter the speech marks after copying the script to a notepad file
Powershell output results to text file
Event ID 11 There are multiple accounts with name MSSQLSvc
If you’re receiving an event ID 11 within your domain controller event log, you will be seeing an error
similar to the one below.
Event:
There are multiple accounts with name MSSQLSvc/Servername.domain.com:1433 of type DS_SERVICE_PRINCIPAL_NAME.
There are a few ways to locate duplicate SPN’s.
One being, running a script.
1) Copy and paste the below script into notepad:
‘ Copyright (c) Microsoft Corporation 2004 –
‘ File: querySpn.vbs
‘ Contents: Query a given SPN in a given forest to find the owners
‘ History: 7/7/2004 Craig Wiand Created
Option Explicit
Const DUMP_SPNs = True
Dim oConnection, oCmd, oRecordSet
Dim oGC, oNSP
Dim strGCPath, strClass, strSPN, strADOQuery
Dim vObjClass, vSPNs, vName
ParseCommandLine()
‘— Set up the connection —
Set oConnection = CreateObject(“ADODB.Connection”)
Set oCmd = CReateObject(“ADODB.Command”)
oConnection.Provider = “ADsDSOObject”
oConnection.Open “ADs Provider”
Set oCmd.ActiveConnection = oConnection
oCmd.Properties(“Page Size”) = 1000
‘— Build the query string —
strADOQuery = “<” + strGCPath + “>;(servicePrincipalName=” + strSPN + “);” & _
“dnsHostName,distinguishedName,servicePrincipalName,objectClass,” & _
“samAccountName;subtree”
oCmd.CommandText = strADOQuery
‘— Execute the query for the object in the directory —
Set oRecordSet = oCmd.Execute
If oRecordSet.EOF and oRecordSet.Bof Then
Wscript.Echo “No SPNs found!”
Else
While Not oRecordset.Eof
Wscript.Echo oRecordset.Fields(“distinguishedName”)
vObjClass = oRecordset.Fields(“objectClass”)
strClass = vObjClass( UBound(vObjClass) )
Wscript.Echo “Class: ” & strClass
If UCase(strClass) = “COMPUTER” Then
Wscript.Echo “Computer DNS: ” & oRecordset.Fields(“dnsHostName”)
Else
Wscript.Echo “User Logon: ” & oRecordset.Fields(“samAccountName”)
End If
If DUMP_SPNs Then
‘— Display the SPNs on the object —
vSPNs = oRecordset.Fields(“servicePrincipalName”)
For Each vName in vSPNs
Wscript.Echo “– ” + vName
Next
End If
Wscript.Echo
oRecordset.MoveNext
Wend
End If
oRecordset.Close
oConnection.Close
Sub ShowUsage()
Wscript.Echo ” USAGE: ” & WScript.ScriptName & _
” SpnToFind [GC Servername or Forestname]”
Wscript.Echo
Wscript.Echo ” EXAMPLES: ”
Wscript.Echo ” ” & WScript.ScriptName & _
” MSSQLSvc/MySQL.company.com:1433″
Wscript.Echo ” ” & WScript.ScriptName & _
” HOST/Server1 Corp.com”
Wscript.Quit 0
End Sub
Sub ParseCommandLine()
If WScript.Arguments.Count <> 1 And WScript.Arguments.Count <> 2 Then
ShowUsage()
Else
strSPN = WScript.Arguments(0)
If WScript.Arguments.Count = 2 Then
strGCPath = “GC://” & WScript.Arguments(1)
Else
‘— Get GC —
Set oNSP = GetObject(“GC:”)
For Each oGC in oNSP
strGCPath = oGC.ADsPath
Next
End If
End If
End Sub
Source: http://technet.microsoft.com/en-us/library/ee176972.aspx
2) Save the file as spn_query.vbs
3) On one of your domain controllers, open comamnd prompt, browse to the location of where your
script is located and type spn_query.vbs MSSqlSvc/Server1 (server1 being the name of your server)
4) Press return and a list of servers will appear within the command window. You may find one of the values is under the servername and the other
under a username such as administrator.
5) The one you should be deleting is the one which does not run against the SQL service. So if SQL service runs as local host, you should
remove the one under the username administrator. If the SQL service runs under an account such as administrator, you would delete the one under the servername.
Imporant: Please ensure you take note of the current settings incase you need to revert. Also, ensure you have successful backups incase you need to restore.
6) To delete the duplicate value, there are a few ways of doing this. The one I will be describing is ADSI EDIT.
7) On your domain controller, type the following within the ‘run’ box: adsiedit.msc and click OK
8.) Expand domain
9) Expand DC=domain,DC=local
10) Locate the servername or username where you wish to remove the duplicate SPN.
11) Right click on the server or username and click properties
12) Browse to ServicePrincipleName and click edit
13) Take a note of current settings and remove the duplicate value.
14) Click OK
Event ID 11 should now disappear.
How to disable key combination Ctrl, Shift and Esc
By pressing Ctrl, Shift and Esc on your keyboard, you may already know that this launches the task manager.
Many organisations such as schools block access to the task manager via Ctrl, Shift and Esc via group policy so an access denied message appears.
But, by continuosly pressing the above key combination, the screen can be flooded with access denied messages and cause the machine to stop responding.
The way around stopping this, is to prevent the use of the combination so nothing happens when the combination is pressed.
There are a few ways to do this, one being to disable via the registry.
1) Access the registry
2) Go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
3) Create a new DWORD DisableTaskMgr with a value of 1
Running via script
1) Within notepad, copoy the below txt:
Windows Registry Editor Version 5.00[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
“DisableTaskMgr”=dword:00000001
2) Save the file with a .reg extension. For example DisableCtrlShiftEscape.reg
3) Open another notepad file and type the below
REGEDIT /s \\servernamer\share\filename.reg
(Replace the servername, share and reg file.
4) Save the file with a .bat extension
5) Double click on the batch file and the registry key will be imported.
6) Test, by hitting the key combination Ctrl, Shift and escape.
Done

