Skip to content

Instantly share code, notes, and snippets.

View mrzcn's full-sized avatar

Emre mrzcn

View GitHub Profile
@mrzcn
mrzcn / Remove License Key
Created December 13, 2020 10:48
Windows makinada Lisansı Silmek için kullanılır.
slmgr.vbs -upk
@mrzcn
mrzcn / RunAs Command
Created December 13, 2020 10:47
Windows'da Admin Yetkisi ile Program Çalıştırma Kısayolu.
runas /user:Laptop\Administrator /savecred “C:\Program Files\CCleaner\CCleaner.exe”
@mrzcn
mrzcn / Disk Temizleme Script
Created December 13, 2020 10:46
CleanMgr / Disk Cleanup Utuility ile Windows Disk Temizleme Scripti
# Ce script couvre mes serveurs Windows 2008 | 2008r2 | 2012 | 2012r2
# Version Powershell 2.0 & 3.0
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force
$VersionNumber = "1.1"
#Gestion du FLAG
$VersionKeyLocation = test-path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\MYCORP"
$VersionKEY = test-path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\MYCORP\$VersionNumber"
@mrzcn
mrzcn / SMBv1 Group Policy Kapatma
Created December 13, 2020 10:44
Disable SMB v1 in Managed Environments with Group Policy
The following is a brief summary recent SMB v1 vulnerabilities, ransomware and an enterprise approach to disabling SMB v1 via Group Policy.
Why SMB v1 Isn’t Safe (September 16, 2016)
Ned Pyle wrote a blog post in September of 2016 on why SMBv1 isn’t safe where he stated that if your clients use SMB1, then a man-in-the-middle can tell your client to ignore security settings like:
• Pre-authentication Integrity (SMB 3.1.1+). Protects against security downgrade attacks.
• Secure Dialect Negotiation (SMB 3.0, 3.02). Protects against security downgrade attacks.
• Encryption (SMB 3.0+). Prevents inspection of data on the wire, MiTM attacks. In SMB 3.1.1 encryption performance is even better than signing!
• Insecure guest auth blocking (SMB 3.0+ on Windows 10+) . Protects against MiTM attacks.
• Better message signing (SMB 2.02+). HMAC SHA-256 replaces MD5 as the hashing algorithm in SMB 2.02, SMB 2.1 and AES-CMAC replaces that in SMB 3.0+. Signing performance increases in SMB2 and 3.
“...If your clients use S
Navigate to C:\Windows\System32\Inetsrv\ by typing “cd C:\Windows\System32\Inetsrv\” on the command line.
In the Inetsrv folder, run the following command for each of the other websites on the IP address that need to use the certificate (copy both lines): 
appcmd set site /site.name:"<IISSiteName>" /+bindings.[protocol='https',bindingInformation='*:443:<hostHeaderValue>']
@mrzcn
mrzcn / Aktivasyon
Created December 13, 2020 10:28
How To Activate Windows 10 / Server 2016 Through Command Line
Run CMD as Admin
Slmgr.vbs /ipk XXXXX-BF9TX-XXXXX-7VRBV-XXXXX
@mrzcn
mrzcn / Remote-Restart
Created December 13, 2020 10:24
Uzaktaki bir bilgisayarı restart etme komutu
shutdown -r -f -m \\TIC18775PN -t 1
-c "Shutting down for storm. Save work and close apps."
@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.)