Skip to content

Instantly share code, notes, and snippets.

View mrzcn's full-sized avatar

Emre mrzcn

  • turkey
View GitHub Profile
@mrzcn
mrzcn / SQL Server License TYPE Query
Created December 13, 2020 10:23
SQL Lisans Sorgulama
SELECT SERVERPROPERTY('LicenseType') as Licensetype, SERVERPROPERTY('NumLicenses') as LicenseNumber, SERVERPROPERTY('productversion') as Productverion, SERVERPROPERTY ('productlevel')as ProductLevel, SERVERPROPERTY ('edition') as SQLEdition,@@VERSION as SQLversion
@mrzcn
mrzcn / Windows 10 İnstallation Error GPT Drive
Created December 13, 2020 10:21
Windows 10 Installation Issue "Can't install Windows on GPT drive"
There are people who are trying to install Windows 10 (Clean Installation) on either a new HDD/SDD OR an old HDD/SDD. But when you selected a drive and click Next, you received an error "Can't install Windows on GPT drive".
When installing Windows on UEFI-based PCs using Windows Setup, your hard drive partition style must be set up to support either UEFI mode or legacy BIOS-compatibility mode.
For example, if you receive the error message: “Windows cannot be installed to this disk. The selected disk is not of the GPT partition style”, it’s because your PC is booted in UEFI mode, but your hard drive is not configured for UEFI mode. You’ve got a few options:
1. Reboot the PC in legacy BIOS-compatibility mode. This option lets you keep the existing partition style. For more info, see Boot to UEFI Mode or Legacy BIOS mode.
2. Reformat the drive for UEFI by using the GPT partition style. This option lets you use the PC’s UEFI firmware features.
You can do this yourself by reformatting the drive using the instr
@mrzcn
mrzcn / Service Kill
Created December 13, 2020 10:21
How to stop a service/program without restart wich lock/slown down system on a Windows machine
Sometimes as an administrator you may need to kill a service which is stuck at stopping in order to avoid having to reboot a server in the middle of the day.
Here’s what you need to do:
Step 1. Find out the Service Name
To do this, go in to services and double click on the service which has stuck.  Make a note of the “Service Name”.
Step 2. Find out the PID of the service
Open an elevated command prompt and type in:
sc queryex servicename
(where servicename is the name of the service you obtained from Step 1.)
@mrzcn
mrzcn / Disable SMBv1
Created December 13, 2020 10:18
Commands to Disable SMBv1 on Windows
Set-itemproperty -path “HKLM:\System\CurrentControlSet\Services\LanmanServer\Parameters” SMB1 -Type Dword -Value 0 -Force
Set-itemProperty -path “HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters” SMB2 -Type Dword -Value 1 -Force
Set-itemProperty -path “HKLM:\SYSTEM\CurrentControlSet\services\lanmanworkstation” -name “DependOnService” -value “Bowser”, “MRxSmb20”, “NSI” -type MultiString
Set-itemProperty -path “HKLM:\SYSTEM\CurrentControlSet\services\mrxsmb10” -name “Start” -type Dword -Value 4 -Force
Set-itemProperty -path “HKLM:\SYSTEM\CurrentControlSet\services\mrxsmb20” -name “Start” -type Dword -Value 2 -Force
@mrzcn
mrzcn / Clean-Print Spooler
Created December 13, 2020 10:16
CMD Commands to clear print queue / Spool
net stop spooler
del %systemroot%\System32\spool\printers\* /Q /F /S
net start spooler
@mrzcn
mrzcn / Telnet-SMTP-Test
Created December 13, 2020 10:15
Example CMD Commands for Testing a SMTP/Mail server via Telnet
C:\Windows\System32> telnet
Microsoft Telnet> set localecho
Microsoft Telnet> set logfile c:\TelnetTest.txt
Microsoft Telnet> OPEN 10.10.10.19 465
ehlo
@mrzcn
mrzcn / .Net 3.5. Offiline Installation
Created December 13, 2020 10:11
.net 3.5 offline installation Command
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:d:\sources\sxs
@mrzcn
mrzcn / Disable OneSyncSvc Service
Last active December 13, 2020 10:12
Windows server 2016 Disable "onesyncsvc" Service Please find Start registry entry and change its value to 4:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OneSyncSvc_2e345
@mrzcn
mrzcn / disposable-email-provider-domains
Created February 5, 2020 18:56
List of disposable email provider domains
0815.ru
0wnd.net
0wnd.org
10minutemail.co.za
10minutemail.com
123-m.com
1fsdfdsfsdf.tk
1pad.de
20minutemail.com
21cn.com
##########
# Win10 Post Setup Script
# Original Author: Disassembler <[email protected]>
# Edited by Sven212
# Version: 1.5, 2016-06-08
##########
# Ask for elevated permissions if required
If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]"Administrator")) {
Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs