Skip to content

Instantly share code, notes, and snippets.

View eizedev's full-sized avatar
💻
Automating everything - Picture powered by AI with my photo as model.

René eizedev

💻
Automating everything - Picture powered by AI with my photo as model.
  • Germany
  • 13:18 (UTC +02:00)
View GitHub Profile

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages

Restoring an utterly destroyed DFSR-replicated SYSVOL from backup

Warning: this is not official Microsoft documentation and some of these steps might not actually be supported.

This guide is provided "as is", without warranty of any kind, express or implied. In no event shall the authors or copyright holders be liable for any claim, damages or other liability arising from, out of or in connection with applying the steps outlined in this guide.

When to use

@eizedev
eizedev / vs_code_context_menus.reg
Last active December 12, 2022 17:40 — forked from brandon93s/vs_code_context_menus.reg
Add context menu options for Visual Studio Code installed (system wide)
Windows Registry Editor Version 5.00
; Open files
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
@="Edit with VS Code"
"Icon"="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\",0"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%1\""
@eizedev
eizedev / run.tpl
Created May 1, 2021 14:08 — forked from efrecon/run.tpl
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@eizedev
eizedev / Get Recovery Keys.ps1
Created March 29, 2021 12:20 — forked from ak9999/Get Recovery Keys.ps1
Retrieve BitLocker Recovery Keys From Active Directory
# Generate Report of BitLocker Status for Computers in the BitLocker Machines OU.
# Sources: https://4sysops.com/archives/find-bitlocker-recovery-passwords-in-active-directory-with-powershell/
param([string]$OutputDirectory="~/Desktop",[string]$OrganizationalUnit=([adsi]'').distinguishedName)
if(!([Security.Principal.WindowsPrincipal] `
[Security.Principal.WindowsIdentity]::GetCurrent() `
).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Write-Host -ForegroundColor Yellow "Only Administrators can read BitLocker Recovery Keys."
exit
}
$computers = Get-ADComputer -Filter * -SearchBase $OrganizationalUnit
@eizedev
eizedev / Test-WinCredential.ps1
Created October 9, 2020 09:50 — forked from mklement0/Test-WinCredential.ps1
Test-WinCredential: PowerShell function for validating Windows domain / local user credentials.
function Test-WinCredential {
<#
.SYNOPSIS
Validates Windows user credentials.
.DESCRIPTION
Validates a [pscredential] instance representing user-account credentials
against the current user's logon domain or local machine.
.PARAMETER Credential
@eizedev
eizedev / SavedCredential.ps1
Created October 9, 2020 09:38 — forked from altrive/SavedCredential.ps1
Credential management utilities for PowerShell
#Requires -Version 3
#Credential file path
$script:CredentialsFile = Join-Path $env:TEMP "SavedCredentials\Credentials.xml"
function Set-SavedCredential()
{
[CmdletBinding()]
param(
[Parameter(Mandatory)]
@eizedev
eizedev / mouse_manager.ps1
Created May 25, 2020 08:46 — forked from BadCoder1337/mouse_manager.ps1
AFTER THE LAST GAME UPDATE THIS METHOD DOESN'T WORK ANYMORE
Add-Type -AssemblyName System.IO.Compression.FileSystem
Write-Host "Location: $PSScriptRoot"
Write-Host "Username: $env:UserName"
Set-Location $PSScriptRoot
$dataDir = "./mouse_manager_data"
# Get the ID and security principal of the current user account
$myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent()
@eizedev
eizedev / New-GithubGist.ps1
Created January 9, 2020 08:58 — forked from jdhitsolutions/New-GithubGist.ps1
A PowerShell script to create a new gist on Github.
#requires -version 4.0
Function New-GitHubGist {
[cmdletbinding(SupportsShouldProcess,DefaultParameterSetName = "Content")]
Param(
[Parameter(Position = 0, Mandatory, HelpMessage = "What is the name for your gist?",ValueFromPipelineByPropertyName)]
[ValidateNotNullorEmpty()]
[string]$Name,
@eizedev
eizedev / 1-Get-DockerDiskUsage.ps1
Last active January 9, 2020 07:48 — forked from jdhitsolutions/1-Get-DockerDiskUsage.ps1
A Powershell function that wraps Docker command line output to display disk usage. Save the files without the numeric prefix.
#requires -version 5.1
Function Get-DockerDiskUsage
{
[cmdletbinding()]
[alias("gddu")]
[OutputType("Get-DockerDiskUsage.DockerDiskUsage")]
Param(
[Parameter(Position = 0, HelpMessage = "Get specific usage types. The default is All")]
[ValidateSet("Images", "Containers", "Volumes", "Cache")]