full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/glasnt_hackfest/LCARS_ipsum/StarTrek.ps1
StarTrek.ps1
$DebugPreference = "continue" $ErrorPreference = "stop" $s3cmd = "python c:\s3cmd\s3cmd" $here = "C:\anchor\hackfest\StarTrek\" $bucket="lcarsipsum" $ScriptsFolder = $Here+"Scripts" $QuotesFolder = $Here+"Quotes" $QuoteHtml = "QuoteHtml" $ScriptsFolder, $QuotesFolder, $QuoteHtml| % { if (!(test-path $...
PowerShellCorpus/Github/SteloNLD_SEDS/SEDS/SEDS.ps1
SEDS.ps1
# # SEDS.ps1 # #requires -version 3 <# .SYNOPSIS SpaceEngineers Dedicated Server Manager .DESCRIPTION This Script manages your Dedicated SpaceEngineers Servers It will handle Updates for you at set intervals. .INPUTS .OUTPUTS .NOTES Version: 1.0 Author: Sten Lootens Aka St...
PowerShellCorpus/Github/ihere1_trywinserver2008/.openpublishing.build.ps1
.openpublishing.build.ps1
param( [string]$buildCorePowershellUrl = "https://opbuildstoragesandbox2.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1", [string]$parameters ) # Main $errorActionPreference = 'Stop' # Step-1: Download buildcore script to local echo "download build core script to local with source u...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/3.Web範例/Chiayi_YWweb/packages/jQuery.1.10.2/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Determine the file paths $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName if (Test-Path $projectIntelliSense...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/3.Web範例/Chiayi_YWweb/packages/jQuery.1.10.2/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # VS 11 and above supports the new intellisense JS files $vsVersion = [System.Version]::Parse($dte.Version) $supportsJsIntelliSenseFile = $vsVersion.Major -ge 11 if (-not $supportsJsIntelliSenseFile) { $displayVersio...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/3.Web範例/Chiayi_YWweb/packages/jQuery.1.10.2/Tools/common.ps1
common.ps1
function Get-Checksum($file) { $cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider" $fileInfo = Get-Item $file trap { ; continue } $stream = $fileInfo.OpenRead() if ($? -eq $false) { # Couldn't open file for reading return $null } $bytes = $...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/3.Web範例/Chiayi_YWweb/packages/Modernizr.2.6.2/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Update the _references.js file Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx
PowerShellCorpus/Github/shondiinhow_startwork1103105337/3.Web範例/Chiayi_YWweb/packages/Modernizr.2.6.2/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) if ($scriptsFolderProjectItem -eq $null) { # No Scripts folder Write-Host "No Scripts folder found" exit } # Update the _references.js file AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileName...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/3.Web範例/Chiayi_YWweb/packages/Modernizr.2.6.2/Tools/common.ps1
common.ps1
function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) { try { $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") } catch { # _references.js file not found return } if ($referencesFileProject...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/3.Web範例/Chiayi_YWweb/packages/EntityFramework.6.1.3/tools/init.ps1
init.ps1
param($installPath, $toolsPath, $package, $project) if (Get-Module | ?{ $_.Name -eq 'EntityFramework' }) { Remove-Module EntityFramework } Import-Module (Join-Path $toolsPath EntityFramework.psd1) # SIG # Begin signature block # MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQ...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/3.Web範例/Chiayi_YWweb/packages/EntityFramework.6.1.3/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Initialize-EFConfiguration $project Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' Write-Host Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/3.Web範例/Chiayi_YWweb/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/init.ps1
init.ps1
param($installPath, $toolsPath, $package, $project) $compilerPackageName = 'Microsoft.Net.Compilers' $roslynSubFolder = 'roslyn' if ($project -eq $null) { $project = Get-Project } $libDirectory = Join-Path $installPath 'lib\net45' $packageDirectory = Split-Path $installPath $compilerPackage = Get-Chil...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/3.Web範例/Chiayi_YWweb/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) $roslynSubFolder = 'roslyn' if ($project -eq $null) { $project = Get-Project } $projectRoot = $project.Properties.Item('FullPath').Value $binDirectory = Join-Path $projectRoot 'bin' $targetDirectory = Join-Path $binDirectory $roslynSubFolder if (Te...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/3.Web範例/Chiayi_YWweb/packages/Newtonsoft.Json.6.0.4/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # open json.net splash page on package install # don't open if json.net is installed as a dependency try { $url = "http://james.newtonking.com/json" $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) if ($dte2.ActiveWindow.Caption -eq "Package Manager Con...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/4.HTML_CSS_JS/WebBootstrap/packages/jQuery.1.10.2/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Determine the file paths $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName if (Test-Path $projectIntelliSense...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/4.HTML_CSS_JS/WebBootstrap/packages/jQuery.1.10.2/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # VS 11 and above supports the new intellisense JS files $vsVersion = [System.Version]::Parse($dte.Version) $supportsJsIntelliSenseFile = $vsVersion.Major -ge 11 if (-not $supportsJsIntelliSenseFile) { $displayVersio...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/4.HTML_CSS_JS/WebBootstrap/packages/jQuery.1.10.2/Tools/common.ps1
common.ps1
function Get-Checksum($file) { $cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider" $fileInfo = Get-Item $file trap { ; continue } $stream = $fileInfo.OpenRead() if ($? -eq $false) { # Couldn't open file for reading return $null } $bytes = $...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/4.HTML_CSS_JS/WebBootstrap/packages/Modernizr.2.6.2/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Update the _references.js file Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx
PowerShellCorpus/Github/shondiinhow_startwork1103105337/4.HTML_CSS_JS/WebBootstrap/packages/Modernizr.2.6.2/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) if ($scriptsFolderProjectItem -eq $null) { # No Scripts folder Write-Host "No Scripts folder found" exit } # Update the _references.js file AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileName...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/4.HTML_CSS_JS/WebBootstrap/packages/Modernizr.2.6.2/Tools/common.ps1
common.ps1
function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) { try { $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") } catch { # _references.js file not found return } if ($referencesFileProject...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/4.HTML_CSS_JS/WebBootstrap/packages/EntityFramework.6.1.3/tools/init.ps1
init.ps1
param($installPath, $toolsPath, $package, $project) if (Get-Module | ?{ $_.Name -eq 'EntityFramework' }) { Remove-Module EntityFramework } Import-Module (Join-Path $toolsPath EntityFramework.psd1) # SIG # Begin signature block # MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQ...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/4.HTML_CSS_JS/WebBootstrap/packages/EntityFramework.6.1.3/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Initialize-EFConfiguration $project Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' Write-Host Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/4.HTML_CSS_JS/WebBootstrap/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/init.ps1
init.ps1
param($installPath, $toolsPath, $package, $project) $compilerPackageName = 'Microsoft.Net.Compilers' $roslynSubFolder = 'roslyn' if ($project -eq $null) { $project = Get-Project } $libDirectory = Join-Path $installPath 'lib\net45' $packageDirectory = Split-Path $installPath $compilerPackage = Get-Chil...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/4.HTML_CSS_JS/WebBootstrap/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) $roslynSubFolder = 'roslyn' if ($project -eq $null) { $project = Get-Project } $projectRoot = $project.Properties.Item('FullPath').Value $binDirectory = Join-Path $projectRoot 'bin' $targetDirectory = Join-Path $binDirectory $roslynSubFolder if (Te...
PowerShellCorpus/Github/shondiinhow_startwork1103105337/4.HTML_CSS_JS/WebBootstrap/packages/Newtonsoft.Json.6.0.4/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # open json.net splash page on package install # don't open if json.net is installed as a dependency try { $url = "http://james.newtonking.com/json" $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) if ($dte2.ActiveWindow.Caption -eq "Package Manager Con...
PowerShellCorpus/Github/csharp-playground_select-many/build.ps1
build.ps1
########################################################################## # This is the Cake bootstrapper script for PowerShell. # This file was downloaded from https://github.com/cake-build/resources # Feel free to change this file to fit your needs. ###############################################################...
PowerShellCorpus/Github/dindenver_Exchange-Message-Tracking-Parallel/Get-MEssageTrackingLog-InParallel.ps1
Get-MEssageTrackingLog-InParallel.ps1
[CmdletBinding(DefaultParametersetName="FileName")] param ( [Parameter(Position = 0, Mandatory = $false, HelpMessage="Enter the Sender`'s SMTP address")] [String] [Alias("From")] [Alias("mail")] [Alias("PrimarySMTPAddress")] [Alias("WindowsEmailAddress")] [Alia...
PowerShellCorpus/Github/Sampath-Lokuge_EmployeeManagementSpa/EmployeeManagementSpa/Properties/PublishProfiles/EmployeeManagementApp - Web Deploy-publish.ps1
EmployeeManagementApp - Web Deploy-publish.ps1
[cmdletbinding(SupportsShouldProcess=$true)] param($publishProperties=@{}, $packOutput, $pubProfilePath) # to learn more about this file visit https://go.microsoft.com/fwlink/?LinkId=524327 try{ if ($publishProperties['ProjectGuid'] -eq $null){ $publishProperties['ProjectGuid'] = '120c45a5-a14a-4eb...
PowerShellCorpus/Github/furesoft_BaseClassLib/BaseClassLibrary/packages/Newtonsoft.Json.7.0.1/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # open json.net splash page on package install # don't open if json.net is installed as a dependency try { $url = "http://www.newtonsoft.com/json/install?version=" + $package.Version $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) if ($dte2.ActiveWindo...
PowerShellCorpus/Github/furesoft_BaseClassLib/BaseClassLibrary/packages/Microsoft.CodeAnalysis.Analyzers.1.0.0-rc2/tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Uninstall the language agnostic analyzers. $analyzersPath = join-path $toolsPath "analyzers" foreach ($analyzerFilePath in Get-ChildItem $analyzersPath -Filter *.dll) { if($project.Object.AnalyzerReferences) { $project.Object.AnalyzerRefer...
PowerShellCorpus/Github/furesoft_BaseClassLib/BaseClassLibrary/packages/Microsoft.CodeAnalysis.Analyzers.1.0.0-rc2/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) $analyzersPath = join-path $toolsPath "analyzers" # Install the language agnostic analyzers. foreach ($analyzerFilePath in Get-ChildItem $analyzersPath -Filter *.dll) { if($project.Object.AnalyzerReferences) { $project.Object.AnalyzerReferen...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/Functions/New-PersonFace.ps1
New-PersonFace.ps1
function New-PersonFace { param( [parameter( Mandatory=$true, ParameterSetName='byPersonNameAndLocalImage' )] [parameter( Mandatory=$true, ParameterSetName='byPersonNameAndImageUrl' )] [string] $personName ...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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/Github/MLauper_ps-AzureFaceAPI/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 , ...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Get-FaceList.ps1
Get-FaceList.ps1
function Get-FaceList { [CmdletBinding(DefaultParameterSetName="ListAll")] param( [parameter( Mandatory=$false, Position=1, ParameterSetName='byName') ] [String]$name , [parameter( Mandatory=$false, P...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Remove-Person.Tests.ps1
Remove-Person.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "RemovePerson" { New-PersonGroup "pester-1" Context "When a person is being deleted by name" { New-Person -name "pester-person-1" -personGroupId "pester-1" Re...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/New-PersonGroup.ps1
New-PersonGroup.ps1
function New-PersonGroup { param( [parameter( Mandatory=$true, Position=1 )] [string] $personGroupId , [parameter(Mandatory=$false)] [string] $name , [parameter(Mandatory=$false)] [string] $userData = ""...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/New-FaceList.ps1
New-FaceList.ps1
function New-FaceList { param( [parameter( Mandatory=$true, Position=1 )] [string] $name , [parameter(Mandatory=$false)] [string] $faceListId , [parameter(Mandatory=$false)] [string] $userData = "" ...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Invoke-VerifyFaces.Tests.ps1
Invoke-VerifyFaces.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "InvokeVerifyFaces" { Context "When test data should be used"{ It "Should be available for testing"{ Test-Path "$here\..\SampleImages\Face_01.JPG" | Should Be $true ...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/New-PersonFace.Tests.ps1
New-PersonFace.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "NewPersonFace" { New-PersonGroup "pester-persongroup-1" New-Person "pester-person-1" -personGroupId "pester-persongroup-1" Context "When test data should be used"{ I...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/New-FaceList.Tests.ps1
New-FaceList.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "NewFaceList" { Context "When a face list is being created" { New-FaceList "pester-1" $result = Get-FaceList "pester-1" It "Should exist" { ($result ...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Initialize-Secrets.ps1
Initialize-Secrets.ps1
function Initialize-Secrets { param( [parameter(Mandatory=$false)] [string]$SecretJSON = "./secrets.json" ) try { $secrets = Get-Content $SecretJSON $objSecrets = $secrets | ConvertFrom-Json } catch [System.Exception] { throw "Error loading secrets `n"...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Start-PersonGroupTraining.ps1
Start-PersonGroupTraining.ps1
function Start-PersonGroupTraining { param( [parameter( Mandatory=$true, Position=1 ) ] [String]$PersonGroupId ) $Request = "https://api.projectoxford.ai/face/v1.0/persongroups/$PersonGroupId/train" $Response = Invoke-MSCognitiveSer...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/New-FaceListFace.Tests.1.ps1
New-FaceListFace.Tests.1.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "NewFaceListFace" { Context "When test data should be used"{ It "Should be available for testing"{ Test-Path "$here\..\SampleImages\Face_01.JPG" | Should Be $true ...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Set-PersonGroup.ps1
Set-PersonGroup.ps1
function Set-PersonGroup { param( [parameter( Mandatory=$true, Position=1 )] [string] $personGroupId , [parameter(Mandatory=$false)] [string] $name , [parameter(Mandatory=$false)] [string] $userData = ""...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/New-FaceListFace.ps1
New-FaceListFace.ps1
function New-FaceListFace { param( [parameter( Mandatory=$true, ParameterSetName='byFaceListNameAndLocalImage' )] [parameter( Mandatory=$true, ParameterSetName='byFaceListNameAndImageUrl' )] [string] $faceList...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Get-Secrets.ps1
Get-Secrets.ps1
function Get-Secrets { Write-Host "ApiKey: " $Script:ApiKey }
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/New-Person.Tests.ps1
New-Person.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "NewPerson" { Context "When a person is being created" { New-PersonGroup "pester-persongroup-1" New-Person "pester-person-1" -personGroupId "pester-persongroup-1" $...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Remove-PersonFace.ps1
Remove-PersonFace.ps1
function Remove-PersonFace { [CmdletBinding(DefaultParameterSetName="byPersonName")] param( [parameter( Mandatory=$true, Position=1, ParameterSetName='byPersonName') ] [String]$personName , [parameter( Mandatory=...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Set-Person.Tests.ps1
Set-Person.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "SetPerson" { New-PersonGroup "pester-1" Context "When a person name is being modified" { New-Person -name "pester-person-1" -personGroupId "pester-1" Set-Person -nam...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Get-PersonGroup.Tests.ps1
Get-PersonGroup.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" New-PersonGroup "pester-1" New-PersonGroup "pester-2" Describe "GetPersonGroups" { Context "When all Person Groups are requested" { $result = Get-PersonGroup It "Returns more tha...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Get-FaceList.Tests.ps1
Get-FaceList.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" New-FaceList "pester-1" -faceListId "pester-1-id" New-FaceList "pester-2" -faceListId "pester-2-id" New-FaceList "pester-3" -faceListId "pester-3-id" Describe "GetFaceList" { Context "When a sing...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Set-FaceList.Tests.ps1
Set-FaceList.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "SetFaceList" { Context "When a face list name is modified" { New-FaceList -name "pester-1-name" -faceListId "pester-1-id" -userData "pester-1-userdata" Set-FaceList -name "...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/New-Person.ps1
New-Person.ps1
function New-Person { param( [parameter( Mandatory=$true, Position=1 )] [string] $name , [parameter(Mandatory=$true)] [string] $personGroupId , [parameter(Mandatory=$false)] [string] $userData = "" ...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Remove-FaceList.ps1
Remove-FaceList.ps1
function Remove-FaceList { param( [parameter( Mandatory=$true, Position=1 )] [string] $faceListId ) $Request = "https://api.projectoxford.ai/face/v1.0/facelists/$faceListId" $Response = Invoke-MSCognitiveServiceRequest -Method 'DELETE' -Uri...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Set-FaceList.ps1
Set-FaceList.ps1
function Set-FaceList { [CmdletBinding(DefaultParameterSetName="ByName")] param( [parameter( Mandatory=$true, Position=1, ParameterSetName='ByName' )] [string] $name , [parameter( Mandatory=$true, ...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Start-PersonGroupTraining.Tests.ps1
Start-PersonGroupTraining.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "StartPersonGroupTraining" { Context "When a person group without persons starts training" { New-PersonGroup "pester-1" It "Should not throw" { {Start-PersonGro...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Get-PersonFace.ps1
Get-PersonFace.ps1
function Get-PersonFace { param( [parameter( Mandatory=$true, ParameterSetName='byPersonName') ] [String]$personName , [parameter( Mandatory=$true, ParameterSetName='byPersonId') ] [String]$personId ...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Invoke-VerifyFaces.ps1
Invoke-VerifyFaces.ps1
function Invoke-VerifyFaces { param( [parameter( Mandatory=$true, ParameterSetName='FaceToFaceVerification' )] [String]$faceId1 , [parameter( Mandatory=$true, ParameterSetName='FaceToFaceVerification' )] ...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Remove-PersonGroup.ps1
Remove-PersonGroup.ps1
function Remove-PersonGroup { param( [parameter( Mandatory=$true, Position=1 )] [string] $personGroupId ) if ($name -eq ""){ $name = $personGroupId } $Request = "https://api.projectoxford.ai/face/v1.0/persongroups/$personG...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Invoke-GroupFaces.Tests.ps1
Invoke-GroupFaces.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "InvokeGroupFaces" { Context "When test data should be used"{ It "Should be available for testing"{ Test-Path "$here\..\SampleImages\Face_01.JPG" | Should Be $true ...
PowerShellCorpus/Github/MLauper_ps-AzureFaceAPI/Functions/Set-PersonGroup.Tests.ps1
Set-PersonGroup.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module -Force "$here\..\ps-AzureFaceAPI.psd1" Describe "SetPersonGroup" { Context "When a person group name is being modified" { New-PersonGroup "pester-1" Set-PersonGroup "pester-1" -name "new-name-pester-1" $result = ...
PowerShellCorpus/Github/Auliyaa_dev-toolbox/win32/reclaim-windows10.ps1
reclaim-windows10.ps1
########## # Win10 Initial Setup Script # Author: Disassembler <disassembler@dasm.cz> # Version: 1.7, 2016-08-15 # dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/ # THIS IS A PERSONALIZED VERSION # This script leaves more MS defaults on, including MS security features. # Tweaked b...
PowerShellCorpus/Github/jc210_CopyLater/CopyLater.ps1
CopyLater.ps1
<# ------------------------------------------------------------------ Script: CopyLater.ps1 Author: John Castillo Purpose: Simple script that copies select files to a single destination. Use with Task Scheduler to schedule during after hours. Tip: Use the "Copy as path" in Windows. Hold down shift k...
PowerShellCorpus/Github/poglet_Powershell/Git.ps1
Git.ps1
$ErrorActionPreference = "Stop" # Get correct location $dir = Read-Host "Enter project path (eg. C:\..\proj)" # Validate path $validPath = Test-Path "$dir" if ($validPath -like "False") { Read-Host "Path doesn't exist, press enter to exit" Exit-PSSession } else { Write-Host "The path is val...
PowerShellCorpus/Github/poglet_Powershell/PC Info.ps1
PC Info.ps1
$Computer = "#######" # DEFINE PROPERTIES: win32_bios $PCBios = Get-WmiObject -computername $Computer -Class win32_bios | select-object * $PCSerialNo = $PCBios.SerialNumber # DEFINE PROPERTIES: Win32_OperatingSystem $OSProperties = Get-WMIObject -computername $Computer -Class Win32_OperatingS...
PowerShellCorpus/Github/jrsantiago_SegundoParcial-JuniorSantiagoGuillenZ/SegundoParcial-JuniorSantiagoGuillenZ/packages/EntityFramework.6.1.3/tools/init.ps1
init.ps1
param($installPath, $toolsPath, $package, $project) if (Get-Module | ?{ $_.Name -eq 'EntityFramework' }) { Remove-Module EntityFramework } Import-Module (Join-Path $toolsPath EntityFramework.psd1) # SIG # Begin signature block # MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQ...
PowerShellCorpus/Github/jrsantiago_SegundoParcial-JuniorSantiagoGuillenZ/SegundoParcial-JuniorSantiagoGuillenZ/packages/EntityFramework.6.1.3/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Initialize-EFConfiguration $project Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' Write-Host Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma...
PowerShellCorpus/Github/pkothree_PowerShell/unzip.ps1
unzip.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 10/13/15 # Modified: 10/14/15 # Description: Unzip files ### $location= PATH $shell = new-object -com shell.application # you can add a filename behind $location # $zip = $shell.NameSpace("$location\\FILENAME") $zip = $...
PowerShellCorpus/Github/pkothree_PowerShell/copyFiles.ps1
copyFiles.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 10/13/15 # Modified: 10/14/15 # Description: Copy files to different directories ### Start-Transcript "C:\CopyFiles.txt" Write-Host "FILENAME for Log" Copy-Item "SOURCEPATH\FILENAME" "DESTINATIONPATH" Write-Host "Done!" ...
PowerShellCorpus/Github/pkothree_PowerShell/Start_Stop_Services/StartServices.ps1
StartServices.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 03/04/16 # Modified: 03/04/16 # Description: Start Windows Services ### $services= "Service1", "Service2", "..." foreach($serviceName in $services) { Set-Service -Name $serviceName -startuptype "automatic" Start-S...
PowerShellCorpus/Github/pkothree_PowerShell/Start_Stop_Services/StopServices.ps1
StopServices.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 03/04/16 # Modified: 03/04/16 # Description: Stop Windows Services ### $services= "Service1", "Service2", "..." foreach($serviceName in $services) { Stop-Service -Name $serviceName Set-Service -Name $serviceName -...
PowerShellCorpus/Github/jtri_dsc/VariableSubstitution.ps1
VariableSubstitution.ps1
<# Provide this script with a list of files and a subpattern of variables to match. It will then use a powershell script to replace and save the file with variables substituted from *matching" environment variable values (ie those set in Appveyor/TC/Octopus). #> [CmdletBinding()] param ( ...
PowerShellCorpus/Github/jtri_dsc/DeployOctopusTentacle.ps1
DeployOctopusTentacle.ps1
param ( [System.String] $SubPattern = 'USER' ) $ModulePath = $env:PSModulePath.Split(';') -like 'C:\Program Files\*' $ScriptDir = Split-Path $MyInvocation.MyCommand.Path $Modules = @('OctopusDSC') ForEach ($Module in $Modules) { $Source = Join-Path -Path $ScriptDir -ChildPath $Module Copy-I...
PowerShellCorpus/Github/jtri_dsc/TentacleConfig.ps1
TentacleConfig.ps1
[CmdletBinding()] param ( [Parameter()] $OutputPath = [IO.Path]::Combine( $PSScriptRoot, 'TentacleConfig' ), [Parameter()] $ConfigData ) Configuration Tentacle { Import-DscResource -ModuleName PSDesiredStateConfiguration Import-DscResource -Name OctopusDSC Node $AllNodes....
PowerShellCorpus/Github/jtri_dsc/Helpers.ps1
Helpers.ps1
function Install-NugetProvider { param ( [String] $Version = '2.8.201' ) Write-Verbose 'Installing NuGet package management.' Install-PackageProvider -Name NuGet -MinimumVersion $Version -Force Import-PackageProvider -Name NuGet -MinimumVersion $Version -Force } function Remove-OldNugetProvider { ...
PowerShellCorpus/Github/jtri_dsc/Replace-FileString.ps1
Replace-FileString.ps1
# Replace-FileString.ps1 # Written by Bill Stewart (bstewart@iname.com) # # Replaces strings in files using a regular expression. Supports # multi-line searching and replacing. #requires -version 2 <# .SYNOPSIS Replaces strings in files using a regular expression. .DESCRIPTION Replaces strings in files ...
PowerShellCorpus/Github/jtri_dsc/sqlserver-dsc/SqlServerExpressConfig.ps1
SqlServerExpressConfig.ps1
$ConfigurationData = @{ AllNodes = @( @{ NodeName = "localhost" Roles = "Setup, Development" <# We should encrypt passwords normally CertificateFile = 'c:\PublicKeys\server1.cer' http://go.microsoft.com/fwlink/?LinkId=393729 ...
PowerShellCorpus/Github/jtri_dsc/registry-dsc/RegistryConfig.ps1
RegistryConfig.ps1
$ConfigurationData = @{ AllNodes = @( @{ NodeName = "localhost" Roles = "Setup, Development" RegistryValues = @{ 'key1' = 'val1'; 'key2' = 'val2'; 'key3' = 'val3'; 'key4' = 'val4'; ...
PowerShellCorpus/Github/jtri_dsc/iis-dsc/IISConfig.ps1
IISConfig.ps1
$ConfigurationData = @{ AllNodes = @( @{ NodeName = "localhost" Roles = "Setup, Development" IISFeatures = @{ Enabled = @( 'Web-Server','Web-WebServer','Web-Default-Doc', 'Web-Http-Errors','Web-Static-Content...
PowerShellCorpus/Github/evetsleep_MeasureDirectoryPerformance/Functions/Test-DirectoryConnection.ps1
Test-DirectoryConnection.ps1
function Test-DirectoryConnection { [CmdletBinding()]param( [Parameter(Position=0,Mandatory,ValueFromPipeline,ValueFromPipelineByPropertyName)] [String[]]$ComputerName, [Parameter(Position=1)] [String]$Port = '389' ) process { foreach ($computer in $Comput...