Skip to content

Instantly share code, notes, and snippets.

View RamblingCookieMonster's full-sized avatar

Warren Frame RamblingCookieMonster

View GitHub Profile
<#
Fun trying to determine a current runspaces variables and modules.
In response to thise tweet: https://twitter.com/xvorsx/status/556348047022510080
I'm assuming there are a number of issues I'm not considering, this was just a morning distraction.
#>
#This would create a new runspace, get variables, modules, snapins.
#Presumably this changes based on PS version, so need dynamic method to extract it
$StandardUserEnv = [powershell]::create().addscript({
@RamblingCookieMonster
RamblingCookieMonster / Test-Pipeline.ps1
Created December 29, 2014 15:07
Pipeline and ShouldProcess demo
<#
This function and following examples illustrate the implementation of two helpful scenarios:
Pipeline input, with verbose output describing the values and types within the Begin, Process, and End blocks
ShouldProcess support, with friendly bypass handling using a Force switch.
#>
Function Test-Pipeline {