Skip to content

Instantly share code, notes, and snippets.

View RichieBzzzt's full-sized avatar
🦆
Sirfetch'd

Richie Lee RichieBzzzt

🦆
Sirfetch'd
View GitHub Profile
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
)
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
)
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
}
function Install-MicrosoftDataToolsMSBuild {
[cmdletbinding()]
param (
[parameter(Mandatory)]
[string] $WorkingFolder,
[string] $NuGetPath
)
Write-Verbose "Verbose Folder (with Verbose) : $WorkingFolder"
Write-Verbose "DataToolsVersion : $DataToolsMsBuildPackageVersion"
function Install-MicrosoftDataToolsMSBuild {
[cmdletbinding()]
param (
[parameter(Mandatory)]
[string] $WorkingFolder,
[string] $DataToolsMsBuildPackageVersion,
[string] $NuGetPath
)
Write-Verbose "Verbose Folder (with Verbose) : $WorkingFolder"
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')
[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++)
<?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>
[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,
#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 {