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-TfsWorkItem | |
| { | |
| [OutputType([void])] | |
| [CmdletBinding()] | |
| param | |
| ( | |
| [Parameter(Mandatory)] | |
| [ValidateNotNullOrEmpty()] | |
| [string]$Title, | |
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 set-KCD | |
| { | |
| [cmdletbinding(SupportsShouldProcess = $True, ConfirmImpact = 'Medium')] | |
| param ( | |
| [parameter(Mandatory = $True, ValueFromPipeline = $True)] | |
| $ADObject, | |
| [parameter(Mandatory = $True, ValueFromPipeline = $True)] | |
| [string[]]$SPNs | |
| ) |
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
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| # (c) 2016, Adam Bertram (@adbertram) | |
| # | |
| # This file is part of Ansible | |
| # | |
| # Ansible is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 3 of the License, or |
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
| $ErrorActionPreference = "Stop" | |
| try | |
| { | |
| $passedArgs = Parse-Args $args | |
| $definedParams = @( | |
| @{ Name = 'Address'; Mandatory = $true } | |
| @{ Name = 'InterfaceAlias'; Mandatory = $true } | |
| @{ Name = 'State'; Mandatory = $true } |
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
| ## tasks | |
| - name: Setup app pools | |
| win_iiswebapppool: | |
| name: "{{ item.value.name }}" | |
| managed_runtime_version: "{{ item.value.managed_runtime_version }}" | |
| managed_pipeline_mode: "{{ item.value.managed_pipeline_mode }}" | |
| with_dict: "{{ webapppools }}" | |
| ## vars | |
| webapppools: |
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
| play | |
| ----- | |
| - name: Folder ACLs | |
| win_acl: | |
| path: "{{ item.value.path }}" | |
| user: "{{ item.value.access.user }}" | |
| rights: "{{ item.value.access.rights }}" | |
| propogation: "{{ item.value.access.propogation }}" | |
| inherit: "{{ item.value.access.inherit }}" | |
| with_dict: "{{ folders|default({}) }}" |
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
| "Pester - Describe block (Unit Test, Exported Function)": { | |
| "prefix": "descu", | |
| "body": [ | |
| "describe '${name}' {", | |
| "", | |
| "\t$$commandName = '${name}'", | |
| "", | |
| "\tcontext 'Help' {", | |
| "\t\t", |
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
| (Get-Counter '\Process(*)\% Processor Time').CounterSamples | where { $_.InstanceName -notin @('idle','system','_total') } | sort cookedvalue -Descending | select -first 5 -Property InstanceName,@{n='Percent';e={[math]::Round($_.CookedValue)}} |
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
| ### foo.ps1 | |
| Get-Module | |
| ## foo.Tests.ps1 | |
| describe 'foo' { | |
| mock 'Get-Module' | |
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
| ##################### | |
| ## Module mymodule.psm1 in C:\Program Files\WindowsPowerShell\Modules\MyModule | |
| function foo { | |
| } | |
| #################### | |
| #################### | |
| ## script.ps1 |