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
SELECT name FROM sys.databases WHERE name = 'MyScriptDatabase1' |
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
<# | |
.SYNOPSIS | |
New-AzureServicePrincipal | |
.DESCRIPTION | |
This task creates an Azure Service Principal in Azure AD that will be used for all installation automation. | |
This can only be run interactively as the Login-AzureRmAccount will pop up an interactive window for | |
the user to log in with. | |
The output of this task can be used to deploy the application in future and should be stored in each contributors AppVeyor account. | |
#> |
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-Something | |
{ | |
param | |
( | |
[Parameter()] | |
[System.Boolean] | |
$MockError | |
) | |
} |
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
#---------------------------------# | |
# environment configuration # | |
#---------------------------------# | |
version: 1.0.{build}.0 | |
install: | |
- git clone https://github.com/PowerShell/DscResource.Tests | |
- ps: Write-Verbose -Message "PowerShell version $($PSVersionTable.PSVersion)" -Verbose | |
- ps: Import-Module "$env:APPVEYOR_BUILD_FOLDER\DscResource.Tests\AppVeyor.psm1" | |
- ps: Invoke-AppveyorInstallTask |
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
<# | |
.SYNOPSIS | |
Script to add and update labels according how they are defined in the | |
DSC Resource Kit. | |
#> | |
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'High')] | |
param () | |
<# | |
TODO: Add all your repositories to the array. |
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
Describe "a" { | |
It "b" { | |
function a () {} | |
$closure = & { | |
$state = @{ | |
Value = 0 | |
} | |
{ |
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
$scriptModulesFiles = Get-ChildItem -Path '.' -Recurse -Include '*.psm1' | |
$lines = [PSCustomObject] @() | |
$scriptModulesFiles | % { | |
$parseErrors = $null | |
$definitionAst = [System.Management.Automation.Language.Parser]::ParseFile($_.FullName, [ref] $null, [ref] $parseErrors) | |
if ($parseErrors) | |
{ |
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
$computersContainerDistinguishedName = (Get-ADDomain).ComputersContainer | |
if ($computersContainerDistinguishedName -match 'DC=.+') | |
{ | |
$domainDistinguishedName = $matches[0] | |
} | |
$ConfigurationData = @{ | |
AllNodes = @( | |
@{ | |
NodeName = 'localhost' |
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
Configuration SetDebugModeForceModuleImport { | |
Node localhost | |
{ | |
LocalConfigurationManager | |
{ | |
DebugMode = 'ForceModuleImport' | |
} | |
} | |
} |
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
MIT License | |
Copyright (c) Johan Ljunggren | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
OlderNewer