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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run \ | |
--name {{printf "%q" .Name}} \ | |
{{- with .HostConfig}} | |
{{- if .Privileged}} | |
--privileged \ | |
{{- end}} | |
{{- if .AutoRemove}} | |
--rm \ | |
{{- end}} | |
{{- if .Runtime}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -Version 3 | |
#Credential file path | |
$script:CredentialsFile = Join-Path $env:TEMP "SavedCredentials\Credentials.xml" | |
function Set-SavedCredential() | |
{ | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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")] |
NewerOlder