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( | |
[parameter(Mandatory = $true)] [string]$ResourceGroupName, | |
[parameter(Mandatory = $true)] [string]$dataFactoryName, | |
[parameter(Mandatory = $true)] [string]$location, | |
[parameter(Mandatory = $false)] [string]$environmentsuffix, | |
[parameter(Mandatory = $false)] [string]$clientID, | |
[parameter(Mandatory = $false)] [string]$tenantID, | |
[parameter(Mandatory = $false)] [string]$key | |
) |
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( | |
[parameter(Mandatory = $true)] [string]$ResourceGroupName, | |
[parameter(Mandatory = $true)] [string]$dataFactoryName, | |
[parameter(Mandatory = $true)] [string]$location, | |
[parameter(Mandatory = $false)] [string]$environmentsuffix, | |
[parameter(Mandatory = $false)] [string]$clientID, | |
[parameter(Mandatory = $false)] [string]$tenantID, | |
[parameter(Mandatory = $false)] [string]$key | |
) |
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
try { | |
Find-Module -Name "AzureRM" | |
} | |
catch { | |
Write-Host "No AzureRM, Installing from PSGallery." | |
Install-PackageProvider -Name NuGet -Force -Scope CurrentUser | |
Install-Module AzureRM -Force -Scope CurrentUser | |
} |
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 Install-MicrosoftDataToolsMSBuild { | |
[cmdletbinding()] | |
param ( | |
[parameter(Mandatory)] | |
[string] $WorkingFolder, | |
[string] $NuGetPath | |
) | |
Write-Verbose "Verbose Folder (with Verbose) : $WorkingFolder" | |
Write-Verbose "DataToolsVersion : $DataToolsMsBuildPackageVersion" |
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 Install-MicrosoftDataToolsMSBuild { | |
[cmdletbinding()] | |
param ( | |
[parameter(Mandatory)] | |
[string] $WorkingFolder, | |
[string] $DataToolsMsBuildPackageVersion, | |
[string] $NuGetPath | |
) | |
Write-Verbose "Verbose Folder (with Verbose) : $WorkingFolder" |
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
Get-ChildItem "C:\phbx\phbx\phbx\markdown5" -Filter *.md | | |
Foreach-Object { | |
$content = Get-Content $_.FullName | |
ForEach ($line in $content) { | |
$ignore = $false | |
if ($line -match "(jpg|png|bmp)" ) { | |
try { | |
$sub = $line.SubString(0, $line.IndexOf(">")) | |
$sub = $sub.Substring(0, $sub.LastIndexOf('"')) | |
$sub = $sub.trim('<a href="http://phoenixultd.files.wordpress.com') |
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]$xml = Get-Content "C:\phbx\phbx\phbx\1.xml" | |
$folderformarkdown = "C:\phbx\phbx\phbx\markdown4" | |
$xmlposts = $xml.rss.channel.Item | Where-Object {($_.creator -eq "phoenixultd") -and ($_.status -eq "publish")} | |
foreach ($xp in $xmlPosts) | |
{ | |
$content = $xp.content.InnerText | |
$date = Get-Date $xp.pubDate -Format 'yyyy-MM-dd' | |
$tags = @() | |
for ($i = 0; $i -le $xp.category.Count-1; $i++) |
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 version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup> | |
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |
<OutputPath>bin\$(Configuration)\</OutputPath> | |
<DebugSymbols>false</DebugSymbols> | |
<SkipCopyBuildProduct>true</SkipCopyBuildProduct> | |
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences> | |
<TargetRuntime>None</TargetRuntime> |
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
[cmdletbinding()] | |
param ( | |
[parameter(Mandatory = $true)] $WorkingFolder, | |
[parameter(Mandatory = $false)] $serverName, | |
[parameter(Mandatory = $false)] [string] $sqlAdministratorLogin, | |
[parameter(Mandatory = $false)] [String] $sqlAdministratorLoginPassword, | |
[parameter(Mandatory = $false)] [String] $connectionString, | |
[parameter(Mandatory = $true)] [string] $DatabaseName, | |
[parameter(Mandatory = $true)] [string] $DacpacPath, |
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
#import module from repo | |
Import-Module (Join-Path $PSScriptRoot "..\PoshSSDTBuildDeploy") -Force | |
Describe "Publish-DatabaseDeployment" { | |
function Get-DbId ($databaseName, $serverInstanceName) { | |
@(Invoke-Sqlcmd -Query "select db_id('$databaseName') as DbId" -ServerInstance $serverInstanceName) | Select-Object -First 1 -ExpandProperty DbId | |
} | |
BeforeAll { |