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
| param ( | |
| [String] $ResourceGroupName = '' | |
| ) | |
| # Returns strings with status messages | |
| [OutputType([String])] | |
| # Connect to Azure and select the subscription to work against | |
| $servicePrincipalConnection = Get-AutomationConnection -Name AzureRunAsConnection |
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
| param ( | |
| [String] $ResourceGroupName = '' | |
| ) | |
| # Returns strings with status messages | |
| [OutputType([String])] | |
| # Connect to Azure and select the subscription to work against | |
| $servicePrincipalConnection = Get-AutomationConnection -Name AzureRunAsConnection |
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
| image: Visual Studio 2017 | |
| configuration: Release | |
| before_build: | |
| - cmd: nuget restore | |
| after_build: | |
| - cmd: 7z a myapp.zip %APPVEYOR_BUILD_FOLDER%\com.aboersch.PostProxy\bin\Release\net461\* | |
| artifacts: | |
| - path: myapp.zip | |
| name: app | |
| deploy: |
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
| #region Ensure/Get Encryption Cert | |
| function Get-CertThumbPrint(){ | |
| [OutputType([string])] | |
| param( | |
| [string]$CertPath | |
| ) | |
| $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 | |
| $cert.Import($CertPath) | |
| return $cert.Thumbprint.ToLowerInvariant() |
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
| New-ModuleManifest -Path 'C:\Program Files\WindowsPowerShell\Modules\DscTest\DscTest.psd1' ` | |
| -DscResourcesToExport @('DscCredentialTest') -PowerShellVersion 5.0 -Description '' ` | |
| -ModuleVersion '1.0.0.0' -Guid $([guid]::NewGuid()) -Author 'Alexander Boersch' ` | |
| -RootModule 'DscTest.psm1' -CompanyName 'Alegri' |
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
| $T = @" | |
| using System; | |
| using System.Diagnostics; | |
| using System.Runtime.InteropServices; | |
| namespace Win32 | |
| { | |
| public static class SetupApi | |
| { | |
| // 1st form using a ClassGUID only, with Enumerator = IntPtr.Zero |
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
| param( | |
| # Path to devcon.exe | |
| [string]$devconPath = "C:\Program Files (x86)\Windows Kits\8.0\Tools\x64\devcon.exe" | |
| ) | |
| <# | |
| .Synopsis | |
| Helper function to seperate devcon output between device id and name | |
| #> | |
| function Convert-ToDevice { | |
| [CmdletBinding()] |