Skip to content

Instantly share code, notes, and snippets.

function Get-WeatherEmoji
{
[CmdletBinding()]
param
(
[string[]]$Condition,
[Boolean]$DayTime
)
if ($Alert -ne $null)
{
$Env:WeatherAlert = $Alert
switch ($Alert.type)
{
'HUR' { $AlertType = 'Hurricane Local Statement' }
'TOR' { $AlertType = 'Tornado Warning' }
'TOW' { $AlertType = 'Tornado Watch' }
'WRN' { $AlertType = 'Severe Thunderstorm Warning' }
'SEW' { $AlertType = 'Severe Thunderstorm Watch' }
$loadInf = '@
[Setup]
Lang=english
Dir=C:\Program Files (x86)\Microsoft VS Code Insiders
Group=Visual Studio Code Insiders
NoIcons=0
Tasks=desktopicon,addcontextmenufiles,addcontextmenufolders,addtopath
@'
$exePath = "${env:TEMP}\Insiders.exe"
function Find-PlasterTemplate {
[CmdletBinding(DefaultParameterSetName='Default')]
[OutputType("PSCustomObject[]")]
param(
[Parameter(HelpMessage="Specifies the Name of the Plaster template to find",
ValueFromPipelineByPropertyName=$true,
Position=0)]
[ValidateNotNullOrEmpty()]
[string[]]
$Name,
@gerane
gerane / poco.psm1
Created December 21, 2016 04:41 — forked from yumura/poco.psm1
powershell peco
# Load
Split-Path $MyInvocation.MyCommand.Path -Parent | Push-Location
Get-ChildItem poco_*.ps1 | %{. $_}
Pop-Location
function Select-Poco
{
Param
(
[Object[]]$Property = $null,
Key Function Description
--- -------- -----------
Enter AcceptLine Accept the input or move to the next line if input is missing a c...
Shift+Enter AddLine Move the cursor to the next line without attempting to execute th...
Ctrl+Enter InsertLineAbove Inserts a new empty line above the current line without attemptin...
Ctrl+Shift+Enter InsertLineBelow Inserts a new empty line below the current line without attemptin...
Escape RevertLine Equivalent to undo all edits (clears the line except lines import...
LeftArrow BackwardChar Move the cursor back one character
RightArrow ForwardChar Move the cursor forward one character
1/6/2017 10:37:21 AM [ERROR] - Method "ExecuteCommand" at line 486 of C:\projects\powershelleditorservices\src\PowerShellEditorServices\Session\PowerShellContext.cs
Execution completed with errors:
Parameter set cannot be resolved using the specified named parameters.
The term '-Name' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
1/6/2017 10:37:19 AM [VERBOSE] - Method "ReadMessage" at line 111 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageReader.cs
READ MESSAGE:
{
"jsonrpc": "2.0",
"id": 76,
"method": "completionItem/resolve",
"params": {
"label": "Style",
# PSDeploy
Deploy ExampleDeployment {
By FileSystem Scripts {
FromSource 'SomeScripts'
To 'C:\PSDeployTo'
Tagged Dev
DependingOn ExampleDeployment-Modules
}
{
"version": "0.1.0",
"command": "${env.windir}\\sysnative\\windowspowershell\\v1.0\\PowerShell.exe",
"isShellCommand": true,
"showOutput": "always",
"args": [
"-NoProfile", "-ExecutionPolicy", "Bypass"
],
"tasks": [
{