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
  • 07:55 (UTC +02:00)
View GitHub Profile
@eizedev
eizedev / gist:222a8c78df7aec24bf1cad78d064511d
Created June 28, 2019 10:00 — forked from davidphay/gist:83dfb54f80e5fe50511ce967caf68a08
Change your own Active Directory password from PowerShell without any special permissions
Set-AdAccountPassword -Identity $env:UserName -OldPassword (Read-Host -asSecureString "Enter the current password") -NewPassword (Read-Host -asSecureString "Enter the new password")
@eizedev
eizedev / gist:038931996db61064b263332ad0d038ab
Created June 28, 2019 10:00 — forked from jstangroome/gist:3087453
Change your own Active Directory password from PowerShell without any special permissions
([adsi]'WinNT://domain/username,user').ChangePassword('oldpassword','newpassword')
@eizedev
eizedev / Get-DockerContainer.ps1
Last active January 9, 2020 07:30 — forked from jdhitsolutions/Get-DockerContainer.ps1
A PowerShell function to get docker containers as objects.
#requires -version 5.1
<#
sample usage
get-dockercontainer
get-dockercontainer | select *
get-dockercontainer -all | format-table -view stats
#>
Function Get-DockerContainer
@eizedev
eizedev / mydockercontainer.format.ps1xml
Created January 9, 2020 07:27 — forked from jdhitsolutions/mydockercontainer.format.ps1xml
A PowerShell format file to be used with my Get-DockerContainer function.
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<ViewDefinitions>
<View>
<!--Created 03/27/2019 17:01:10 by BOVINE320\Jeff-->
<Name>default</Name>
<ViewSelectedBy>
<TypeName>Get-DockerContainer.myDockerContainer</TypeName>
</ViewSelectedBy>
<GroupBy>
@eizedev
eizedev / Get-GitConfig.ps1
Created January 9, 2020 07:38 — forked from jdhitsolutions/Get-GitConfig.ps1
A PowerShell function to get your git configuration. See comment based help for usage examples.
#requires -version 5.1
Function Get-GitConfig {
<#
.SYNOPSIS
Get git configuration settings
.DESCRIPTION
Git stores configurations settings in a simple text file format. Fortunately, this file is structured and predictable. This command will process git configuration information into PowerShell friendly output.
.PARAMETER Scope
Function Get-GitSize {
<#
.SYNOPSIS
Get the size of .git folder
.DESCRIPTION
When using git, it creates a hidden folder for change tracking. Because the file is hidden it is easy to overlook how large it might become. Specify the parent folder path. The result displays the size value in bytes but there are additional properties that show the value formatted in KB, MB or GB.
.PARAMETER Path
The path to the parent folder, not the .git folder.
.EXAMPLE
PS C:\scripts\PiedPiperBox> Get-GitSize
@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")]
@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 / 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 / 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)]