Skip to content

Instantly share code, notes, and snippets.

View billkindle's full-sized avatar
🏠
Works from home and likes it that way.

Bill Kindle billkindle

🏠
Works from home and likes it that way.
View GitHub Profile
@billkindle
billkindle / Copy-FolderStructure.ps1
Created May 3, 2018 19:40
Simple way to copy a directory folder structure without copying contents of the folders.
<#
This script will only copy folder structure found in the $Source
path to the $Target path.
#>
# Adjust paths to suite needs
$Source = [path]
$Target = [path]
# This will only copy folders
@billkindle
billkindle / Start-PresentationMode.ps1
Created April 23, 2018 22:08
Start a color blind friendly PowerShell console session.
function Start-PresentationMode {
# change certain colors to be friendlier to those with color blindness
Write-Host -ForegroundColor Yellow "Changing ERROR foreground color from RED >>> BLUE"
$Host.PrivateData.ErrorForegroundColor = "Blue"
Write-Host -ForegroundColor Yellow "Ghanging ERROR backround color >>> WHITE"
$Host.PrivateData.ErrorBackgroundColor = "white"
# Could add more here based on what colors are preferred but this is a start.
@billkindle
billkindle / Get-DaysLeftPwshSummit.ps1
Last active April 17, 2018 03:02
Get-DaysLeftPwshSummit.ps1 function for PowerShell Profile or standalone use.
function Get-DaysLeftPwshSummit {
<#
Created By: Bill Kindle
Twitter: @BillKindle
Description:
This is just a simple function you can add to your PowerShell profile
as a reminder to register for PowerShell+DevOps Summit.
function Get-NetAccountInfo {
#obtain the data and do some minor cleanup
$data = net.exe accounts
$data = $data -replace '^[T].*',''
foreach ($line in $data)
{
#split on double colon character
$line = $line -split '\:\s+'