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
$range = 1, 2, 4, 8, 16, 32, 62, 64, 65, 127 | |
$numbers = New-Object "System.Collections.Generic.List[Int]" | |
$numbers = $range | |
$target = 65 | |
Function Get-SumUp { | |
[CmdletBinding()] | |
param | |
( |
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-DaysofWeek { | |
[CmdletBinding()] | |
param | |
( | |
[System.Collections.Generic.List[Int]] | |
[ValidateNotNullorEmpty()] | |
$Enum | |
) | |
$daysofWeek = New-Object "System.Collections.Generic.List[String]" | |
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
$x = '<?xml version="1.0" encoding="utf-8"?> | |
<Notification> | |
<SendEmail>OnFailure</SendEmail> | |
<SendEventLog>Never</SendEventLog> | |
<SendPage>Never</SendPage> | |
<SendNetSend>Never</SendNetSend> | |
</Notification>' | |
$missingVariables = @() | |
$SendEmail = "Never" | |
# $SendEventLog = "Sometimes" |
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
[xml] $x = '<Lunch> | |
<Sandwiches> | |
<Sandwich Include="Mixte"> | |
<Filling>Ham and Emmantal Cheese</Filling> | |
</Sandwich> | |
<Sandwich Include="RoteDeBoeuf"> | |
<Filling>Beef and Mustard Mayonnaise</Filling> | |
</Sandwich> | |
</Sandwiches> | |
</Lunch>' |
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
USE tempdb | |
GO | |
-- Create table | |
CREATE TABLE TruncTable (ID INT, IntColumnOne INT, IntColumnTwo INT, IntColumnThree INT, UniqueColumn UNIQUEIDENTIFIER DEFAULT NEWID()) | |
GO | |
CREATE CLUSTERED INDEX [TT_ID] | |
ON TruncTable (ID) | |
GO | |
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 is called by the primary function 'remove-partitions' below | |
# 'set partition' builds the partition names up and returns the name as a script persisting variable | |
Function set-partitions | |
{ | |
[CmdletBinding()] | |
param( | |
[Parameter(Position=0,mandatory=$true)] | |
[Microsoft.AnalysisServices.Cube] | |
$cube, | |
[Parameter(Position=1,mandatory=$true)] |
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
$OctopusURL = "" #Octopus URL | |
$APIKey = "" #Octopus APIKey | |
$projectname = "" #Name of the project | |
$nuGetPath = "" | |
$pkdex = Import-Csv "" | |
if (-not (Test-Path $NugetPath)) { | |
Write-Error "Cannot find nuget at path $NugetPath\nuget.exe" | |
throw | |
} | |
$NugetExe = "$NugetPath\nuget.exe" |
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-DllVersionInfo | |
{ | |
param | |
( | |
[Parameter(Position=0,mandatory=$true)] | |
[string] $Dll | |
) | |
if(!(Test-Path $Dll -PathType leaf)) | |
{ | |
Write-Error -message “The path to $Dll is either not accessible or does not exist” |
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
<Target Name ="BuildMessage" Condition ="'$(RunBuildMessage)'=='1'"> | |
<BuildStep | |
Name="BuildMessage" | |
Message="This is the build message..." | |
TeamFoundationServerUrl="$(TeamFoundationServerUrl)" | |
BuildUri="$(BuildURI)" Condition="'$(IsDesktopBuild)' != 'true'"> | |
<Output TaskParameter="Id" PropertyName="BuildMessageId" /> | |
</BuildStep> |
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
<Target | |
Name="BeforeCompile" | |
Condition="'$(BuildDefinition)'=='Database Main Sandbox'"> | |
<CallTarget Targets="DoSomething"/> | |
</Target> |