Skip to content

Instantly share code, notes, and snippets.

# Allow Reboots
$Boxstarter.RebootOk=$true
$Boxstarter.NoPassword=$false
$Boxstarter.AutoLogin=$true
#$cred=Get-Credential Admin
Update-ExecutionPolicy Unrestricted
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions #-EnableShowProtectedOSFiles
@gerane
gerane / ISESteroidsThemeTemplate.xml
Last active August 29, 2015 14:22
ISESteroids Theme Template that has comments for easy theme creation. I used plain xml extension to get syntax highlighting working. To use you will need to rename to ThemeName.ISESteroidsThemeXML. For more detailed information you can visit my blog: http://brandonpadgett.com/powershell/isesteroids-theming/
<?xml version="1.0"?>
<ColorOptions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- For more detailed information you can visit my blog -->
<!-- http://brandonpadgett.com/powershell/isesteroids-theming/ -->
<!-- Shares Console and Script Pane Settings -->
<ShareFontForConsole>false</ShareFontForConsole>
<!-- Script Pane Font Settings -->
<ScriptPaneFontFamily>ubuntumono-r.ttf#Ubuntu Mono</ScriptPaneFontFamily>
<#
.SYNOPSIS
This script exports drivers that have been updated by Windows Update
.DESCRIPTION
This script exports drivers that have been updated by Windows Update
.PARAMETER DeleteNonUpdated
Switch to specify whether you want to delete the Drivers that were exported and were not Updated by Windows Update.
Useful when troubleshooting.
.EXAMPLE
Get-UpdatedDrivers.ps1
@gerane
gerane / RegRunner.cs
Created January 22, 2016 01:49
Executes Encrypted File From Registry
using System;
using System.IO;
using System.Text;
using Microsoft.Win32;
using System.IO.Compression;
using System.EnterpriseServices;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
@gerane
gerane / nxlog.conf
Created February 25, 2016 00:46 — forked from chelming/nxlog.conf
NXLOG config that will parse SCCM and IIS logs
## Please set the ROOT to the folder your nxlog was installed into,
## otherwise it will not start.
#define ROOT C:\Program Files\nxlog
define ROOT C:\Program Files (x86)\nxlog
define CERTDIR %ROOT%\cert
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
function Get-RickRoll
{
[CmdletBinding()]
param()
DynamicParam
{
$ParameterName = 'Name'
$RuntimeParameterDictionary = New-Object System.Management.Automation.RuntimeDefinedParameterDictionary
@gerane
gerane / Test-EventLogExists.Tests.ps1
Created April 7, 2016 16:52
Learning Pester and better comment based Help. Please leave feedback if you have any suggestions!
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace('.Tests.', '.')
. "$here\$sut"
Remove-EventLog -LogName Pester -ErrorAction SilentlyContinue
Describe 'Test-EventLogExists' {
Set-StrictMode -Version latest
function Test-ParameterSet
{
[CmdletBinding(DefaultParameterSetName = 'Default')]
[OutputType([boolean], ParameterSetName = 'Test')]
[OutputType([PSObject], ParameterSetName = 'Default')]
param
(
[parameter(Mandatory = $true)]
[System.String]$Param1,