full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/manuaraya_HPChallenge/RPCGamePlay/packages/jQuery.UI.Combined.1.8.24/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Update the _references.js file Remove-Reference $scriptsFolderProjectItem $juiFileNameRegEx
PowerShellCorpus/Github/manuaraya_HPChallenge/RPCGamePlay/packages/jQuery.UI.Combined.1.8.24/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 $juiFileNameRegEx ...
PowerShellCorpus/Github/manuaraya_HPChallenge/RPCGamePlay/packages/jQuery.UI.Combined.1.8.24/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/manuaraya_HPChallenge/RPCGamePlay/packages/jQuery.1.8.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/manuaraya_HPChallenge/RPCGamePlay/packages/jQuery.1.8.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/manuaraya_HPChallenge/RPCGamePlay/packages/jQuery.1.8.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/CXuesong_HalfMoon.Endpoint/HalfMoon.Endpoint.AspNetCore/Properties/PublishProfiles/Redist-publish.ps1
Redist-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'] = '75567695-63a1-454...
PowerShellCorpus/Github/CXuesong_HalfMoon.Endpoint/HalfMoon.Endpoint.AspNetCore/Properties/PublishProfiles/RedistDebug-publish.ps1
RedistDebug-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'] = '75567695-63a1-454...
PowerShellCorpus/Github/infecticide_MDT-Scripts/disable_netbios.ps1
disable_netbios.ps1
Start-Transcript C:\windows\debug\disable_netbios.log $base_key = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NetBT\Parameters\Interfaces" $subkeys = Get-ChildItem -Path Registry::$base_key foreach($subkey in $subkeys) { write-host $subkey Remove-ItemProperty -Path "Registry::$subkey" -Name "Netb...
PowerShellCorpus/Github/infecticide_MDT-Scripts/set_syn_attack_protect.ps1
set_syn_attack_protect.ps1
Start-Transcript C:\windows\debug\enable_syn_attack_protection.log $base_key = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" $property = "SynAttackProtect" $property_type = "DWord" $property_value = "1" # Does key exist? If not, create it. if(test-path Registry::$base_key) { # Ke...
PowerShellCorpus/Github/infecticide_MDT-Scripts/install_vmware_tools.ps1
install_vmware_tools.ps1
Start-Transcript -Path c:\windows\debug\install_vmware_tools.log Start-Process -Wait "\\server\MDT_Deployment\Applications\VMWare Tools\setup.exe" -ArgumentList '/S /v "/qn /l*v ""C:\Windows\Debug\VMWare_Tools.log"" REBOOT=R ADDLOCAL=ALL' if($? -ne $TRUE) {exit 1} ELSE {exit 0} Stop-Transcript
PowerShellCorpus/Github/infecticide_MDT-Scripts/disable_autorun.ps1
disable_autorun.ps1
Start-Transcript C:\windows\debug\disable_autorun.log $base_key = "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" $property = "NoDriveTypeAutoRun" $property_type = "DWord" $property_value = "255" # Does key exist? If not, create it. if(test-path Registry::$base_key) { # Ke...
PowerShellCorpus/Github/infecticide_MDT-Scripts/install_Powershell4_2008_64.ps1
install_Powershell4_2008_64.ps1
Start-Transcript c:\windows\debug\install_powershell_v4.log Copy-Item "\\server\MDT_Deployment\Applications\Powershell 4\Windows Server 2008 x64\Windows6.1-KB2819745-x64-MultiPkg.msu" "$ENV:TEMP" Set-Location $ENV:TEMP Start-Process c:\windows\system32\WUSA.exe -ArgumentList "Windows6.1-KB2819745-x64-MultiPkg.msu /q...
PowerShellCorpus/Github/infecticide_MDT-Scripts/get-activationstatus.ps1
get-activationstatus.ps1
function Get-ActivationStatus { [CmdletBinding()] param( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [string]$DNSHostName = $Env:COMPUTERNAME ) process { try { $wpa = Get-WmiObject SoftwareLicensingProduct -ComputerName $DNSHost...
PowerShellCorpus/Github/infecticide_MDT-Scripts/set_startup_delay.ps1
set_startup_delay.ps1
Start-Transcript c:\windows\debug\set_startup_delay.log bcdedit /timeout 10 Stop-Transcript
PowerShellCorpus/Github/infecticide_MDT-Scripts/activate_windows2008.ps1
activate_windows2008.ps1
Start-Transcript c:\windows\debug\activate_windows.log # Activate cscript c:\windows\system32\slmgr.vbs /ato if($? -ne $TRUE) {write-host "SLMGR Failed to activate Windows"} # Verify function Get-ActivationStatus { [CmdletBinding()] param( [Parameter(ValueFromPipeline = $true, ValueFromPipelineB...
PowerShellCorpus/Github/infecticide_MDT-Scripts/disable_ipv6.ps1
disable_ipv6.ps1
Start-Transcript C:\windows\debug\disable_ipv6.log $base_key = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" $property = "DisabledComponents" $property_type = "DWord" $property_value = "-1" # Does key exist? If not, create it. if(test-path Registry::$base_key) { # Key exists, ch...
PowerShellCorpus/Github/infecticide_MDT-Scripts/set_audit_policy.ps1
set_audit_policy.ps1
Start-Transcript c:\windows\debug\set_audit_policy.log $base_key = "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\LSA" $property = "SCENoApplyLegacyAuditPolicy" $property_type = "DWord" $property_value = "1" # Does key exist? If not, create it. if(test-path Registry::$base_key) { # Key exists, chec...
PowerShellCorpus/Github/infecticide_MDT-Scripts/disable_windows_firewall_2008.ps1
disable_windows_firewall_2008.ps1
Start-Transcript -Path "C:\Windows\Debug\disable_windows_firewall.log" Start-Process netsh -ArgumentList "advfirewall set allprofiles state off" -Wait | Out-Default if($? -ne $TRUE) {exit 1} ELSE {exit 0} Stop-Transcript
PowerShellCorpus/Github/infecticide_MDT-Scripts/install_Powershell4_2012_64.ps1
install_Powershell4_2012_64.ps1
Start-Transcript c:\windows\debug\install_powershell_v4.log Copy-Item "\\server\MDT_Deployment\Applications\Powershell 4\Windows Server 2012 x64\Windows8-RT-KB2799888-x64.msu" "$ENV:TEMP" Set-Location $ENV:TEMP Start-Process c:\windows\system32\WUSA.exe -ArgumentList "Windows8-RT-KB2799888-x64.msu /quiet /norestart"...
PowerShellCorpus/Github/infecticide_MDT-Scripts/disable_uac.ps1
disable_uac.ps1
Start-Transcript c:\windows\debug\disable_uac.log $base_key = "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System" $property = "EnableLUA" $property_type = "DWord" $property_value = "0" # Does key exist? If not, create it. if(test-path Registry::$base_key) { # Key exists, check f...
PowerShellCorpus/Github/infecticide_MDT-Scripts/disable_windows_update.ps1
disable_windows_update.ps1
Start-Transcript C:\windows\debug\disable_windows_update.log $base_key = "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" $property = "NoAutoUpdate" $property_type = "String" $property_value = "1" # Does key exist? If not, create it. if(test-path "Registry::$base_key") { # Key exi...
PowerShellCorpus/Github/infecticide_MDT-Scripts/set_swap_size.ps1
set_swap_size.ps1
Start-Transcript -Path "C:\Windows\Debug\set_swap_size.log" # Determine memory installed $ram = Get-WmiObject Win32_OperatingSystem | select TotalVisibleMemorySize $ram = ($ram.TotalVisibleMemorySize / 1kb).tostring("F00") [int]$ram = $ram # Determine swap size if($ram -lt 8192) { $mem = $ram * 1.5 } ELSE { ...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_NewRepo_2017_4_11_8_5_18/.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/shashank69_Microsoft-CFD-2016/Code Fun Do 2016/UWP/UWP_SETUP/FaceFinder_1.0.5.0_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/shashank69_Microsoft-CFD-2016/Code Fun Do 2016/WPF/WpfApplication4/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/MaxSpirihin_6-semester/BDClient/DB_Loader/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/MaxSpirihin_6-semester/BDClient/DB_Loader/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/jmensel_LittleTools/EventLogPuller.ps1
EventLogPuller.ps1
# EventLogPuller # John Mensel # jmensel@gmail.com # This is a simple script designed to quickly pull # errors out of Windows Event Logs for fast, efficient review. $logdir = 'c:\EventLogs_Temp\' $date = get-Date $today=$date.Day $filename="$logdir\EventLog-${today}.txt" # Make sure that we've got a place ...
PowerShellCorpus/Github/jmensel_LittleTools/execSQLBackup/execSQLBackup.ps1
execSQLBackup.ps1
##################################################### # Backup SQL instances to a central network share # v.1.3 # PLEASE read the README file and change the variables # in settings.ps1 before implementing this script! ##################################################### # Joh...
PowerShellCorpus/Github/jmensel_LittleTools/execSQLBackup/settings-example.ps1
settings-example.ps1
# settings.conf ################################# # Variables that need changing # ################################# # Destination Folder for your Backups: # Don't change this lightly. If this is a UNC path, every SQL service account # has to have access to this folder. See the README for full details. # Do...
PowerShellCorpus/Github/jmensel_LittleTools/HowtoDocs/GetInventory.ps1
GetInventory.ps1
# Created: 4.11.2013 # Original Author : Peter Stone # Revised by John Mensel, to include authentication and active directory integration ######################################################################################################### Function WMILookup{ } Function WMILookupCred { # GET THE DATE/T...
PowerShellCorpus/Github/OPSTest_E2E_Provision_1486087595979/.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/gjensen1_VMware-AnnotationScripts/ApplyAnnotations.ps1
ApplyAnnotations.ps1
# ******************************************************************************************************************* # ******************************************************************************************************************* # Purpose of Script: # Helps with the migration of VMware Hosts from one vCent...
PowerShellCorpus/Github/gjensen1_VMware-AnnotationScripts/GatherAnnotations.ps1
GatherAnnotations.ps1
# ******************************************************************************************************************* # ******************************************************************************************************************* # Purpose of Script: # Helps with the migration of VMware Hosts from one vCent...
PowerShellCorpus/Github/month13_newProj/LogChecker_v2.ps1
LogChecker_v2.ps1
#$compIp = (Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter 'ipenabled = "true"').IPAddress $compIp = (Get-WmiObject -Class Win32_ComputerSystem -Property Name).Name $logFileName = "log-" + [String](Get-Date -format yyyyMMdd) + ".log" #$paths = "c:\apiLogs\test.log", "c:\apiLogs2\test.log" Try { ...
PowerShellCorpus/Github/month13_newProj/LogChecker.ps1
LogChecker.ps1
$compIp = (Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter 'ipenabled = "true"').IPAddress $paths = "c:\apiLogs\test.log", "c:\apiLogs2\test.log" foreach ($path in $paths) { $readLog = Get-Content -path $path $message = $message + ("`n") + $path foreach ($read in $readLog) { if ($read ...
PowerShellCorpus/Github/month13_newProj/service_restarter_with_logs.ps1
service_restarter_with_logs.ps1
try { restart-service WAS -PassThru -force -ErrorAction Stop restart-service W3SVC -PassThru -ErrorAction Stop write-host "Done!" "$(Get-Date -uformat ‘%D %T’) IIS-Server was restarted" | Out-File C:\test\IIS_restart_log.log -append } catch{ "$(Get-Date -uformat ‘%D %T’) IIS-Server restart error!!!" | Out-File ...
PowerShellCorpus/Github/ikenami_Bookstore-Database/VendaDeLivros/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/ikenami_Bookstore-Database/VendaDeLivros/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/dlwyatt_RefactoringPowerShellWithPester/StringTokens.Tests.ps1
StringTokens.Tests.ps1
Remove-Module StringTokens -Force -ErrorAction SilentlyContinue $scriptRoot = Split-Path -Path $MyInvocation.MyCommand.Path Import-Module $scriptRoot\StringTokens.psm1 -Force -ErrorAction Stop function Assert-ArraysAreEqual { param ( [object[]] $First, [object[]] $Second, [script...
PowerShellCorpus/Github/OPS-E2E-Prod_E2E_P_D_NewRepo_2017_5_25_16_34_13/.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/gcarrarom_Windows10/CalendarAppointment/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/wp8/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module Add-ApplicationInsights $project; Remove-Module Microsoft.ApplicationInsights; # SIG # Begin signature block # MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ...
PowerShellCorpus/Github/gcarrarom_Windows10/CalendarAppointment/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/win81/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module Add-ApplicationInsights $project; Remove-Module Microsoft.ApplicationInsights; # SIG # Begin signature block # MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ...
PowerShellCorpus/Github/gcarrarom_Windows10/CalendarAppointment/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/wpa81/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module Add-ApplicationInsights $project; Remove-Module Microsoft.ApplicationInsights; # SIG # Begin signature block # MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ...
PowerShellCorpus/Github/gcarrarom_Windows10/CalendarAppointment/packages/Microsoft.ApplicationInsights.0.14.3-build00177/tools/net40/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Checking if Path exists because the websites don't have a project file if ([System.IO.File]::Exists($project.FullName)) { # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, Pu...
PowerShellCorpus/Github/gcarrarom_Windows10/CalendarAppointment/packages/Microsoft.ApplicationInsights.0.14.3-build00177/tools/net40/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # Checking if Path exists because the websites don't have a project file if ([System.IO.File]::Exists($project.FullName)) { # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, Publ...
PowerShellCorpus/Github/gcarrarom_Windows10/InkCanvasSample/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/wp8/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module Add-ApplicationInsights $project; Remove-Module Microsoft.ApplicationInsights; # SIG # Begin signature block # MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ...
PowerShellCorpus/Github/gcarrarom_Windows10/InkCanvasSample/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/win81/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module Add-ApplicationInsights $project; Remove-Module Microsoft.ApplicationInsights; # SIG # Begin signature block # MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ...
PowerShellCorpus/Github/gcarrarom_Windows10/InkCanvasSample/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/wpa81/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module Add-ApplicationInsights $project; Remove-Module Microsoft.ApplicationInsights; # SIG # Begin signature block # MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ...
PowerShellCorpus/Github/gcarrarom_Windows10/InkCanvasSample/packages/Microsoft.ApplicationInsights.0.14.3-build00177/tools/net40/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Checking if Path exists because the websites don't have a project file if ([System.IO.File]::Exists($project.FullName)) { # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, Pu...
PowerShellCorpus/Github/gcarrarom_Windows10/InkCanvasSample/packages/Microsoft.ApplicationInsights.0.14.3-build00177/tools/net40/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # Checking if Path exists because the websites don't have a project file if ([System.IO.File]::Exists($project.FullName)) { # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, Publ...
PowerShellCorpus/Github/gcarrarom_Windows10/InkingTest/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/wp8/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module Add-ApplicationInsights $project; Remove-Module Microsoft.ApplicationInsights; # SIG # Begin signature block # MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ...
PowerShellCorpus/Github/gcarrarom_Windows10/InkingTest/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/win81/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module Add-ApplicationInsights $project; Remove-Module Microsoft.ApplicationInsights; # SIG # Begin signature block # MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ...
PowerShellCorpus/Github/gcarrarom_Windows10/InkingTest/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/wpa81/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module Add-ApplicationInsights $project; Remove-Module Microsoft.ApplicationInsights; # SIG # Begin signature block # MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ...
PowerShellCorpus/Github/gcarrarom_Windows10/InkingTest/packages/Microsoft.ApplicationInsights.0.14.3-build00177/tools/net40/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Checking if Path exists because the websites don't have a project file if ([System.IO.File]::Exists($project.FullName)) { # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, Pu...
PowerShellCorpus/Github/gcarrarom_Windows10/InkingTest/packages/Microsoft.ApplicationInsights.0.14.3-build00177/tools/net40/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # Checking if Path exists because the websites don't have a project file if ([System.IO.File]::Exists($project.FullName)) { # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, Publ...
PowerShellCorpus/Github/OPSTest_E2E_NewRepo_1489064737788/.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/OPS-E2E-PPE_E2E_Provision_2017_4_11_26_5_18/.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/peter-murray_win_ec2_get_tags/library/win_ec2_get_tags.ps1
win_ec2_get_tags.ps1
#!powershell # # WANT_JSON # POWERSHELL_COMMON $AWS_REGIONS = ('ap-northeast-1', 'ap-southeast-1', 'ap-southeast-2', 'eu-central-1', 'eu-west-1', 'eu-west-2', 'sa-east-1', 'us-east-1', ...
PowerShellCorpus/Github/256QAM_Powershell-Invoke-PartyTime/Invoke-PartyTime.ps1
Invoke-PartyTime.ps1
Function Invoke-PartyTime { param ( [Parameter(ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] [string[]]$PartyPeople = ($Env:COMPUTERNAME), [int]$HowLongToParty = -1, [System.Management.Automation.PSCredential]$SecretCode ) begin { [scriptblock]$ScriptBlock = { param($time...
PowerShellCorpus/Github/OPSTestPPE_E2E_Provision_1490324690992/.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/lugmuer_skyapi/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/lugmuer_skyapi/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/lugmuer_skyapi/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/lugmuer_skyapi/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/lugmuer_skyapi/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/lugmuer_skyapi/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/lugmuer_skyapi/packages/EntityFramework.6.1.1/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/lugmuer_skyapi/packages/EntityFramework.6.1.1/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/lugmuer_skyapi/packages/Newtonsoft.Json.6.0.3/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/lugmuer_skyapi/PublishScripts/Publish-WebApplicationWebsite.ps1
Publish-WebApplicationWebsite.ps1
#Requires -Version 3.0 <# .SYNOPSIS Creates and deploys a Microsoft Azure Web Site for a Visual Studio web project. For more detailed documentation go to: http://go.microsoft.com/fwlink/?LinkID=394471 .EXAMPLE PS C:\> .\Publish-WebApplicationWebSite.ps1 ` -Configuration .\Configurations\WebApplication1-WAWS...
PowerShellCorpus/Github/OPS-E2E-Prod_E2E_P_Provision_2017_4_1_9_55_58/.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/alexrae83_sevtbot/setup_and_install/new_bot_cleanup.ps1
new_bot_cleanup.ps1
# Retrieving User Information $GITHUBUSER = Read-Host -Prompt "What is your GitHub Username?" Write-Output "" Write-Output "** If you have 2 Factor Auth configured, " Write-Output " provide a Personal Access Token with repo and delete_repo access." Write-Output " Tokens can be generated at https://github.com/s...
PowerShellCorpus/Github/alexrae83_sevtbot/setup_and_install/bot_install_sandbox.ps1
bot_install_sandbox.ps1
# Ignore SSL Certificate Errors add-type @" using System.Net; using System.Security.Cryptography.X509Certificates; public class TrustAllCertsPolicy : ICertificatePolicy { public bool CheckValidationResult( ServicePoint srvPoint, X509Certificate certificate, WebRequest ...
PowerShellCorpus/Github/alexrae83_sevtbot/setup_and_install/new_bot_setup.ps1
new_bot_setup.ps1
# Retrieving User Information $GITHUBUSER = Read-Host -Prompt "What is your GitHub Username?" Write-Output "" Write-Output "** If you have 2 Factor Auth configured, " Write-Output " provide a Personal Access Token with repo and delete_repo access." Write-Output " Tokens can be generated at https://github.com/s...
PowerShellCorpus/Github/alexrae83_sevtbot/setup_and_install/bot_config.ps1
bot_config.ps1
# Ignore SSL Certificate Errors add-type @" using System.Net; using System.Security.Cryptography.X509Certificates; public class TrustAllCertsPolicy : ICertificatePolicy { public bool CheckValidationResult( ServicePoint srvPoint, X509Certificate certificate, WebRequest ...
PowerShellCorpus/Github/alexrae83_sevtbot/setup_and_install/bot_uninstall_sandbox.ps1
bot_uninstall_sandbox.ps1
# Ignore SSL Certificate Errors add-type @" using System.Net; using System.Security.Cryptography.X509Certificates; public class TrustAllCertsPolicy : ICertificatePolicy { public bool CheckValidationResult( ServicePoint srvPoint, X509Certificate certificate, WebRequest ...
PowerShellCorpus/Github/aidanbirky_Terrible-Scripts/InternetExploder.ps1
InternetExploder.ps1
$banner = " NO MORE INTERNET EXPLODER" $loop = "True" while ($loop){ clear $banner $menu1 = read-host `n "CAUTION! This script creates a joke shortcut on the Desktop of the current user and then downloads and installs the browser of your choice. Press [Y] to continue or [N] to quit " $menu...
PowerShellCorpus/Github/aidanbirky_Terrible-Scripts/LocalHostReport.ps1
LocalHostReport.ps1
#Title: LocalHost HTML Report Generator #Description: This script generates a simple HTML report on the local system. #Description: It creates a zip file containing the report in the users home directory. #Description: For best results, run as administrator clear $ScriptUser = Read-Host -Prompt 'Enter your name ...
PowerShellCorpus/Github/fmad_one-shell-rule-all/Common.ps1
Common.ps1
# Last changed: fmadruga, 2017/01/29 - 04:00 # Connect to online and on-prem services function Save-EncriptedCredentials { param ( [string] [Parameter(Mandatory=$true)] $UserPrincipalName, [string] $FileName = $("$UserPrincipalName.txt" -replace '\\','#') ) $Credential = Get-Cred...
PowerShellCorpus/Github/kimizhu_sfkjsfaikjhfisa/.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/WCOMAB_Swenug20150122/build.ps1
build.ps1
Param( [string]$Script = "build.cake", [string]$Target = "Default", [string]$Configuration = "Release", [string]$Verbosity = "Verbose" ) $TOOLS_DIR = Join-Path $PSScriptRoot "tools" $NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe" $CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe" $PACKAGES_CONFIG...
PowerShellCorpus/Github/hpcloud_cf-dotnet-builder-buildpack/iishwc/start.ps1
start.ps1
$script:scriptPath = Join-Path $env:HOME iishwc $script:appPoolName = [Guid]::NewGuid().ToString() $script:appPort = $Env:PORT $script:appPath = (get-item $script:scriptPath).parent.FullName $script:logsDir = Join-Path $env:HOMEPATH logs $script:exitCode = 0 function DetectBitness() { Write-Host("Detectin...
PowerShellCorpus/Github/hpcloud_cf-dotnet-builder-buildpack/iishwc/detectVersion.ps1
detectVersion.ps1
$script:scriptPath = Join-Path $env:HOME iishwc $script:appPath = (get-item $script:scriptPath).parent.FullName $applicationHostPath = Join-Path $script:scriptPath 'applicationHost.config' $webConfig = New-Object System.Xml.XmlDocument $webConfig.Load($applicationHostPath) $val = $webConfig.SelectSingleNode("/co...
PowerShellCorpus/Github/hpcloud_cf-dotnet-builder-buildpack/bin/compile.ps1
compile.ps1
write-output "Started Compilation Script"; $build_path = $args[0] $cache_path = $args[1] $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition $iisPath = Join-Path (get-item $scriptPath ).parent.FullName 'iishwc\*' $nugetPath = Join-Path $scriptPath 'nuget.exe' $msbuild = Join-Path ([System.Runtim...
PowerShellCorpus/Github/hpcloud_cf-dotnet-builder-buildpack/bin/release.ps1
release.ps1
@" --- default_process_type: web: iishwc\start.bat "@
PowerShellCorpus/Github/hpcloud_cf-dotnet-builder-buildpack/bin/detect.ps1
detect.ps1
$path = $args[0] $files = @(Get-ChildItem $path -Name) $solutionFile = Get-ChildItem (Join-Path $path '*.sln') IF (($files -contains "web.config") -or ($solutionFile -ne $null)) { Write-Output "IIS8-Builder" exit 0 } ELSE { exit 1 }
PowerShellCorpus/Github/slidest_SatMobile-Prerequis/SatMobile-Prerequis/Install_Prerequisite.ps1
Install_Prerequisite.ps1
########################################################################## #Name : Install_Prerequisite.ps1 # #Description : Install Saturne Mobile requirements on Windows # #Note : variables are defined in Variables.ps1 file ...
PowerShellCorpus/Github/SteveLasker_WinDotFiles/Microsoft.PowerShell_profile.ps1
Microsoft.PowerShell_profile.ps1
# Save to: %userprofile%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 function prompt { $host.UI.RawUI.WindowTitle = Get-Location Write-Host ("PS>") -nonewline -foregroundcolor Green -backgroundcolor Black return " " } function Docker_rm_all { docker rm -f /$(docker ps -a -q) ...
PowerShellCorpus/Github/gnschenker_ES-workshop/default.ps1
default.ps1
properties{ $projectName = "Iteration0" $config = if($useConfig){$useConfig} else {"Debug"}; $baseDir = Resolve-Path .\ $srcDir = "$baseDir\src" $buildDir = "$baseDir\build\" $packagesDir = "$buildDir\$config\" $slnFile = "$baseDir\src\IterationZero.sln" $testDir = "$buildDir\test" $testCopyI...
PowerShellCorpus/Github/gnschenker_ES-workshop/src/packages/PostSharp.4.1.13/tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) $targetsFile = [System.IO.Path]::Combine($toolsPath, 'PostSharp.targets') # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' # Grab the loaded MS...
PowerShellCorpus/Github/gnschenker_ES-workshop/src/packages/PostSharp.4.1.13/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) function PathToUri([string] $path) { return new-object Uri('file://' + $path.Replace("%","%25").Replace("#","%23").Replace("$","%24").Replace("+","%2B").Replace(",","%2C").Replace("=","%3D").Replace("@","%40").Replace("~","%7E").Replace("^","%5E")) } fu...
PowerShellCorpus/Github/gnschenker_ES-workshop/src/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/gnschenker_ES-workshop/src/packages/OctoPack.3.0.42/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) # This is the MSBuild targets file to add $targetsFile = [System.IO.Path]::Combine($toolsPath, $package.Id + '.targets') # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=ne...
PowerShellCorpus/Github/gnschenker_ES-workshop/src/packages/OctoPack.3.0.42/tools/Uninstall.ps1
Uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' # Grab the loaded MSBuild project for the project $msbuild = [Microsoft.Build.Evaluatio...
PowerShellCorpus/Github/gnschenker_ES-workshop/psake/NuGetPackageBuilder.ps1
NuGetPackageBuilder.ps1
$scriptpath = $MyInvocation.MyCommand.Path $dir = Split-Path $scriptpath $destDir = "$dir\bin" if (Test-Path $destDir -PathType container) { Remove-Item $destDir -Recurse -Force } Copy-Item -Recurse $dir\nuget $destDir Copy-Item -Recurse $dir\en-US $destDir\tools\en-US Copy-Item -Recurse $dir\examples $de...
PowerShellCorpus/Github/gnschenker_ES-workshop/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 $config.modul...
PowerShellCorpus/Github/gnschenker_ES-workshop/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/gnschenker_ES-workshop/psake/psake.ps1
psake.ps1
# Helper script for those who want to run psake without importing the module. # Example run from PowerShell: # .\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)...