full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/psake-config.ps1
psake-config.ps1
<# ------------------------------------------------------------------- Defaults ------------------------------------------------------------------- $config.buildFileName="default.ps1" $config.framework = "4.0" $config.taskNameFormat="Executing {0}" $config.verboseError=$false $config.coloredOutput = $true $con...
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/psake-buildTester.ps1
psake-buildTester.ps1
function Main() { write-host "Running psake build tests" -ForeGroundColor GREEN remove-module psake -ea SilentlyContinue import-module .\psake.psm1 $psake.run_by_psake_build_tester = $true $results = runBuilds remove-module psake "" $results | Sort 'Name' | % { if ($_.Result -eq "Passed") { write-hos...
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/chocolateyInstall.ps1
chocolateyInstall.ps1
try { $nugetPath = $env:ChocolateyInstall $nugetExePath = Join-Path $nuGetPath 'bin' $packageBatchFileName = Join-Path $nugetExePath "psake.bat" $psakeDir = (Split-Path -parent $MyInvocation.MyCommand.Definition) #$path = ($psakeDir | Split-Path | Join-Path -ChildPath 'psake.cmd') $path = Join-Pat...
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/psake.ps1
psake.ps1
# Helper script for those who want to run psake without importing the module. # Example: # .\psake.ps1 "default.ps1" "BuildHelloWord" "4.0" # Must match parameter definitions for psake.psm1/invoke-psake # otherwise named parameter binding fails param( [Parameter(Position=0,Mandatory=0)] [string]$buil...
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/tabexpansion/PsakeTabExpansion.ps1
PsakeTabExpansion.ps1
$global:psakeSwitches = @('-docs', '-task', '-properties', '-parameters') function script:psakeSwitches($filter) { $psakeSwitches | where { $_ -like "$filter*" } } function script:psakeDocs($filter, $file) { if ($file -eq $null -or $file -eq '') { $file = 'default.ps1' } psake $file -docs | out-string...
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/simple_properties_and_tasks_should_pass.ps1
simple_properties_and_tasks_should_pass.ps1
properties { $testMessage = 'Executed Test!' $compileMessage = 'Executed Compile!' $cleanMessage = 'Executed Clean!' } task default -depends Test task Test -depends Compile, Clean { $testMessage } task Compile -depends Clean { $compileMessage } task Clean { $cleanMessage }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/using_initialization_block_should_pass.ps1
using_initialization_block_should_pass.ps1
properties { $container = @{} $container.foo = "foo" $container.bar = $null $foo = 1 $bar = 1 } task default -depends TestInit task TestInit { # values are: # 1: original # 2: overide # 3: new Assert ($container.foo -eq "foo") "$container.foo should be foo" Assert ($container.bar ...
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/using_precondition_should_pass.ps1
using_precondition_should_pass.ps1
task default -depends A,B,C task A { "TaskA" } task B -precondition { return $false } { "TaskB" } task C -precondition { return $true } { "TaskC" }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/duplicate_alias_should_fail.ps1
duplicate_alias_should_fail.ps1
task default task A -alias a {} task B -alias b {} task C -alias a {}
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/using_postcondition_should_pass.ps1
using_postcondition_should_pass.ps1
task default -depends A,B,C task A { "TaskA" } task B -postcondition { return $true } { "TaskB" } task C { "TaskC" }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/calling_invoke-task_should_pass.ps1
calling_invoke-task_should_pass.ps1
task default -depends A,B task A { } task B { "inside task B before calling task C" invoke-task C "inside task B after calling task C" } task C { }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/failing_postcondition_should_fail.ps1
failing_postcondition_should_fail.ps1
task default -depends A,B,C task A { "TaskA" } task B -postcondition { return $false } { "TaskB" } task C { "TaskC" }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/missing_task_should_fail.ps1
missing_task_should_fail.ps1
task default -depends Test task Test -depends Compile, Clean { Write-Host "Running PSake" }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/using_properties_should_pass.ps1
using_properties_should_pass.ps1
properties { $x = $null $y = $null $z = $null } task default -depends TestProperties task TestProperties { Assert ($x -ne $null) "x should not be null" Assert ($y -ne $null) "y should not be null" Assert ($z -eq $null) "z should be null" }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/bad_PreAndPostActions_should_fail.ps1
bad_PreAndPostActions_should_fail.ps1
task default -depends Test task Test -depends Compile, Clean -PreAction {"Pre-Test"} -PostAction {"Post-Test"} task Compile -depends Clean { "Compile" } task Clean { "Clean" }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/dotNet4_should_pass.ps1
dotNet4_should_pass.ps1
$framework = '4.0' task default -depends MsBuild task MsBuild { exec { msbuild /version } }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/using_msbuild_should_pass.ps1
using_msbuild_should_pass.ps1
task default -depends DisplayNotice task DisplayNotice { exec { msbuild /version } }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/duplicate_tasks_should_fail.ps1
duplicate_tasks_should_fail.ps1
task A {} task B {} task A {}
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/multiline_blocks_should_pass.ps1
multiline_blocks_should_pass.ps1
task default -depends doStuff task doStuff { "Starting to do stuff..." "Adding stuff... 1 + 1 =" + (1+1) "Stuff done!" }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/nested_builds_should_pass.ps1
nested_builds_should_pass.ps1
Properties { $x = 1 } Task default -Depends RunNested1, RunNested2, CheckX Task RunNested1 { Invoke-psake .\nested\nested1.ps1 } Task RunNested2 { Invoke-psake .\nested\nested2.ps1 } Task CheckX{ Assert ($x -eq 1) '$x was not 1' }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/using_PreAndPostActions_should_pass.ps1
using_PreAndPostActions_should_pass.ps1
task default -depends Test task Test -depends Compile, Clean -PreAction {"Pre-Test"} -Action { "Test" } -PostAction {"Post-Test"} task Compile -depends Clean { "Compile" } task Clean { "Clean" }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/using_required_when_set_should_pass.ps1
using_required_when_set_should_pass.ps1
properties { $x = $null $y = $null } task default -depends TestRequired task TestRequired -requiredVariables x, y { }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/writing_psake_variables_should_pass.ps1
writing_psake_variables_should_pass.ps1
properties { $x = 1 } task default -depends Verify task Verify -description "This task verifies psake's variables" { #Verify the exported module variables cd variable: Assert (Test-Path "psake") "variable psake was not exported from module" Assert ($psake.ContainsKey("build_success")) "'psake...
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/executing_module_function_that_depends_on_another_module_should_work.ps1
executing_module_function_that_depends_on_another_module_should_work.ps1
task default -depends test task test { Execute-ModuleAFunction }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/task_with_alias_and_dependencies_should_pass.ps1
task_with_alias_and_dependencies_should_pass.ps1
task default -depends Task_With_Alias task Task_With_Alias -depends Task_Dependency -alias twa {} task Task_Dependency {}
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/running_aspnet_compiler_under_dotNet35_should_pass.ps1
running_aspnet_compiler_under_dotNet35_should_pass.ps1
$framework = '3.5' task default -depends AspNetCompiler task AspNetCompiler { aspnet_compiler if ($LastExitCode -ne 1) { throw 'Error: Could not execute aspnet_compiler' } }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/explicitly_specified_32bit_build_should_pass.ps1
explicitly_specified_32bit_build_should_pass.ps1
$framework = '3.5x86' task default -depends MsBuild task MsBuild { exec { msbuild /version } }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/circular_dependency_in_tasks_should_fail.ps1
circular_dependency_in_tasks_should_fail.ps1
task default -depends A task A -depends B { } task B -depends A { }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/default_task_with_action_should_fail.ps1
default_task_with_action_should_fail.ps1
task default { "Starting to do stuff..." "Adding stuff... 1 + 1 =" + (1+1) "Stuff done!" }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/task_with_alias_should_pass.ps1
task_with_alias_should_pass.ps1
task Task_With_Big_Descriptve_Name -alias twbdn { "Doing stuff inside task with alias" }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/tasksetup_should_pass.ps1
tasksetup_should_pass.ps1
TaskSetup { "executing task setup" } Task default -depends Compile, Test, Deploy Task Compile { "Compiling" } Task Test -depends Compile { "Testing" } Task Deploy -depends Test { "Deploying" }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/using_required_when_not_set_should_fail.ps1
using_required_when_not_set_should_fail.ps1
properties { $x = $null $y = $null $z = $null } task default -depends TestProperties task TestProperties -requiredVariables z{ }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/using_parameters_should_pass.ps1
using_parameters_should_pass.ps1
properties { $my_property = $p1 + $p2 } task default -depends TestParams task TestParams { Assert ($my_property -ne $null) '$my_property should not be null' }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/nested/nested2.ps1
nested2.ps1
Properties { $x = 200 } Task default -Depends Nested2CheckX Task Nested2CheckX{ Assert ($x -eq 200) '$x was not 200' }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/specs/nested/nested1.ps1
nested1.ps1
Properties { $x = 100 } Task default -Depends Nested1CheckX Task Nested1CheckX{ Assert ($x -eq 100) '$x was not 100' }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/examples/properties.ps1
properties.ps1
properties { $x = $null $y = $null $z = $null } task default -depends TestProperties task TestProperties { Assert ($x -ne $null) "x should not be null. Run with -properties @{'x' = '1'; 'y' = '2'}" Assert ($y -ne $null) "y should not be null. Run with -properties @{'x' = '1'; 'y' = '2'}" Asser...
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/examples/continueonerror.ps1
continueonerror.ps1
Task default -Depends TaskA Task TaskA -Depends TaskB { "Task - A" } Task TaskB -Depends TaskC -ContinueOnError { "Task - B" throw "I failed on purpose!" } Task TaskC { "Task - C" }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/examples/parameters.ps1
parameters.ps1
properties { $my_property = $p1 + $p2 } task default -depends TestParams task TestParams { Assert ($my_property -ne $null) "`$my_property should not be null. Run with -parameters @{'p1' = 'v1'; 'p2' = 'v2'}" }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/examples/formattaskname_scriptblock.ps1
formattaskname_scriptblock.ps1
properties { $testMessage = 'Executed Test!' $compileMessage = 'Executed Compile!' $cleanMessage = 'Executed Clean!' } task default -depends Test formatTaskName { param($taskName) write-host $taskName -foregroundcolor Green } task Test -depends Compile, Clean { $testMessage } task Compil...
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/examples/preandpostaction.ps1
preandpostaction.ps1
task default -depends Test task Test -depends Compile, Clean -PreAction {"Pre-Test"} -Action { "Test" } -PostAction {"Post-Test"} task Compile -depends Clean { "Compile" } task Clean { "Clean" }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/examples/preandpostcondition.ps1
preandpostcondition.ps1
properties { $runTaskA = $false $taskBSucceded = $true } task default -depends TaskC task TaskA -precondition { $runTaskA -eq $true } { "TaskA executed" } task TaskB -postcondition { $taskBSucceded -eq $true } { "TaskB executed" } task TaskC -depends TaskA,TaskB { "TaskC executed." }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/examples/checkvariables.ps1
checkvariables.ps1
Properties { $x = 1 $y = 2 } FormatTaskName "[{0}]" Task default -Depends Verify Task Verify -Description "This task verifies psake's variables" { Assert (Test-Path 'variable:\psake') "psake variable was not exported from module" Assert ($psake.ContainsKey("version")) "psake variable does n...
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/examples/msbuild40.ps1
msbuild40.ps1
Framework "4.0" # Framework "4.0x64" task default -depends ShowMsBuildVersion task ShowMsBuildVersion { msbuild /version }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/examples/tasksetupandteardown.ps1
tasksetupandteardown.ps1
TaskSetup { "Executing task setup" } TaskTearDown { "Executing task tear down" } Task default -depends TaskB Task TaskA { "TaskA executed" } Task TaskB -depends TaskA { "TaskB executed" }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/examples/default.ps1
default.ps1
properties { $testMessage = 'Executed Test!' $compileMessage = 'Executed Compile!' $cleanMessage = 'Executed Clean!' } task default -depends Test task Test -depends Compile, Clean { $testMessage } task Compile -depends Clean { $compileMessage } task Clean { $cleanMessage } task ?...
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/examples/requiredvariables.ps1
requiredvariables.ps1
properties { $x = $null $y = $null $z = $null } task default -depends TestRequiredVariables # you can put arguments to task in multiple lines using ` task TestRequiredVariables ` -description "This task shows how to make a variable required to run task. Run this script with -properties @{x = 1; y = ...
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/examples/formattaskname_string.ps1
formattaskname_string.ps1
properties { $testMessage = 'Executed Test!' $compileMessage = 'Executed Compile!' $cleanMessage = 'Executed Clean!' } task default -depends Test formatTaskName "-------{0}-------" task Test -depends Compile, Clean { $testMessage } task Compile -depends Clean { $compileMessage } task ...
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/examples/nested.ps1
nested.ps1
Properties { $x = 1 } Task default -Depends RunNested1, RunNested2, CheckX Task RunNested1 { Invoke-psake .\nested\nested1.ps1 } Task RunNested2 { Invoke-psake .\nested\nested2.ps1 } Task CheckX{ Assert ($x -eq 1) '$x was not 1' }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/examples/nested/nested2.ps1
nested2.ps1
Properties { $x = 200 } Task default -Depends Nested2CheckX Task Nested2CheckX{ Assert ($x -eq 200) '$x was not 200' }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/examples/nested/nested1.ps1
nested1.ps1
Properties { $x = 100 } Task default -Depends Nested1CheckX Task Nested1CheckX{ Assert ($x -eq 100) '$x was not 100' }
PowerShellCorpus/Github/erlis_VsPsBld/Build/lib/psake/examples/passingParametersString/parameters.ps1
parameters.ps1
properties { $buildOutputPath = ".\bin\$buildConfiguration" } task default -depends DoRelease task DoRelease { Assert ("$buildConfiguration" -ne $null) "buildConfiguration should not have been null" Assert ("$buildConfiguration" -eq 'Release') "buildConfiguration=[$buildConfiguration] should have been 'Rel...
PowerShellCorpus/Github/ShawnJ013_ClassroomManager/classroom-frontend/bower_components/bootstrap/nuget/MyGet.ps1
MyGet.ps1
$nuget = $env:NuGet # parse the version number out of package.json $bsversion = ((Get-Content $env:SourcesPath\package.json) -join "`n" | ConvertFrom-Json).version # create packages & $nuget pack "nuget\bootstrap.nuspec" -Verbosity detailed -NonInteractive -NoPackageAnalysis -BasePath $env:SourcesPath -Version ...
PowerShellCorpus/Github/ShawnJ013_ClassroomManager/Backend/packages/Microsoft.ApplicationInsights.WindowsServer.2.1.0/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) if ([System.IO.File]::Exists($project.FullName)) { function MarkItemASCopyToOutput($item) { Try { #mark it to copy if newer $item.Properties.Item("CopyToOutputDirectory").Value = 2 } Catch { write-host $_.Exception.ToString() }...
PowerShellCorpus/Github/ShawnJ013_ClassroomManager/Backend/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/ShawnJ013_ClassroomManager/Backend/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/ShawnJ013_ClassroomManager/Backend/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/ShawnJ013_ClassroomManager/Backend/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/ShawnJ013_ClassroomManager/Backend/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/OPSTest_E2E_NewRepo_1488567941506/.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/adnanb90_someProjectRepository/project/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/adnanb90_someProjectRepository/project/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/adnanb90_someProjectRepository/project/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/adnanb90_someProjectRepository/project/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/adnanb90_someProjectRepository/project/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/adnanb90_someProjectRepository/project/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/adnanb90_someProjectRepository/project/packages/Microsoft.ApplicationInsights.WindowsServer.2.2.0/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) if ([System.IO.File]::Exists($project.FullName)) { function MarkItemASCopyToOutput($item) { Try { #mark it to copy if newer $item.Properties.Item("CopyToOutputDirectory").Value = 2 } Catch { write-host $_.Exception.ToString() }...
PowerShellCorpus/Github/adnanb90_someProjectRepository/project/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/adnanb90_someProjectRepository/project/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/adnanb90_someProjectRepository/project/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/adnanb90_someProjectRepository/project/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/adnanb90_someProjectRepository/project/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/darrylcauldwell_Configuring-Windows/Winion/Winion/Winion.tests.ps1
Winion.tests.ps1
# # This is a PowerShell Unit Test file. # You need a unit test framework such as Pester to run PowerShell Unit tests. # You can download Pester from http://go.microsoft.com/fwlink/?LinkID=534084 # Describe "Get-Function" { Context "Function Exists" { It "Should Return" { } } }
PowerShellCorpus/Github/EgoManiac_PSLynchealthCheck/new health check-v03.ps1
new health check-v03.ps1
#region Script Information Clear-Host Write-Host "----------------------------------------------------" -BackgroundColor DarkGreen Write-Host "| _ ____ ___ _ _____ " -ForegroundColor Green Write-Host "| | | _ _ _ __ ___ |___ \ / _ \/ |___ / " -ForegroundColor Green Write-H...
PowerShellCorpus/Github/leahlouisa_TheForestDS_Installation/UpdateTFDSToLatestVersion.ps1
UpdateTFDSToLatestVersion.ps1
C:\steamcmd\steamcmd.exe +login anonymous +app_update 556450 +quit
PowerShellCorpus/Github/leahlouisa_TheForestDS_Installation/LaunchTheForestDSAfterInitialSetup.ps1
LaunchTheForestDSAfterInitialSetup.ps1
if ((Test-Path C:\steamcmd\steamapps\common\TheForestDedicatedServer\serverConfigs.csv) -and (Test-Path C:\steamcmd\steamapps\common\TheForestDedicatedServer\TheForestDedicatedServer.exe)) { $ipAddress = (Get-NetIPAddress -AddressFamily IPv4 -Type Unicast -InterfaceAlias eth*).IPAddress.tostring() $customSer...
PowerShellCorpus/Github/leahlouisa_TheForestDS_Installation/InitialSetupForTheForestDS.ps1
InitialSetupForTheForestDS.ps1
#First, download and unzip SteamCMD New-Item -Path C:\steamcmd -ItemType directory Invoke-WebRequest https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip -OutFile C:\steamcmd\steamcmd.zip Add-Type -assembly "system.io.compression.filesystem" [io.compression.zipfile]::ExtractToDirectory("C:\steamcmd\steamcm...
PowerShellCorpus/Github/PowerShell_PackageManagementProviderResource/Test/run-tests.ps1
run-tests.ps1
cd "$PSScriptRoot" invoke-pester
PowerShellCorpus/Github/PowerShell_PackageManagementProviderResource/Test/OneGetTestHelper.ps1
OneGetTestHelper.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
PowerShellCorpus/Github/PowerShell_PackageManagementProviderResource/Test/PSModule/PSModule.IntegrationTest.Tests.ps1
PSModule.IntegrationTest.Tests.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
PowerShellCorpus/Github/PowerShell_PackageManagementProviderResource/Test/PSModule/PSModule.Get.Tests.ps1
PSModule.Get.Tests.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
PowerShellCorpus/Github/PowerShell_PackageManagementProviderResource/Test/PSModule/PSModule.Set.and.Test.Tests.ps1
PSModule.Set.and.Test.Tests.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
PowerShellCorpus/Github/PowerShell_PackageManagementProviderResource/Test/PackageManagementSource/OneGetSource.Get.Set.Test.Tests.ps1
OneGetSource.Get.Set.Test.Tests.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
PowerShellCorpus/Github/PowerShell_PackageManagementProviderResource/Test/PackageManagement/PackageManagement.Get.Tests.ps1
PackageManagement.Get.Tests.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
PowerShellCorpus/Github/PowerShell_PackageManagementProviderResource/Test/PackageManagement/PackageManagement.Set.Tests.ps1
PackageManagement.Set.Tests.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
PowerShellCorpus/Github/PowerShell_PackageManagementProviderResource/Test/PackageManagement/PackageManagement.Test.Tests.ps1
PackageManagement.Test.Tests.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
PowerShellCorpus/Github/PowerShell_PackageManagementProviderResource/Test/NugetPackage/NugetPackage.Set.Tests.ps1
NugetPackage.Set.Tests.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
PowerShellCorpus/Github/PowerShell_PackageManagementProviderResource/Test/NugetPackage/NugetPackage.IntegrationTest.Tests.ps1
NugetPackage.IntegrationTest.Tests.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
PowerShellCorpus/Github/PowerShell_PackageManagementProviderResource/Test/NugetPackage/NugetPackage.Get.Tests.ps1
NugetPackage.Get.Tests.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
PowerShellCorpus/Github/PowerShell_PackageManagementProviderResource/Test/NugetPackage/NugetPackage.Test.Tests.ps1
NugetPackage.Test.Tests.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
PowerShellCorpus/Github/PowerShell_PackageManagementProviderResource/Examples/Sample_Install_Package_Using_NuGet.ps1
Sample_Install_Package_Using_NuGet.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
PowerShellCorpus/Github/PowerShell_PackageManagementProviderResource/Examples/Sample_PSModule.ps1
Sample_PSModule.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
PowerShellCorpus/Github/PowerShell_PackageManagementProviderResource/Examples/Sample_Install_Package.ps1
Sample_Install_Package.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
PowerShellCorpus/Github/PowerShell_PackageManagementProviderResource/Examples/Sample_Install_Pester.ps1
Sample_Install_Pester.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
PowerShellCorpus/Github/PowerShell_PackageManagementProviderResource/Examples/Sample_NuGet_InstallPackage.ps1
Sample_NuGet_InstallPackage.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
PowerShellCorpus/Github/glennsarti_spike-SCCM-Puppet-ENC/PrestageComputer.ps1
PrestageComputer.ps1
param($ComputerName,$OSName,$OSVersion,$IPAddress,$DNSServer = '.') $ErrorActionPreference = 'Stop' # In order for SCCM to create a System DDR it requires the following minimum information # - Name (duh!) # - OperationSystem Name and Version # - DNS Name # - An DNS entry which is resolvable to an IP (Not nece...
PowerShellCorpus/Github/glennsarti_spike-SCCM-Puppet-ENC/CreateSCCMInfo.ps1
CreateSCCMInfo.ps1
# The SCCM Module is not in the usual Autoload location Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1' # Set the location to the SCCM Site of this server $sccmSite = (Get-PSDrive | ? { $_.Provider -like '*CMSite'} | Select -First 1).Name + ':' Set...
PowerShellCorpus/Github/glennsarti_spike-SCCM-Puppet-ENC/WebService/doit.ps1
doit.ps1
# SCCM Info $ConfigMgrSite = 'CEN' # SCCM Database Settings # TODO Find the DB Server and Name in the SCCM Config $DatabaseServer = '10.32.175.90' $DatabaseName = "CM_$ConfigMgrSite" $DatabaseUsername = 'sa' $DatabasePassword = 'Puppet01!'
PowerShellCorpus/Github/glennsarti_spike-SCCM-Puppet-ENC/WebService/Puppet_SCCM_ENC.ps1
Puppet_SCCM_ENC.ps1
[cmdletBinding(SupportsShouldProcess=$false,ConfirmImpact='Low')] param( [Parameter(Mandatory=$false,ValueFromPipeline=$false)] $HTTPEndPoint = 'http://*:8080/' # SCCM Info ,[Parameter(Mandatory=$true,ValueFromPipeline=$false)] $ConfigMgrSite # SCCM Database Settings ,[Parameter(Mandatory=$tru...
PowerShellCorpus/Github/n3l5_irMempull/irmempull.ps1
irmempull.ps1
<# .SYNOPSIS IR Forensic MEMory pull (irMEMpull) .DESCRIPTION irMEMpull is a PowerShell script utilized to pull dump memory from a live WinXP-Win7 system on your network. It DOES NOT utilize WinRM capabilities. Utilizes the winpmem memory dumping tool to dump the memory. When done collecting the artifa...
PowerShellCorpus/Github/niuniuliu_PowerShell_PS/Runsqlcmd.ps1
Runsqlcmd.ps1
#REM LF-20150310-XFS-0001.XFX (852.49951171875 MB) sqlcmd -S {DBServerName} -d rex -U {UserName} -P {Password} -Q {Commandline query}