full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Export-DataTable.ps1
Export-DataTable.ps1
function Export-DataTable { <# .Synopsis Exports objects to a datatable on disk .Description Exports objects to a datatable. Objects in the datatable must be serialiazble in order to be stored. .Link Import-DataTable .Link ConvertTo-DataTable .Notes ...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/get-blob.ps1
get-blob.ps1
function Get-Blob { <# .Synopsis Gets blob of cloud data .Description Gets blob of cloud data in Azure .Example # Get all containers Get-Blob -StorageAccount MyAzureStorageAccount -StorageKey MyAzureStorageKey .Example # Get all items in mycontain...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Show-WebObject.ps1
Show-WebObject.ps1
function Show-WebObject { <# .Synopsis Shows a web object .Description Shows a web object stored in cloud storage .Link Get-AzureTable .Example New-Object PSObject -Property @{ Content = "# Some Markdown or HTML " } | ...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/publish-WebSite.ps1
publish-WebSite.ps1
function Publish-Website { <# .Synopsis Publishes one or more modules as websites .Description Publishes one or more modules as websites, according to the DomainSchematic found in the Pipeworks manifest .Example Get-Module Pipeworks | Publish-WebSite .L...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Write-CSS.ps1
Write-CSS.ps1
function Write-CSS { <# .Synopsis Writes CSS styles .Description Writes CSS style tags, CSS attributes, and links to external stylesheets .Example # Create a new CSS Style named reallyimportant Write-CSS -Name '#ReallyImportant' -Style @{ "font-size...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Get-WebTemplateEditableRegion.ps1
Get-WebTemplateEditableRegion.ps1
function Get-WebTemplateEditableRegion { <# .Synopsis Extracts out the editable regions from a dynamic web template .Description Determines what portions of a document are editable .Example Get-ChildItem -Filter *.dwt | Get-WebTemplateEditableRegion .Link Ge...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Confirm-Person.ps1
Confirm-Person.ps1
function Confirm-Person { <# .Synopsis Confirms that the person actually exists .Description Confirms that a person actually exists and modifies users records. .Example # Confirm-Person is automatically called within a web site in the following manner Con...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Compress-Data.ps1
Compress-Data.ps1
function Compress-Data { <# .Synopsis Compresses data .Description Compresses data into a GZipStream .Link Expand-Data .Link http://msdn.microsoft.com/en-us/library/system.io.compression.gzipstream.aspx .Example $rawData = (Get-Command | ...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Open-EC2Port.ps1
Open-EC2Port.ps1
function Open-EC2Port { <# .Synopsis Opens Ports on EC2 Instances .Description Opens port ranges on EC2 Instances .Link Enable-EC2Remoting .Example Get-EC2 | Open-EC2Port -Range 80 #> [OutputType([Nullable],[PSObject])] param( ...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Import-Deployment.ps1
Import-Deployment.ps1
function Import-Deployment { <# .Synopsis Imports modules in your deployment .Description Imports modules in a deployment .Link Push-Deployment .Link Add-Deployment .Link Remove-Deployment .Example # Import all modules in a deploy...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Pipeworks.EzFormat.ps1
Pipeworks.EzFormat.ps1
$moduleRoot = "$home\documents\windowspowershell\modules\pipeworks" # Get-Module Pipeworks | Split-Path # In order to reuse the same action for multiple types $walkthruFormatAction = { $name = $_.Name $walkthru = Get-Walkthru -Text $_.Description New-Region -ItemType walkth...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Get-EC2KeyPair.ps1
Get-EC2KeyPair.ps1
function Get-EC2KeyPair { <# .Synopsis Gets key pair information from EC2. .Description Gets key pair information from EC2. Key pairs are used to identify secure information. .Example Get-EC2KeyPair .Link Remove-EC2KeyPair #> param() pr...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Get-EC2.ps1
Get-EC2.ps1
function Get-EC2 { <# .Synopsis Gets EC2 Instances .Description Gets EC2 instances from AWS .Example Get-EC2 .Link Add-EC2 .Link Reset-EC2 .Link Remove-EC2 #> [CmdletBinding(DefaultParameterSetName='GetAll')] param(...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Schematics/PartWiki/Use-PartWikiSchematic.ps1
Use-PartWikiSchematic.ps1
function Use-PartWikiSchematic { <# .Synopsis Builds a web application according to a schematic .Description Use-Schematic builds a web application according to a schematic. Web applications should not be incredibly unique: they should be built according to simple sc...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Schematics/Gallery/Use-GallerySchematic.ps1
Use-GallerySchematic.ps1
function Use-GallerySchematic { <# .Synopsis Builds a web application according to a schematic .Description Use-Schematic builds a web application according to a schematic. Web applications should not be incredibly unique: they should be built according to simple sch...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Schematics/SimpleSearch/Use-SimpleSearchSchematic.ps1
Use-SimpleSearchSchematic.ps1
function Use-SimpleSearchSchematic { <# .Synopsis Builds a web application according to a schematic .Description Use-Schematic builds a web application according to a schematic. Web applications should not be incredibly unique: they should be built according to simpl...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Schematics/Crudbin/Use-CrudBinSchematic.ps1
Use-CrudBinSchematic.ps1
function Use-CrudBinSchematic { <# .Synopsis Builds a web application according to a schematic .Description Use-Schematic builds a web application according to a schematic. Web applications should not be incredibly unique: they should be built according to simple sch...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Schematics/StagePage/Use-StagePageSchematic.ps1
Use-StagePageSchematic.ps1
function Use-StagePageSchematic { <# .Synopsis Builds a web application according to a schematic .Description Use-Schematic builds a web application according to a schematic. Web applications should not be incredibly unique: they should be built according to simple s...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Schematics/Bot/Use-BotSchematic.ps1
Use-BotSchematic.ps1
function Use-BotSchematic { <# .Synopsis Installs a bot onto the system .Description Installs bots related to a module onto a system. The bot schematic's parameters are a table of command names and parameters (similar to the WebCommand section). Each key is ...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Schematics/ObjectPage/Use-ObjectPageSchematic.ps1
Use-ObjectPageSchematic.ps1
function Use-ObjectPageSchematic { <# .Synopsis Builds a web application according to a schematic .Description Use-Schematic builds a web application according to a schematic. Web applications should not be incredibly unique: they should be built according to simple ...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Schematics/Dashboard/Use-DashboardSchematic.ps1
Use-DashboardSchematic.ps1
function Use-DashboardSchematic { <# .Synopsis Builds a web application according to a schematic .Description Use-Schematic builds a web application according to a schematic. Web applications should not be incredibly unique: they should be built according to simple s...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Schematics/ParkingMeter/Use-ParkingMeterSchematic.ps1
Use-ParkingMeterSchematic.ps1
function Use-ParkingMeterSchematic { <# .Synopsis Builds a web application according to a schematic .Description Use-Schematic builds a web application according to a schematic. Web applications should not be incredibly unique: they should be built according to simpl...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Schematics/ParkingMeter/Watch-Meter.ps1
Watch-Meter.ps1
param([string]$ModuleName) $moduleRoot = Get-Module $moduleName | Split-Path $pipeworksManifestPath = Join-Path $moduleRoot "$($ModuleName).Pipeworks.psd1" $pipeworksManifest = if (Test-Path $pipeworksManifestPath) { try { & ([ScriptBlock]::Create( "data -SupportedCommand Add-Me...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Schematics/Win8/Use-Win8Schematic.ps1
Use-Win8Schematic.ps1
function Use-Win8Schematic { <# .Synopsis Builds a web application according to a schematic .Description Use-Schematic builds a web application according to a schematic. Web applications should not be incredibly unique: they should be built according to simple schema...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Schematics/Blog/Use-BlogSchematic.ps1
Use-BlogSchematic.ps1
function Use-BlogSchematic { <# .Synopsis Builds a web application according to a schematic .Description Use-Schematic builds a web application according to a schematic. Web applications should not be incredibly unique: they should be built according to simple schema...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Schematics/CheckpointData/Use-CheckpointDataSchematic.ps1
Use-CheckpointDataSchematic.ps1
function Use-CheckpointDataSchematic { <# .Synopsis Builds a web application according to a schematic .Description Use-Schematic builds a web application according to a schematic. Web applications should not be incredibly unique: they should be built according to sim...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Schematics/Interested/Use-InterestedSchematic.ps1
Use-InterestedSchematic.ps1
function Use-InterestedSchematic { <# .Synopsis Builds a web application according to a schematic .Description Use-Schematic builds a web application according to a schematic. Web applications should not be incredibly unique: they should be built according to simple ...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Schematics/Bookshelf/Use-BookshelfSchematic.ps1
Use-BookshelfSchematic.ps1
function Use-BookshelfSchematic { <# .Synopsis Builds a web application according to a schematic .Description Use-Schematic builds a web application according to a schematic. Web applications should not be incredibly unique: they should be built according to simple s...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Tests/SQL/Create_And_Update_SqlCompact.test.ps1
Create_And_Update_SqlCompact.test.ps1
$randomDatabasePath = Join-Path $env:Temp "$(Get-Random).sdf" $dbName = Get-Random New-SQLDatabase -DatabasePath $randomDatabasePath -UseSqlCompact #Add-SqlTable -DatabasePath $randomDatabasePath -UseSqlCompact -TableName "TestTable" -Column a,b -KeyType Sequential -DataType integer, integer $inputObjs = @()...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Tests/SQL/Create_And_Update_MySQL.test.ps1
Create_And_Update_MySQL.test.ps1
$connStr = Get-SecureSetting LocalMySqlConnection -ValueOnly $mySqlConnection = $connStr -replace "Database=(\w{1,});", '' $dbName = Get-Random New-SQLDatabase -DatabaseName "TestDB$dbName" -useMySql -ConnectionStringOrSetting $mySqlConnection $mySqlConnection += ";Database=testdb$dbName" #Add-SqlTable -...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Tests/SQL/Create_And_Update_Sqlite.test.ps1
Create_And_Update_Sqlite.test.ps1
$randomDatabasePath = Join-Path $env:Temp "$(Get-Random).sqlite.db" $dbName = Get-Random New-SQLDatabase -DatabasePath $randomDatabasePath -UseSqlite #Add-SqlTable -DatabasePath $randomDatabasePath -UseSQLite -TableName "TestTable" -Column a,b -KeyType Sequential $inputObjs = @() $inputObjs += New-Object PS...
PowerShellCorpus/PowerShellGallery/Pipeworks/1.9.9.4/Tests/SQL/Create_And_Update_SqlServer.test.ps1
Create_And_Update_SqlServer.test.ps1
$dbName = "Db" + (Get-Random) New-SQLDatabase -DatabaseName $dbName -ComputerName localhost $connectionString = "Data Source=$env:ComputerName;Initial Catalog=$dbName;Integrated Security=SSPI;" #Add-SqlTable -DatabasePath $randomDatabasePath -UseSQLite -TableName "TestTable" -Column a,b -KeyType Sequential ...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Networking/ServiceManagementStartup.ps1
ServiceManagementStartup.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apach...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Networking/ShortcutStartup.ps1
ShortcutStartup.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apach...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Networking/Resources/Scaffolding/PHP/WorkerRole/setup.ps1
setup.ps1
[Reflection.Assembly]::LoadWithPartialName("Microsoft.WindowsAzure.ServiceRuntime") Add-PsSnapin PHPManagerSnapin $phpConfiguration = Get-PHPConfiguration $phpExecutable = Get-ChildItem $phpConfiguration.ScriptProcessor $phpExtensionsPath = $phpExecutable.DirectoryName + "\ext" $phpIniFile = $phpConfiguration.PH...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Networking/Resources/Scaffolding/PHP/WorkerRole/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient function downloadWithRetry { param([string]$url, [string]$dest, [int]$retry) Write-Host Write-Host "Attempt: $retry" Write-Host trap { Write-Hos...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Networking/Resources/Scaffolding/PHP/WebRole/bin/setup.ps1
setup.ps1
[Reflection.Assembly]::LoadWithPartialName("Microsoft.WindowsAzure.ServiceRuntime") Add-PsSnapin PHPManagerSnapin $phpConfiguration = Get-PHPConfiguration $phpExecutable = Get-ChildItem $phpConfiguration.ScriptProcessor $phpExtensionsPath = $phpExecutable.DirectoryName + "\ext" $phpIniFile = $phpConfiguration.PH...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Networking/Resources/Scaffolding/PHP/WebRole/bin/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient function downloadWithRetry { param([string]$url, [string]$dest, [int]$retry) Write-Host Write-Host "Attempt: $retry" Write-Host trap { Write-Hos...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Networking/Resources/Scaffolding/Node/WorkerRole/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient function downloadWithRetry { param([string]$url, [string]$dest, [int]$retry) Write-Host Write-Host "Attempt: $retry" Write-Host trap { Write-Hos...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Networking/Resources/Scaffolding/Node/WebRole/bin/ChangeConfig.ps1
ChangeConfig.ps1
$configFile = $args[0] Write-Host "Adding iisnode section to config file '$configFile'" $config = New-Object System.Xml.XmlDocument $config.load($configFile) $xpath = $config.CreateNavigator() $parentElement = $xpath.SelectSingleNode("//configuration/configSections/sectionGroup[@name='system.webServer']") $iisn...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Networking/Resources/Scaffolding/Node/WebRole/bin/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient function downloadWithRetry { param([string]$url, [string]$dest, [int]$retry) Write-Host Write-Host "Attempt: $retry" Write-Host trap { Write-Hos...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Networking/Resources/Scaffolding/General/WorkerRole/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient # For a custom role, it may not use runtime download, if that's the case, skip. if (!$runtimeUrl -and !$overrideUrl) { Write-Host "No runtimes to download"; exit; } ...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Networking/Resources/Scaffolding/General/WebRole/bin/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient # For a custom role, it may not use runtime download, if that's the case, skip. if (!$runtimeUrl -and !$overrideUrl) { Write-Host "No runtimes to download"; exit; } ...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Services/ServiceManagementStartup.ps1
ServiceManagementStartup.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apach...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Services/ShortcutStartup.ps1
ShortcutStartup.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apach...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Services/Resources/Scaffolding/PHP/WorkerRole/setup.ps1
setup.ps1
[Reflection.Assembly]::LoadWithPartialName("Microsoft.WindowsAzure.ServiceRuntime") Add-PsSnapin PHPManagerSnapin $phpConfiguration = Get-PHPConfiguration $phpExecutable = Get-ChildItem $phpConfiguration.ScriptProcessor $phpExtensionsPath = $phpExecutable.DirectoryName + "\ext" $phpIniFile = $phpConfiguration.PH...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Services/Resources/Scaffolding/PHP/WorkerRole/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient function downloadWithRetry { param([string]$url, [string]$dest, [int]$retry) Write-Host Write-Host "Attempt: $retry" Write-Host trap { Write-Hos...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Services/Resources/Scaffolding/PHP/WebRole/bin/setup.ps1
setup.ps1
[Reflection.Assembly]::LoadWithPartialName("Microsoft.WindowsAzure.ServiceRuntime") Add-PsSnapin PHPManagerSnapin $phpConfiguration = Get-PHPConfiguration $phpExecutable = Get-ChildItem $phpConfiguration.ScriptProcessor $phpExtensionsPath = $phpExecutable.DirectoryName + "\ext" $phpIniFile = $phpConfiguration.PH...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Services/Resources/Scaffolding/PHP/WebRole/bin/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient function downloadWithRetry { param([string]$url, [string]$dest, [int]$retry) Write-Host Write-Host "Attempt: $retry" Write-Host trap { Write-Hos...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Services/Resources/Scaffolding/Node/WorkerRole/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient function downloadWithRetry { param([string]$url, [string]$dest, [int]$retry) Write-Host Write-Host "Attempt: $retry" Write-Host trap { Write-Hos...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Services/Resources/Scaffolding/Node/WebRole/bin/ChangeConfig.ps1
ChangeConfig.ps1
$configFile = $args[0] Write-Host "Adding iisnode section to config file '$configFile'" $config = New-Object System.Xml.XmlDocument $config.load($configFile) $xpath = $config.CreateNavigator() $parentElement = $xpath.SelectSingleNode("//configuration/configSections/sectionGroup[@name='system.webServer']") $iisn...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Services/Resources/Scaffolding/Node/WebRole/bin/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient function downloadWithRetry { param([string]$url, [string]$dest, [int]$retry) Write-Host Write-Host "Attempt: $retry" Write-Host trap { Write-Hos...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Services/Resources/Scaffolding/General/WorkerRole/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient # For a custom role, it may not use runtime download, if that's the case, skip. if (!$runtimeUrl -and !$overrideUrl) { Write-Host "No runtimes to download"; exit; } ...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Services/Resources/Scaffolding/General/WebRole/bin/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient # For a custom role, it may not use runtime download, if that's the case, skip. if (!$runtimeUrl -and !$overrideUrl) { Write-Host "No runtimes to download"; exit; } ...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Compute/ServiceManagementStartup.ps1
ServiceManagementStartup.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apach...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Compute/ShortcutStartup.ps1
ShortcutStartup.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apach...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Compute/Resources/Scaffolding/PHP/WorkerRole/setup.ps1
setup.ps1
[Reflection.Assembly]::LoadWithPartialName("Microsoft.WindowsAzure.ServiceRuntime") Add-PsSnapin PHPManagerSnapin $phpConfiguration = Get-PHPConfiguration $phpExecutable = Get-ChildItem $phpConfiguration.ScriptProcessor $phpExtensionsPath = $phpExecutable.DirectoryName + "\ext" $phpIniFile = $phpConfiguration.PH...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Compute/Resources/Scaffolding/PHP/WorkerRole/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient function downloadWithRetry { param([string]$url, [string]$dest, [int]$retry) Write-Host Write-Host "Attempt: $retry" Write-Host trap { Write-Hos...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Compute/Resources/Scaffolding/PHP/WebRole/bin/setup.ps1
setup.ps1
[Reflection.Assembly]::LoadWithPartialName("Microsoft.WindowsAzure.ServiceRuntime") Add-PsSnapin PHPManagerSnapin $phpConfiguration = Get-PHPConfiguration $phpExecutable = Get-ChildItem $phpConfiguration.ScriptProcessor $phpExtensionsPath = $phpExecutable.DirectoryName + "\ext" $phpIniFile = $phpConfiguration.PH...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Compute/Resources/Scaffolding/PHP/WebRole/bin/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient function downloadWithRetry { param([string]$url, [string]$dest, [int]$retry) Write-Host Write-Host "Attempt: $retry" Write-Host trap { Write-Hos...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Compute/Resources/Scaffolding/Node/WorkerRole/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient function downloadWithRetry { param([string]$url, [string]$dest, [int]$retry) Write-Host Write-Host "Attempt: $retry" Write-Host trap { Write-Hos...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Compute/Resources/Scaffolding/Node/WebRole/bin/ChangeConfig.ps1
ChangeConfig.ps1
$configFile = $args[0] Write-Host "Adding iisnode section to config file '$configFile'" $config = New-Object System.Xml.XmlDocument $config.load($configFile) $xpath = $config.CreateNavigator() $parentElement = $xpath.SelectSingleNode("//configuration/configSections/sectionGroup[@name='system.webServer']") $iisn...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Compute/Resources/Scaffolding/Node/WebRole/bin/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient function downloadWithRetry { param([string]$url, [string]$dest, [int]$retry) Write-Host Write-Host "Attempt: $retry" Write-Host trap { Write-Hos...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Compute/Resources/Scaffolding/General/WorkerRole/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient # For a custom role, it may not use runtime download, if that's the case, skip. if (!$runtimeUrl -and !$overrideUrl) { Write-Host "No runtimes to download"; exit; } ...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Compute/Resources/Scaffolding/General/WebRole/bin/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient # For a custom role, it may not use runtime download, if that's the case, skip. if (!$runtimeUrl -and !$overrideUrl) { Write-Host "No runtimes to download"; exit; } ...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Sql/ServiceManagementStartup.ps1
ServiceManagementStartup.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apach...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Sql/ShortcutStartup.ps1
ShortcutStartup.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apach...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Sql/Resources/Scaffolding/PHP/WorkerRole/setup.ps1
setup.ps1
[Reflection.Assembly]::LoadWithPartialName("Microsoft.WindowsAzure.ServiceRuntime") Add-PsSnapin PHPManagerSnapin $phpConfiguration = Get-PHPConfiguration $phpExecutable = Get-ChildItem $phpConfiguration.ScriptProcessor $phpExtensionsPath = $phpExecutable.DirectoryName + "\ext" $phpIniFile = $phpConfiguration.PH...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Sql/Resources/Scaffolding/PHP/WorkerRole/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient function downloadWithRetry { param([string]$url, [string]$dest, [int]$retry) Write-Host Write-Host "Attempt: $retry" Write-Host trap { Write-Hos...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Sql/Resources/Scaffolding/PHP/WebRole/bin/setup.ps1
setup.ps1
[Reflection.Assembly]::LoadWithPartialName("Microsoft.WindowsAzure.ServiceRuntime") Add-PsSnapin PHPManagerSnapin $phpConfiguration = Get-PHPConfiguration $phpExecutable = Get-ChildItem $phpConfiguration.ScriptProcessor $phpExtensionsPath = $phpExecutable.DirectoryName + "\ext" $phpIniFile = $phpConfiguration.PH...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Sql/Resources/Scaffolding/PHP/WebRole/bin/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient function downloadWithRetry { param([string]$url, [string]$dest, [int]$retry) Write-Host Write-Host "Attempt: $retry" Write-Host trap { Write-Hos...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Sql/Resources/Scaffolding/Node/WorkerRole/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient function downloadWithRetry { param([string]$url, [string]$dest, [int]$retry) Write-Host Write-Host "Attempt: $retry" Write-Host trap { Write-Hos...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Sql/Resources/Scaffolding/Node/WebRole/bin/ChangeConfig.ps1
ChangeConfig.ps1
$configFile = $args[0] Write-Host "Adding iisnode section to config file '$configFile'" $config = New-Object System.Xml.XmlDocument $config.load($configFile) $xpath = $config.CreateNavigator() $parentElement = $xpath.SelectSingleNode("//configuration/configSections/sectionGroup[@name='system.webServer']") $iisn...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Sql/Resources/Scaffolding/Node/WebRole/bin/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient function downloadWithRetry { param([string]$url, [string]$dest, [int]$retry) Write-Host Write-Host "Attempt: $retry" Write-Host trap { Write-Hos...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Sql/Resources/Scaffolding/General/WorkerRole/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient # For a custom role, it may not use runtime download, if that's the case, skip. if (!$runtimeUrl -and !$overrideUrl) { Write-Host "No runtimes to download"; exit; } ...
PowerShellCorpus/PowerShellGallery/Azure/4.1.0/Sql/Resources/Scaffolding/General/WebRole/bin/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient # For a custom role, it may not use runtime download, if that's the case, skip. if (!$runtimeUrl -and !$overrideUrl) { Write-Host "No runtimes to download"; exit; } ...
PowerShellCorpus/PowerShellGallery/AzureRM.LogicApp/3.1.0/ResourceManagerStartup.ps1
ResourceManagerStartup.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apach...
PowerShellCorpus/PowerShellGallery/AzureRM.LogicApp/2.8.0/ResourceManagerStartup.ps1
ResourceManagerStartup.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apach...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Get-PersonGroup.ps1
Get-PersonGroup.ps1
function Get-PersonGroup { param( [parameter( Mandatory=$true, ParameterSetName='ListAllGroups') ] [switch]$ListAll , [parameter( Mandatory=$false, Position=1, ParameterSetName='GetSingleGroup') ]...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Get-PersonGroupTrainingStatus.Tests.ps1
Get-PersonGroupTrainingStatus.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "GetPersonGroupTrainingStatus" { Context "When a person group is not being trained" { New-PersonGroup "pester-1" It "Should throw when trying to retrieve training status" { ...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Invoke-GroupFaces.ps1
Invoke-GroupFaces.ps1
function Invoke-GroupFaces { param( # List of candidate faceIds, created with Invoke-FaceDetection [parameter(Mandatory=$true)] [System.Array]$faceIds ) $Request = "https://api.projectoxford.ai/face/v1.0/group" $Body = "{ `"faceIds`":" + ($faceIds | ConvertTo-Json)...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Invoke-IdentifyFaces.Tests.ps1
Invoke-IdentifyFaces.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "InvokeIdentifyFaces" { Context "When test data should be used"{ It "Should be available for testing"{ Test-Path "$here\..\SampleImages\Face_01.JPG" | Should Be $true ...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Remove-PersonFace.Tests.ps1
Remove-PersonFace.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "RemovePerson" { New-PersonGroup "pester-persongroup-1" New-Person "pester-person-1" -personGroupId "pester-persongroup-1" Context "When a person face is being deleted with pe...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Invoke-MSCognitiveServiceRequest.ps1
Invoke-MSCognitiveServiceRequest.ps1
function Invoke-MSCognitiveServiceRequest { param( [parameter(Mandatory=$false)] [string] $APIKey , [parameter(Mandatory=$true)] [string] $Method , [parameter(Mandatory=$true)] [string] $Uri , [parameter(Mandatory=$false)] ...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Get-PersonGroupTrainingStatus.ps1
Get-PersonGroupTrainingStatus.ps1
function Get-PersonGroupTrainingStatus { param( [parameter( Mandatory=$true, Position=1 ) ] [String]$PersonGroupId ) $Request = "https://api.projectoxford.ai/face/v1.0/persongroups/$PersonGroupId/training" $Response = Invoke-MSCogni...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Get-Person.ps1
Get-Person.ps1
function Get-Person { [CmdletBinding(DefaultParameterSetName="ListAll")] param( [parameter( Mandatory=$false, Position=1, ParameterSetName='byName') ] [String]$name , [parameter( Mandatory=$false, Par...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/New-PersonGroup.Tests.ps1
New-PersonGroup.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "NewPersonGroups" { Context "When a person group is being created with minimal configuration" { New-PersonGroup "pester-1" $result = Get-PersonGroup "pester-1" It "...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Invoke-FaceDetection.ps1
Invoke-FaceDetection.ps1
function Invoke-FaceDetection { param( [parameter( Mandatory=$true, ParameterSetName='byLocalImage' )] [ValidateScript({Test-Path $_ -PathType Leaf})] [string]$localImagePath , [parameter( Mandatory=$true, Par...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Remove-Person.ps1
Remove-Person.ps1
function Remove-Person { [CmdletBinding(DefaultParameterSetName="byName")] param( [parameter( Mandatory=$true, Position=1, ParameterSetName='byName') ] [String]$name , [parameter( Mandatory=$true, Pa...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Get-PersonGroup.ps1
Get-PersonGroup.ps1
function Get-PersonGroup { param( [parameter( Mandatory=$true, ParameterSetName='ListAllGroups') ] [switch]$ListAll , [parameter( Mandatory=$false, Position=1, ParameterSetName='GetSingleGroup') ]...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Remove-PersonGroup.Tests.ps1
Remove-PersonGroup.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "RemovePersonGroups" { Context "When a person group is being deleted" { New-PersonGroup "pester-1" Remove-PersonGroup "pester-1" It "Should not exist anymore / thro...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/New-PersonFace.ps1
New-PersonFace.ps1
function New-PersonFace { param( [parameter( Mandatory=$true, ParameterSetName='byPersonNameAndLocalImage' )] [parameter( Mandatory=$true, ParameterSetName='byPersonNameAndImageUrl' )] [string] $personName ...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Remove-FaceList.Tests.ps1
Remove-FaceList.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "RemoveFaceList" { Context "When a face list is deleted" { New-FaceList "pester-1" Remove-FaceList "pester-1" It "Should not exist anymore / throw when trying...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Invoke-FaceDetection.Tests.ps1
Invoke-FaceDetection.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "InvokeFaceDetection" { Context "When test data should be used"{ It "Should be available for testing"{ Test-Path "$here\..\SampleImages\Face_01.JPG" | Should Be $tru...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Invoke-FindSimilarFaces.ps1
Invoke-FindSimilarFaces.ps1
function Invoke-FindSimilarFaces { param( # faceId of the query face, as retrieved from Invoke-FaceDetection [parameter(Mandatory=$true)] [string]$faceId , # Existing unique candidate face list, created with New-FaceList [parameter( Mandatory=$true...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Get-PersonFace.Tests.ps1
Get-PersonFace.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "GetPersonFace" { New-PersonGroup "pester-persongroup-1" New-Person "pester-person-1" -personGroupId "pester-persongroup-1" New-PersonFace -personName "pester-person-1" -personGroup...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Invoke-FindSimilarFaces.Tests.ps1
Invoke-FindSimilarFaces.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "InvokeFindSimilarFaces" { Context "When test data should be used"{ It "Should be available for testing"{ Test-Path "$here\..\SampleImages\Face_01.JPG" | Should Be $true...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Invoke-IdentifyFaces.ps1
Invoke-IdentifyFaces.ps1
function Invoke-IdentifyFaces { param( # List of candidate faceIds, created with Invoke-FaceDetection [parameter(Mandatory=$true)] [System.Array]$faceIds , # Existing person group, created with New-PersonGroup [parameter(Mandatory=$true)] [string]$pers...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Get-Person.Tests.ps1
Get-Person.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" New-PersonGroup "pester-persongroup-1" New-Person "pester-person-1" -personGroupId "pester-persongroup-1" New-Person "pester-person-2" -personGroupId "pester-persongroup-1" New-Person "pester-person-3" -p...
PowerShellCorpus/PowerShellGallery/ps-AzureFaceAPI/1.0.1/Functions/Set-Person.ps1
Set-Person.ps1
function Set-Person { param( [parameter( Mandatory=$true, Position=1 )] [string] $name , [parameter(Mandatory=$true)] [string] $personGroupId , [parameter(Mandatory=$false)] [string] $newName , ...