Skip to content

Instantly share code, notes, and snippets.

View NakedPowerShell's full-sized avatar

Dusty R NakedPowerShell

  • Seattle WA
View GitHub Profile
@NakedPowerShell
NakedPowerShell / complex_password_1.ps1
Created June 20, 2019 14:47
Generate a complex password using PowerShell
Set-StrictMode -Version 2.0
# https://technet.microsoft.com/en-us/library/cc786468(v=ws.10).aspx
# AD Password complexity requirements
# ~ 6.5 Bits of entropy per character
[String[]]$CharGroups = @('abcdefghijkmnopqrstuvwxyz', 'ABCEFGHJKLMNPQRSTUVWXYZ', '0123456789', '~!@#$%^&*_-+=`|\(){}[]:;"''<>,.?/')
$AllChars = $CharGroups | ForEach-Object {[Char[]]$_}
@NakedPowerShell
NakedPowerShell / gist:9711e57e18fa4c4cd0fed148497f900e
Last active July 13, 2019 02:18
Script to generate all the exploration I normally do when I want to install a new PowerShell module
Function Show-ModExplore {
<#
.SYNOPSIS
Generate all the exploration I normally do when I want to install a new PowerShell module
.DESCRIPTION
Script to generate all the exploration I normally do when I want to install a new PowerShell module
@NakedPowerShell
NakedPowerShell / Get-SpeakerTimeNotification.ps1
Created June 11, 2018 12:18 — forked from shaneis/Get-SpeakerTimeNotification.ps1
Creates Burnt Toast Notifications for Conference Speakers
function Get-SpeakerTimeNotification {
[CmdletBinding()]
<#
.SYNOPSIS
Creates notifications after specified minutes
.DESCRIPTION
Uses the BurntToast module to create notifications for the user after a supplied number
of minutes have passed. These can be sorted and a final notification can be given that
just specifies "TIME!"

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

Keybase proof

I hereby claim:

  • I am nakedpowershell on github.
  • I am dusty98007 (https://keybase.io/dusty98007) on keybase.
  • I have a public key ASDgVqn9aJnmqT0vwMHNhk4uceUW6KBdlgNXlTtwshvrWwo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am dusty98007 on github.
  • I am dusty98007 (https://keybase.io/dusty98007) on keybase.
  • I have a public key ASDgVqn9aJnmqT0vwMHNhk4uceUW6KBdlgNXlTtwshvrWwo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am dusty98007 on github.
  • I am dusty98007 (https://keybase.io/dusty98007) on keybase.
  • I have a public key ASDgVqn9aJnmqT0vwMHNhk4uceUW6KBdlgNXlTtwshvrWwo

To claim this, I am signing this object:

@NakedPowerShell
NakedPowerShell / gist:a904a1f76c20bc1db4864ef7ebea34a1
Last active November 7, 2017 17:57
#PSBLOGWEEK Links to Source Code
Automating Chocolatey package internalizing with PowerShell
https://winsysblog.com/2017/10/automating-chocolatey-package-internalizing-with-powershell.html
Logging and Error Handling Best Practices for Automating Windows Update Installs
https://cloudywindows.io/post/logging-and-error-handling-best-practices-for-automating-windows-update-installs-msu-with-wusa.exe-and-for-logging-any-called-process/
CREATING STORAGE REPORTS WITH POWERSHELL
@NakedPowerShell
NakedPowerShell / Write-LogEntry-1.ps1
Created October 31, 2016 09:10
Tweaks to Write-LogEntry that was posted to Twitter by Trevor Sullivan @pcgeek86
function Write-LogEntry {
[CmdletBinding()]
param (
[string] $Message,
[string] $Severity,
[string] $Step
)
$CallStack = Get-PSCallStack