full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/digipost_appveyor-deploy/Common.ps1
Common.ps1
function Find-Data-Or-Throw { param( [string]$description, [string]$source, [string]$data ) if( -not($source -like "*$data*") ) { throw "Did not find $data in $description. Please check spelling and/or source" } } function Print-Step-Heade...
PowerShellCorpus/Github/digipost_appveyor-deploy/InstallVirksomhetssertifikat.ps1
InstallVirksomhetssertifikat.ps1
Param( [string]$virksomhetssertifikat ) $virksomhetssertifikatExists = (Test-Path $virksomhetssertifikat) if(!$virksomhetssertifikatExists) { throw "Could not find virksomhetssertifikat at $virksomhetssertifikat. Please check that this is the decryption path for the virksomhetssertifikat." } certut...
PowerShellCorpus/Github/digipost_appveyor-deploy/DeployPreamble.ps1
DeployPreamble.ps1
. $PSScriptRoot\Common.ps1 Print-Step-Header "deploy: Deploying NuGet package"
PowerShellCorpus/Github/digipost_appveyor-deploy/NuspecVersionPatcher.ps1
NuspecVersionPatcher.ps1
Param( [string]$assembly, [string]$nuspec ) . $PSScriptRoot\Common.ps1 $nuspecName = (Get-Item $nuspec).Name Print-Step-Header "after_build: Patching $nuspecName" $root = (Get-Item (Resolve-Path -Path $PSScriptRoot)).parent.FullName $dllPath = "$root\$assembly" $dllExists = (Test-Path $dllPath) ...
PowerShellCorpus/Github/jeffgorrell_R_3.2.3/Deploy-Application.ps1
Deploy-Application.ps1
<# .SYNOPSIS This script performs the installation or uninstallation of an application(s). .DESCRIPTION The script is provided as a template to perform an install or uninstall of an application(s). The script either performs an "Install" deployment type or an "Uninstall" deployment type. The install deploymen...
PowerShellCorpus/Github/jeffgorrell_R_3.2.3/AppDeployToolkit/AppDeployToolkitExtensions.ps1
AppDeployToolkitExtensions.ps1
<# .SYNOPSIS This script is a template that allows you to extend the toolkit with your own custom functions. .DESCRIPTION The script is automatically dot-sourced by the AppDeployToolkitMain.ps1 script. .NOTES Toolkit Exit Code Ranges: 60000 - 68999: Reserved for built-in exit codes in Deploy-Applicatio...
PowerShellCorpus/Github/jeffgorrell_R_3.2.3/AppDeployToolkit/AppDeployToolkitMain.ps1
AppDeployToolkitMain.ps1
<# .SYNOPSIS This script contains the functions and logic engine for the Deploy-Application.ps1 script. .DESCRIPTION The script can be called directly to dot-source the toolkit functions for testing, but it is usually called by the Deploy-Application.ps1 script. The script can usually be updated to the latest v...
PowerShellCorpus/Github/jeffgorrell_R_3.2.3/AppDeployToolkit/AppDeployToolkitHelp.ps1
AppDeployToolkitHelp.ps1
<# .SYNOPSIS Displays a graphical console to browse the help for the App Deployment Toolkit functions .DESCRIPTION Displays a graphical console to browse the help for the App Deployment Toolkit functions .EXAMPLE AppDeployToolkitHelp.ps1 .NOTES .LINK http://psappdeploytoolkit.com #> ##*================...
PowerShellCorpus/Github/malika15_continuousIntegration/deployServicePortal.ps1
deployServicePortal.ps1
# Arguments Expected: # Args[0] = Environment (Eg: LOCAL, DEV, TEST, PRE-PROD, PROD etc) param ( [Parameter(Mandatory)] [string]$Environment ) # Set the Global Parameters $ApplicationName = "serviceportal" $my_script_dir = Split-Path -Parent $MyInvocation.MyCommand.Path $env_filename = "$my_script_...
PowerShellCorpus/Github/master9559_Tools/ABCamel/packages/EntityFramework.6.0.0/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 # MIIarwYJKoZIhvcNAQcCoIIaoDCCGpwCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQ...
PowerShellCorpus/Github/master9559_Tools/ABCamel/packages/EntityFramework.6.0.0/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/master9559_Tools/ABCamel/packages/System.Data.SQLite.EF6.1.0.103/tools/net45/install.ps1
install.ps1
############################################################################### # # provider.ps1 -- # # Written by Joe Mistachkin. # Released to the public domain, use at your own risk! # ############################################################################### param($installPath, $toolsPath, $package, ...
PowerShellCorpus/Github/master9559_Tools/ABCamel/packages/System.Data.SQLite.EF6.1.0.103/tools/net451/install.ps1
install.ps1
############################################################################### # # provider.ps1 -- # # Written by Joe Mistachkin. # Released to the public domain, use at your own risk! # ############################################################################### param($installPath, $toolsPath, $package, ...
PowerShellCorpus/Github/master9559_Tools/ABCamel/packages/System.Data.SQLite.EF6.1.0.103/tools/net46/install.ps1
install.ps1
############################################################################### # # provider.ps1 -- # # Written by Joe Mistachkin. # Released to the public domain, use at your own risk! # ############################################################################### param($installPath, $toolsPath, $package, ...
PowerShellCorpus/Github/master9559_Tools/ABCamel/packages/System.Data.SQLite.EF6.1.0.103/tools/net40/install.ps1
install.ps1
############################################################################### # # provider.ps1 -- # # Written by Joe Mistachkin. # Released to the public domain, use at your own risk! # ############################################################################### param($installPath, $toolsPath, $package, ...
PowerShellCorpus/Github/dsakam_UnitTests/UnitTests/UnitTests.ps1
UnitTests.ps1
######## LICENSE #################################################################################################################################### <# # Copyright (c) 2013-2014, Daiki Sakamoto # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are perm...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_NewRepo_2017_4_21_31_58_22/.openpublishing.build.ps1
.openpublishing.build.ps1
param( [string]$buildCorePowershellUrl = "https://opbuildstorageprod.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 url: ...
PowerShellCorpus/Github/cajeeper_PowerCLI/Update-VSAN-HCL-DB.ps1
Update-VSAN-HCL-DB.ps1
<# .SYNOPSIS Script to download VSAN HCL for VSAN Health Check Offline .NOTES Author : Justin Bennett Date : 2015-12-22 Contact : http://www.allthingstechie.net Revision : v1.0 Changes : v1.0 Original #> #Connect-VIServer myVcenterServer.local $storageDir = "c:\users\user...
PowerShellCorpus/Github/cajeeper_PowerCLI/Download_VSAN_HCL.ps1
Download_VSAN_HCL.ps1
$storageDir = "c:\users\username\desktop" $webclient = New-Object System.Net.WebClient $url = "http://partnerweb.vmware.com/service/vsan/all.json" $file = "$storageDir\all.json" $webclient.DownloadFile($url,$file)
PowerShellCorpus/Github/cajeeper_PowerCLI/vMotion Off All VMs Host A to B.ps1
vMotion Off All VMs Host A to B.ps1
<# .SYNOPSIS Script to vMotion VMs off one ESXi host to do maintenance - non-DRS user. .DESCRIPTION I use this script to vMotion VMs off one ESXi host to another ESXi host (A to B), perform some maintenance on the host, then migrate the VMs back to host (B to A). Optional progress bar, unmount...
PowerShellCorpus/Github/cajeeper_PowerCLI/Get-ESXi-Hosts-and-vCenter-Builds.ps1
Get-ESXi-Hosts-and-vCenter-Builds.ps1
$myESXiHosts = Get-VMHost | %{ $_ | Select Name, @{N="ESXi Version";E={"$($_.Version) build $($_.Build)"}}, @{N="vCenter";E={$_.ExtensionData.Client.ServiceUrl.Split('/')[2]}}, @{N="vCenter version";E={ $global:DefaultVIServers | where {$_.Name -eq ($_.ExtensionData.Client.ServiceUrl.Split('/')[...
PowerShellCorpus/Github/cajeeper_PowerCLI/Reset-VM-CBT.ps1
Reset-VM-CBT.ps1
<# .SYNOPSIS Script reset VMs CBT and tag them as being reset if ESXi600-201511001 has been loaded on its host. .DESCRIPTION CBT Bug VMWare KB 2137546 is no bueno. I wanted a way to patch VMs possibly affected and keep track of ones that were patched - so as I progress through and patch for th...
PowerShellCorpus/Github/cajeeper_PowerCLI/Migrate-VMsOffOverProvisionedDatastore.ps1
Migrate-VMsOffOverProvisionedDatastore.ps1
<# .SYNOPSIS Script to intiate migration of VMs if datastore is over provisioned .NOTES Author : Justin Bennett Date : 2015-12-22 Contact : http://www.allthingstechie.net Revision : v1.0 Changes : v1.0 Original #> #Connect-VIServer myVcenterServer.local #Gather my stores ...
PowerShellCorpus/Github/cajeeper_PowerCLI/Install-Windows-Update-for-Template.ps1
Install-Windows-Update-for-Template.ps1
<# .SYNOPSIS Script to update Template's Windows Updates .DESCRIPTION I use this script to convert my template to a VM, start the VM, apply any Windows Update, shutdown the VM, and convert it back to a template. Optionally, it can create a copy of the template to another site to maintain...
PowerShellCorpus/Github/cajeeper_PowerCLI/Update-VMwareTools.ps1
Update-VMwareTools.ps1
<# .SYNOPSIS Function to trigger VMware Tools update on VMs. .DESCRIPTION You can specify a single VM, multiple VMs, or discover all VMs in your environment and either trigger updates or view the VM(s) found. .NOTES Author : Justin Bennett Date : 2015-12-07 Cont...
PowerShellCorpus/Github/cajeeper_PowerCLI/ColdMigrate-VM.ps1
ColdMigrate-VM.ps1
<# .SYNOPSIS Script to intiate migration of VM that is not able to be migrated live/high priority .DESCRIPTION When migrating VMs between ESXi hosts that have different hardware or configurations, you're not always allowed to perform live/high priority migrations. This script allows for this p...
PowerShellCorpus/Github/cajeeper_PowerCLI/Get-VMwithStartConnectedDisabled/Get-VMwithStartConnectedDisabled.ps1
Get-VMwithStartConnectedDisabled.ps1
Function Get-VMwithStartConnectedDisabled { <# .SYNOPSIS This function will take in a PowerCLI VM object and inspect each network adapter to see if any active network connections are not set to connect at system start-up. .DESCRIPTION This function grew from the continued discovery of running VMs with miscon...
PowerShellCorpus/Github/ForNeVeR_avalonia-pascalabc-net-showcase/prepare-libraries.ps1
prepare-libraries.ps1
param ( $LibraryDirectory = "$PSScriptRoot/libs" ) Write-Output 'Preparing library packages…' $libraries = @( "$PSScriptRoot/packages/Avalonia/lib/net45/*" "$PSScriptRoot/packages/Avalonia.Direct2D1/lib/net45/*" "$PSScriptRoot/packages/Avalonia.Win32/lib/net45/*" "$PSScriptRoot/packages/...
PowerShellCorpus/Github/ForNeVeR_avalonia-pascalabc-net-showcase/build.ps1
build.ps1
compiler/pabcnetcclear.exe Application.pas if ($?) { if (-not (Test-Path bin)) { New-Item -Type Directory bin } Copy-Item Application.exe bin Copy-Item 'libs/*' bin Copy-Item app.config bin/Application.exe.config }
PowerShellCorpus/Github/digideskio_DSC-NLB/Examples/Example.ps1
Example.ps1
configuration NLBConfig { [CmdletBinding()] Param ( [psCredential] $Credentials ) Import-DscResource -ModuleName NLB node $AllNodes.Where{$_.Role -eq "NLBServer1"}.NodeName { NLBCreateCluster CreateNLB { ClusterName = 'ClusterofBugz'...
PowerShellCorpus/Github/digideskio_DSC-NLB/Examples/DrainStopExample.ps1
DrainStopExample.ps1
configuration NLBTest { Import-DscResource -ModuleName NLB Import-DscResource -ModuleName xWindowsUpdate Import-DscResource –ModuleName 'PSDesiredStateConfiguration' node $AllNodes.Where{$_.Role -eq "ClusterNode1"}.NodeName { NLBStopNode StopNodeForUpdates { In...
PowerShellCorpus/Github/digideskio_DSC-NLB/Tests/appveyor.pester.ps1
appveyor.pester.ps1
# This script will invoke pester tests # It should invoke on PowerShell v2 and later # We serialize XML results and pull them in appveyor.yml #If Finalize is specified, we collect XML output, upload tests, and indicate build errors param( [switch]$Finalize, [switch]$Test, [string]$ProjectRoot = $EN...
PowerShellCorpus/Github/Azannah_CompressAndCycle/CompressAndCycle/CompressAndCycle.ps1
CompressAndCycle.ps1
# # CompressAndCycle.ps1 # ### Clear existing errors to get a clean tally and to catch any configuration errors $Error.clear() New-Module -ScriptBlock { ### ===================================================================================== ### IMPORT REQUIRED MODULES ### =========================...
PowerShellCorpus/Github/gabgagnon_ORM-TP3-BD/Application Console/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/gabgagnon_ORM-TP3-BD/Application Console/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/JessicaFu_Pop-Mee/App1/AppPackages/App1_1.0.0.0_AnyCPU_Debug_Test/Add-AppDevPackage.ps1
Add-AppDevPackage.ps1
# # Add-AppxDevPackage.ps1 is a PowerShell script designed to install app # packages created by Visual Studio for developers. To run this script from # Explorer, right-click on its icon and choose "Run with PowerShell". # # Visual Studio supplies this script in the folder generated with its # "Prepare Package" c...
PowerShellCorpus/Github/timothywarner_wireshark/wireshark-demo.ps1
wireshark-demo.ps1
break # ############################################################################# # Wireshark Demo # AUTHOR: Tim Warner # EMAIL: timothywarner316@gmail.com # TWITTER: @TechTrainerTim # ############################################################################# # Press CTRL+M to expand/collapse regions ...
PowerShellCorpus/Github/ricardclau_packer-demos/provisioners/powershell/defrag-c.ps1
defrag-c.ps1
Write-Host "Starting Defrag C..." Optimize-Volume C -Verbose
PowerShellCorpus/Github/ricardclau_packer-demos/provisioners/powershell/sysprep-bundleconfig.ps1
sysprep-bundleconfig.ps1
$EC2SettingsFile="C:\\Program Files\\Amazon\\Ec2ConfigService\\Settings\\BundleConfig.xml" $xml = [xml](get-content $EC2SettingsFile) $xmlElement = $xml.get_DocumentElement() foreach ($element in $xmlElement.Property) { if ($element.Name -eq "AutoSysprep") { $element.Value="Yes" } } $xml...
PowerShellCorpus/Github/ricardclau_packer-demos/provisioners/powershell/disable-uac.ps1
disable-uac.ps1
Write-Host "Disabling UAC..." New-ItemProperty -Path HKLM:Software\Microsoft\Windows\CurrentVersion\Policies\System -Name EnableLUA -PropertyType DWord -Value 0 -Force New-ItemProperty -Path HKLM:Software\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -PropertyType DWord -Value 0 -F...
PowerShellCorpus/Github/ricardclau_packer-demos/provisioners/powershell/configure-winrm.ps1
configure-winrm.ps1
winrm quickconfig -q winrm quickconfig -transport:http winrm set winrm/config '@{MaxTimeoutms="7200000"}' winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="0"}' winrm set winrm/config/winrs '@{MaxProcessesPerShell="0"}' winrm set winrm/config/winrs '@{MaxShellsPerUser="0"}' winrm set winrm/config/service '@{...
PowerShellCorpus/Github/ricardclau_packer-demos/provisioners/powershell/install-iis.ps1
install-iis.ps1
Write-Host "Installing IIS..." Import-Module ServerManager $features = @( "Web-WebServer", "Web-Static-Content", "Web-Http-Errors", "Web-Http-Redirect", "Web-Stat-Compression", "Web-Filtering", "Web-Asp-Net45", "Web-Net-Ext45", "Web-ISAPI-Ext", "Web-ISAPI-Filter", "Web-Mgmt...
PowerShellCorpus/Github/ricardclau_packer-demos/provisioners/powershell/install-chocolatey.ps1
install-chocolatey.ps1
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
PowerShellCorpus/Github/ricardclau_packer-demos/provisioners/powershell/sysprep-ec2config.ps1
sysprep-ec2config.ps1
$EC2SettingsFile="C:\\Program Files\\Amazon\\Ec2ConfigService\\Settings\\Config.xml" $xml = [xml](get-content $EC2SettingsFile) $xmlElement = $xml.get_DocumentElement() $xmlElementToModify = $xmlElement.Plugins foreach ($element in $xmlElementToModify.Plugin) { if ($element.name -eq "Ec2SetPassword") {...
PowerShellCorpus/Github/octus83_qqq_fancylib/FancyLibrary/FancyLibrary/_CreateNewNuGetPackage/Config.ps1
Config.ps1
#========================================================== # Edit the variable values below to configure how your .nupkg file is packed (i.e. created) and pushed (i.e. uploaded) to the NuGet gallery. # # If you have modified this script: # - if you uninstall the "Create New NuGet Package From Project After Each Bu...
PowerShellCorpus/Github/octus83_qqq_fancylib/FancyLibrary/FancyLibrary/_CreateNewNuGetPackage/DoNotModify/UploadNuGetPackage.ps1
UploadNuGetPackage.ps1
#========================================================== # DO NOT EDIT THIS FILE. # If you want to configure how your package is uploaded, modify the Config.ps1 file. # To run this script from inside Visual Studio, right-click on the "RunMeToUploadNuGetPackage.cmd" file and choose "Run". #=======================...
PowerShellCorpus/Github/octus83_qqq_fancylib/FancyLibrary/FancyLibrary/_CreateNewNuGetPackage/DoNotModify/New-NuGetPackage.ps1
New-NuGetPackage.ps1
#Requires -Version 2.0 <# .SYNOPSIS Creates a NuGet Package (.nupkg) file from the given Project or NuSpec file, and optionally uploads it to a NuGet Gallery. .DESCRIPTION Creates a NuGet Package (.nupkg) file from the given Project or NuSpec file. Additional parameters may be provided to also upload the ...
PowerShellCorpus/Github/octus83_qqq_fancylib/FancyLibrary/FancyLibrary/_CreateNewNuGetPackage/DoNotModify/CreateNuGetPackage.ps1
CreateNuGetPackage.ps1
#========================================================== # DO NOT EDIT THIS FILE. # If you want to configure how your package is created, modify the Config.ps1 file. # # This script is ran automatically after every successful build. # This script creates a NuGet package for the current project, and places the ....
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_Provision_2017_4_25_9_58_28/.openpublishing.build.ps1
.openpublishing.build.ps1
param( [string]$buildCorePowershellUrl = "https://opbuildstorageprod.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 url: ...
PowerShellCorpus/Github/misterGF_leanKit-Powershell/get-kanbanSnapShot.ps1
get-kanbanSnapShot.ps1
#requires -version 2 <# This script is meant to download a snapshot of your kanban board from leankit. It uses web automation to login and navigate the site. Then clicks the link that generates the snapshot. Once clicked it requieres WASP to click on the "Save" button the IE presents. It saves it to your d...
PowerShellCorpus/Github/natnael-wubet_hash_cracker/hashcrack.ps1
hashcrack.ps1
[console]::Title = "HASH Cracker" while ($true) { function logo { clear Write-Host " _ _ __ ____ _ _ | |_| | _\ | __| |_| | | _ | \|__ | _ | |_| |_|_|\_\____|_| |_| CRACKER " -ForegroundColor Magenta } logo $hlist = Read-Host "Hash list" $wordlist = Read-Host "word list" logo "Crack...
PowerShellCorpus/Github/vjeek_microdata/Sources/VJeek.Microdata/_CreateNewNuGetPackage/Config.ps1
Config.ps1
#========================================================== # Edit the variable values below to configure how your .nupkg file is packed (i.e. created) and pushed (i.e. uploaded) to the NuGet gallery. # # If you have modified this script: # - if you uninstall the "Create New NuGet Package From Project After Each Bu...
PowerShellCorpus/Github/vjeek_microdata/Sources/VJeek.Microdata/_CreateNewNuGetPackage/DoNotModify/UploadNuGetPackage.ps1
UploadNuGetPackage.ps1
#========================================================== # DO NOT EDIT THIS FILE. # If you want to configure how your package is uploaded, modify the Config.ps1 file. # To run this script from inside Visual Studio, right-click on the "RunMeToUploadNuGetPackage.cmd" file and choose "Run". #=======================...
PowerShellCorpus/Github/vjeek_microdata/Sources/VJeek.Microdata/_CreateNewNuGetPackage/DoNotModify/New-NuGetPackage.ps1
New-NuGetPackage.ps1
#Requires -Version 2.0 <# .SYNOPSIS Creates a NuGet Package (.nupkg) file from the given Project or NuSpec file, and optionally uploads it to a NuGet Gallery. .DESCRIPTION Creates a NuGet Package (.nupkg) file from the given Project or NuSpec file. Additional parameters may be provided to also upload the ...
PowerShellCorpus/Github/vjeek_microdata/Sources/VJeek.Microdata/_CreateNewNuGetPackage/DoNotModify/CreateNuGetPackage.ps1
CreateNuGetPackage.ps1
#========================================================== # DO NOT EDIT THIS FILE. # If you want to configure how your package is created, modify the Config.ps1 file. # # This script is ran automatically after every successful build. # This script creates a NuGet package for the current project, and places the ....
PowerShellCorpus/Github/diggity-dan_task-runner/TaskRunner.ps1
TaskRunner.ps1
<# Help section. All scripts must accept LogFile parameter. All scripts must accept MyDirectory parameter. All scripts must accept ModuleDir parameter. #> [CmdletBinding()] Param ( [Parameter(Mandatory=$False)] [string]$ConfigFile = $null, [Parameter(Mandatory=$False)] [string]$ScriptDir = $nul...
PowerShellCorpus/Github/diggity-dan_task-runner/scripts/file_mover/file-mover.ps1
file-mover.ps1
<# Help Section #Add instructions for each script. #> [CmdletBinding()] Param ( [Parameter(Mandatory=$False)] [string]$MyDirectory = $null, [Parameter(Mandatory=$False)] [string]$ModuleDir = $null, [Parameter(Mandatory=$False)] [string]$LogFile = $null, [Parameter(Mandatory=$Fals...
PowerShellCorpus/Github/diggity-dan_task-runner/scripts/phone_home/phone-home.ps1
phone-home.ps1
 <# Help Section #Add instructions for each script. #> [CmdletBinding()] Param ( [Parameter(Mandatory=$False)] [string]$MyDirectory = $null, [Parameter(Mandatory=$False)] [string]$ModuleDir = $null, [Parameter(Mandatory=$False)] [string]$LogFile = $null, [Parameter(Mandatory=$Fal...
PowerShellCorpus/Github/diggity-dan_task-runner/scripts/query_runner/query-runner.ps1
query-runner.ps1
 <# Help Section #Add instructions for each script. #> [CmdletBinding()] Param ( [Parameter(Mandatory=$False)] [string]$MyDirectory = $null, [Parameter(Mandatory=$False)] [string]$ModuleDir = $null, [Parameter(Mandatory=$False)] [string]$LogFile = $null, [Parameter(Mandatory=$Fal...
PowerShellCorpus/Github/MicrosoftDocs_sysinternals/.openpublishing.build.ps1
.openpublishing.build.ps1
param( [string]$buildCorePowershellUrl = "https://opbuildstorageprod.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 url: ...
PowerShellCorpus/Github/Tadas_PSNamedPipes/Tests/NamedPipeClient.Tests.ps1
NamedPipeClient.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module "$here\..\PSNamedPipes.psm1" -Force Describe "NamedPipeClient" { It "New-NamedPipeClient returns a [NamedPipeClient]"{ $PipeName = "NamedPipeClient-Test-$((Get-Date).ToFileTime())" # We need to open a pipe server before we can create ...
PowerShellCorpus/Github/Tadas_PSNamedPipes/Tests/NamedPipeServer.Tests.ps1
NamedPipeServer.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module "$here\..\PSNamedPipes.psm1" -Force Describe "NamedPipeServer" { It "New-NamedPipeServer returns a [NamedPipeServer]" { $PipeName = "NamedPipeServer-Test-$((Get-Date).ToFileTime())" $a = New-NamedPipeServer $PipeName $a.Close() $a.G...
PowerShellCorpus/Github/gustavo-armenta_AzureServiceFabricContainers/ci.ps1
ci.ps1
Param( [string]$task, [string]$configuration, [string]$version ) $msbuild='C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\amd64\msbuild.exe' $xmlTransformLibrary='C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\Web\Micros...
PowerShellCorpus/Github/gustavo-armenta_AzureServiceFabricContainers/AzureResourceManagerTemplates/AzureResourceManagerTemplates/config/01_KeyVault/test-scus.ps1
test-scus.ps1
Login-AzureRmAccount . .\common.ps1 $ResourceGroupName = "test-scus" $ResourceGroupLocation = "southcentralus" Sql-AddKeyVaultSecrets -ResourceGroupName $ResourceGroupName -ResourceGroupLocation $ResourceGroupLocation Fabric-AddKeyVaultSecrets -ResourceGroupName $ResourceGroupName -ResourceGroupLocation $Resourc...
PowerShellCorpus/Github/gustavo-armenta_AzureServiceFabricContainers/AzureResourceManagerTemplates/AzureResourceManagerTemplates/config/01_KeyVault/common.ps1
common.ps1
function global:Sql-AddKeyVaultSecrets { param ( [parameter(Position = 0, Mandatory = $true)] [string] $ResourceGroupName, [parameter(Position = 1, Mandatory = $true)] [string] $ResourceGroupLocation ) $vaultName = "$ResourceGroupName-keyvault" $sqlName = "$ResourceGroupName-sql" $passwords = ...
PowerShellCorpus/Github/gustavo-armenta_AzureServiceFabricContainers/AzureResourceManagerTemplates/AzureResourceManagerTemplates/china/01_KeyVault/test-cnn.ps1
test-cnn.ps1
Login-AzureRmAccount -EnvironmentName AzureChinaCloud . .\common.ps1 $ResourceGroupName = "test-cnn" $ResourceGroupLocation = "chinanorth" Sql-AddKeyVaultSecrets -ResourceGroupName $ResourceGroupName -ResourceGroupLocation $ResourceGroupLocation Fabric-AddKeyVaultSecrets -ResourceGroupName $ResourceGroupName -Re...
PowerShellCorpus/Github/gustavo-armenta_AzureServiceFabricContainers/AzureResourceManagerTemplates/AzureResourceManagerTemplates/china/01_KeyVault/common.ps1
common.ps1
function global:Sql-AddKeyVaultSecrets { param ( [parameter(Position = 0, Mandatory = $true)] [string] $ResourceGroupName, [parameter(Position = 1, Mandatory = $true)] [string] $ResourceGroupLocation ) $vaultName = "$ResourceGroupName-keyvault" $sqlName = "$ResourceGroupName-sql" $passwords = ...
PowerShellCorpus/Github/gustavo-armenta_AzureServiceFabricContainers/FabricApps/ConsoleApp1/Scripts/Deploy-FabricApplication.ps1
Deploy-FabricApplication.ps1
<# .SYNOPSIS Deploys a Service Fabric application type to a cluster. .DESCRIPTION This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. .NOTES WARNING: This script file is invoked by Visual Studio. Its paramet...
PowerShellCorpus/Github/gustavo-armenta_AzureServiceFabricContainers/FabricApps/WebApplication1/Scripts/Deploy-FabricApplication.ps1
Deploy-FabricApplication.ps1
<# .SYNOPSIS Deploys a Service Fabric application type to a cluster. .DESCRIPTION This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. .NOTES WARNING: This script file is invoked by Visual Studio. Its paramet...
PowerShellCorpus/Github/joaorcarmona_check_wbls/check_wbls.ps1
check_wbls.ps1
#CheckNLBNodeStatus.ps1 # # Checks For NLB Node Status # # # Param( [Parameter( Mandatory=$True, Position=1)] [string]$computerName ) #Nagios ExitStatus $stateOK = 0 $stateWarning = 1 $stateCritical = 2 $stateUnknown = 3 #NLB Cluster Node Status $nlb_stopped = 1005 $nlb_convergin...
PowerShellCorpus/Github/Michel-Tremblay_Algonquin-College/Web Programming I/Lab 9 Web Forms/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/Michel-Tremblay_Algonquin-College/Web Programming I/Lab 9 Web Forms/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/Michel-Tremblay_Algonquin-College/Web Programming I/Lab8 Web Forms/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/Michel-Tremblay_Algonquin-College/Web Programming I/Lab8 Web Forms/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/Michel-Tremblay_Algonquin-College/Web Programming I/Lab 10 Web Forms/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/Michel-Tremblay_Algonquin-College/Web Programming I/Lab 10 Web Forms/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/Michel-Tremblay_Algonquin-College/Web Programming I/Lab7.1 Web Forms/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/Michel-Tremblay_Algonquin-College/Web Programming I/Lab7.1 Web Forms/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/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 9 Web Service/RestaurantReviewService/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/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/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 9 Web Service/RestaurantReviewService/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/tools/install.ps1
install.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' $projectRoot = $project.Properties.Item('FullPath').Value $binDirectory...
PowerShellCorpus/Github/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 5/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/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 5/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/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 5/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/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 5/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/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 5/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/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 5/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/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 5/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/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 5/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/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 5/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) if ($project.Type -eq 'Web Site') { Import-Module (Join-Path $toolsPath VS.psd1) $srcFiles = Join-Path $installPath "lib\net40\*.dll" $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $destDirec...
PowerShellCorpus/Github/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 5/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Uninstall.ps1
Uninstall.ps1
param($installPath, $toolsPath, $package, $project) if ($project.Type -eq 'Web Site') { Import-Module (Join-Path $toolsPath VS.psd1) $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $binDirectory = Join-Path $projectRoot "bin" $srcDirectory = Join-Path $...
PowerShellCorpus/Github/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 5/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/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab10.1/packages/Newtonsoft.Json.9.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/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab10.1/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) if ($project.Type -eq 'Web Site') { Import-Module (Join-Path $toolsPath VS.psd1) $srcFiles = Join-Path $installPath "lib\net40\*.dll" $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $destDirec...
PowerShellCorpus/Github/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab10.1/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Uninstall.ps1
Uninstall.ps1
param($installPath, $toolsPath, $package, $project) if ($project.Type -eq 'Web Site') { Import-Module (Join-Path $toolsPath VS.psd1) $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $binDirectory = Join-Path $projectRoot "bin" $srcDirectory = Join-Path $...
PowerShellCorpus/Github/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab10.1/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/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/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab10.1/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/tools/install.ps1
install.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' $projectRoot = $project.Properties.Item('FullPath').Value $binDirectory...
PowerShellCorpus/Github/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 4/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/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 4/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/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 4/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/Michel-Tremblay_Algonquin-College/Web Programming languages II/Lab 4/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