Test Post to See if Code Paste From ISE Looks Okay

  This just a test post to see how well I can get code from ISE to look good on the blog, almost like a screen shot, but not actually be a screen shot, be totally copy and pastable. PS> Get-Command -Verb Get | Format-Wide -Column 4 Get-ProvisionedA… Get-AppBackgroun… Get-AppxLastError   Get-AppxLog        Get-AssignedAccess  Get-BCClientConf… Get-BCContentSer… Get-BCDataCache   …

1

Fun Script to Never Run While in a Hospital

In class today a student asked about having a little fun and simulating a flat line heartbeat monitor.  He was sparked on to this by my demoing the PowerShell alert (beep): “`a” $frequency = 2000 $signature = @" [DllImport("kernel32.dll")] public static extern bool Beep(int freq,int duration); "@ Add-Type -MemberDefinition $signature -Name "Beeper" -Namespace Win32Functions -PassThru…

1

Profile Script From my Workshop VMs

I had a student today ask for a copy of the profile I showed during class where I set error background color and start a transcript.  Here is the code: $option1 = New-Object System.Management.Automation.Host.ChoiceDescription("&Yes","You chose yes…") $option2 = New-Object System.Management.Automation.Host.ChoiceDescription("&No","You chose no…") $choices = [System.Management.Automation.Host.ChoiceDescription[]]($option1, $option2) $chosen = $host.ui.PromptForChoice("Error Background","Do you want error background to…

0