This file contains hidden or 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-BitlockerEncryptionToast { | |
[cmdletBinding()] | |
Param( | |
[Parameter(ValueFromPipeline, ValueFromPipelineByPropertyName)] | |
[string] | |
$Computername | |
) | |
Start-Job -ScriptBlock { | |
This file contains hidden or 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 New-DotNetToast { | |
[cmdletBinding()] | |
Param( | |
[Parameter(Mandatory, Position = 0)] | |
[String] | |
$Title, | |
[Parameter(Mandatory,Position = 1)] | |
[String] | |
$Message, |
This file contains hidden or 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
resources: | |
- repo: self | |
queue: | |
name: Hosted Windows Container | |
#Your build pipeline references a secret variable named ‘GithubKey’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it secret. See https://go.microsoft.com/fwlink/?linkid=865972 | |
#Your build pipeline references an undefined variable named ‘BlogUrl’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972 | |
steps: | |
- powershell: ./'Invoke-PagesBuild.ps1' | |
arguments: '$(GithubKey)' |
This file contains hidden or 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
<# | |
.SYNOPSIS | |
Sends a request to the Github Pages API to trigger a Pages build for the repository. | |
.DESCRIPTION | |
Uses Invoke-WebRequest method to send a POST request to the Github Pages API. This request is directed at the repository | |
API URL, and requires an OAuth token with appropriate permissions to be specified in order for the request to be | |
accepted by the API. | |
.PARAMETER Token | |
Specify the OAuth API Token with which to query the Github API. If a token is not provided, or the provided token does | |
not have sufficient permissions, the request will typically respond with a 404 error for any non-publicly-available |
This file contains hidden or 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 Find-Event { | |
<# | |
.SYNOPSIS | |
Find specific event in the log on specified computer(s) | |
.PARAMETER Computer | |
The machine or machines you wish to query | |
.PARAMETER Logname | |
The log in which to look for IDs |
This file contains hidden or 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 Start-Deployment { | |
<# | |
.SYNOPSIS | |
Start a PDQ Deploy Deployment on a target machine | |
.DESCRIPTION | |
Trigger a PDQ Deploy deployment to start locally or on a remote machine with PDQ Deploy installed | |
.EXAMPLE | |
Start-Deployment -PackageName "Example Package" -Targets "Wolverine" |
This file contains hidden or 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
using namespace System.Management.Automation | |
using namespace System.Text | |
class EncodingTransformAttribute : ArgumentTransformationAttribute { | |
[object] Transform([EngineIntrinsics]$engineIntrinsics, [object] $inputData) { | |
switch ($inputdata) { | |
{ $_ -is [System.Text.Encoding]} { |
This file contains hidden or 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
using namespace System.Management.Automation | |
using namespace System.Text | |
class EncodingTransformAttribute : ArgumentTransformationAttribute { | |
[object] Transform([EngineIntrinsics]$engineIntrinsics, [object] $inputData) { | |
switch ($inputdata) { | |
{ $_ -is [System.Text.Encoding]} { |
This file contains hidden or 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
Once upon a midnight dreary, while I pondered, weak and weary, | |
Over many a quaint and curious volume of forgotten lore— | |
While I nodded, nearly napping, suddenly there came a tapping, | |
As of some one gently rapping, rapping at my chamber door. | |
“’Tis some visitor,” I muttered, “tapping at my chamber door— | |
Only this and nothing more.” | |
Ah, distinctly I remember it was in the bleak December; | |
And each separate dying ember wrought its ghost upon the floor. | |
Eagerly I wished the morrow;—vainly I had sought to borrow |
This file contains hidden or 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 Open-ChocolateyRepoUrl { | |
<# | |
.SYNOPSIS | |
Open Chocolatey repo urls directly from Powershell | |
.PARAMETER Search | |
The term to search for on the repo | |
.PARAMETER PackageName |