This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is the Get function | |
function Get-Resource { | |
param( | |
[Parameter(Mandatory = $true)] | |
[String] | |
$Ensure, | |
[Parameter(Mandatory = $true)] | |
[string] | |
$PropertyA, | |
[Parameter(Mandatory = $true)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is the Get function | |
function Get-Resource { | |
param( | |
[string]$status, | |
[string]$starttype | |
) | |
$service = Get-Service winmgmt | |
# Information returned by Get will be available in Azure via API | |
return @{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-Resource { | |
param( | |
[DscProperties]$DscProperties | |
) | |
$psPath = Join-Path ([System.Environment]::SystemDirectory) 'WindowsPowerShell\v1.0\powershell.exe' | |
& $psPath -noProfile -command { | |
param( | |
$Name | |
) | |
$Env:PSModulePath += ";$PSHOME\Modules\NetSecurity" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wait { $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') } | |
function line { write-host '' } | |
function getslides {param([string]$path) Get-Childitem -Path $path -Filter slide*.md} | |
function slide { | |
param( | |
[string]$path | |
) | |
$slides = getslides $path | |
foreach ($i in 0..$slides.count) { | |
$slide = Join-Path $path slide$i.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function smartComplete { | |
param ( $commandName, | |
$parameterName, | |
$wordToComplete, | |
$commandAst, | |
$fakeBoundParameters ) | |
$possibleValues = [array](Search-AzGraph -Query "resourcecontainers | where ['type'] == 'microsoft.resources/subscriptions' | project name").name | |
if ($fakeBoundParameters) { |
OlderNewer