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
$LyncSDKLocation = 'C:\LyncSDK\LyncSDK\Assemblies\Desktop' | |
import-module "$LyncSDKLocation\Microsoft.Lync.Utilities.dll" | |
import-module "$LyncSDKLocation\Microsoft.Lync.Controls.dll" | |
import-module "$LyncSDKLocation\Microsoft.Lync.Model.dll" | |
<# | |
SDK - https://www.microsoft.com/en-us/download/confirmation.aspx?id=36824 | |
Extract msi out of the exe and run that to get the required assemblies | |
Microsoft.Lync.Utilities.dll | |
Microsoft.Lync.Controls.dll |
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 | |
Utility function that allows you to format a property of any object | |
.DESCRIPTION | |
Invokes a script block against any number of object properties to manipulate the data | |
.EXAMPLE | |
PS C:\> Format-PropertyData -data ([PSCustomObject]@{FirstName = 'Evan'; Price = 100.0001}) -ColumnFormat @{'Price' = {[MATH]::Round($_)}} | |
Applies the math rounding function to all data in the 'Price' column | |
#> |
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
param( | |
$TargetDatabase, | |
$PackagePath, | |
$TargetServer, | |
$JournalToSqlTable, | |
$ConnectionTimeout, | |
$ExecutionTimeout, | |
$Static_ScriptsDir, | |
$Sandpit_ScriptsDir, | |
$TestEnv_ScriptsDir, |
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 Copy-OctopusVariableSet | |
{ | |
<# | |
.SYNOPSIS | |
Copies from one Octopus Deploy project variables to another | |
.DESCRIPTION | |
Uses the Octopus rest api to get all variables from one project to replace all variables in another. | |
Super handy if you need to get a new project going with almost identical variables that don't yet exist in a project template or library set | |
.EXAMPLE | |
PS C:\> Copy-OctopusVariableSet ` |
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 Test-CCNumber { | |
<# | |
.SYNOPSIS | |
Tests for valid credit card numbers | |
.DESCRIPTION | |
Uses the Luhn algorithm to test if a number is a valid credit card number or not | |
.EXAMPLE | |
PS C:\> Test-CCNumber -Number 9003085869539691 | |
Tests the number 9003085869539691 | |
.EXAMPLE |
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 Set-ProcessPriorityClass | |
{ | |
[CmdletBinding(SupportsShouldProcess, ConfirmImpact='Low')] | |
param( | |
# Names of the processes to change | |
[Parameter(Mandatory, ValueFromPipeline)] | |
[Alias("Name")] | |
[String[]] | |
$ProcessName, |
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 | |
Uses XML transformation on a specified XML file | |
.DESCRIPTION | |
Performs XML configuration changes to a given XML file via XML-Document-Transform (XDT) commands specified within a seperate XML file. | |
.EXAMPLE | |
PS C:\> Use-XMLTransform -XML 'D:\myApp\app.config' -XDT 'D:\myApp\app.release.config' | |
Transforms configuration within app.config using the XDT commands found in app.release.config | |
.INPUTS | |
String literal paths to XML/XDT docs and optionally XmlTransform.dll |