full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/nadiushkaNA_Labs_Web_Service/Lab2/WebApplication/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/nadiushkaNA_Labs_Web_Service/Lab2/WebApplication/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/mthomps4_ASPForms/src/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/mthomps4_ASPForms/src/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/mthomps4_ASPForms/src/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/mthomps4_ASPForms/src/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/mthomps4_ASPForms/src/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/mthomps4_ASPForms/src/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/mthomps4_ASPForms/src/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/mthomps4_ASPForms/src/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/StefanJanssen95_handytools/docker/powershell/start.ps1
start.ps1
Set-Location $PSScriptRoot [xml]$Config = Get-Content "config.xml" Set-Location ($Config.Settings.DockerComposeLocation) $Containers = $Config.Settings.Containers.Container | ForEach-Object { $_ } # Write-Output "Starting containers"; docker-compose up -d $Containers Set-Location $PSScriptRoot Set-Lo...
PowerShellCorpus/Github/StefanJanssen95_handytools/docker/powershell/ssh.ps1
ssh.ps1
Set-Location $PSScriptRoot Import-Module .\Modules\ConvertFromDocker.psm1 [xml]$Config = Get-Content "config.xml" $workspaceImage = $Config.Settings.ContainerPrefix + "_workspace" docker ps | ConvertFrom-Docker | ForEach-Object{ if( $_.Image -eq $workspaceImage ) { $workspaceId = $_.ContainerI...
PowerShellCorpus/Github/StefanJanssen95_handytools/docker/powershell/stop.ps1
stop.ps1
Set-Location $PSScriptRoot [xml]$Config = Get-Content "config.xml" Set-Location ($Config.Settings.DockerComposeLocation) Write-Output "Stopping containers"; docker-compose stop Set-Location $PSScriptRoot Set-Location $Config.Settings.AfterDoneLocation
PowerShellCorpus/Github/enderandpeter_win-a2enmod/a2enmod.ps1
a2enmod.ps1
[CmdletBinding()] Param( [Parameter(Position=1)] [string]$mod, [Parameter(Position=2)] [string]$search, [switch]$copy, [switch]$add, [switch]$norestart, [switch]$replace ) # Halt on all errors by default $ErrorActionPreference = "stop" # Find out which command was called...
PowerShellCorpus/Github/Beej126_PoShDualExplorers/FontAwesome.ps1
FontAwesome.ps1
#if (!(Test-Path $PSScriptRoot\FontAwesome.dll)) { Add-Type <#-OutputAssembly $PSScriptRoot\FontAwesome.dll#> -ReferencedAssemblies @("System.Drawing", "System.Windows.Forms") -TypeDefinition @" //from here: https://github.com/microvb/FontAwesome-For-WinForms-CSharp using System.Drawing; using System.Drawing.Text;...
PowerShellCorpus/Github/Beej126_PoShDualExplorers/PoshDualExplorers.ps1
PoshDualExplorers.ps1
####################################################################################### # WinForm with a SplitContainer to host 2 Windows File Explorers # System.Windows.Forms.SplitContainer is a simple dual panel controller with a draggable splitter in the middle - how convenient! ################################...
PowerShellCorpus/Github/Beej126_PoShDualExplorers/PoshDualExplorers old, with tabs.ps1
PoshDualExplorers old, with tabs.ps1
####################################################################################### # WinForm with a SplitContainer to host 2 Windows File Explorers # System.Windows.Forms.SplitContainer is a simple dual panel controller with a draggable splitter in the middle - how convenient! ################################...
PowerShellCorpus/Github/Beej126_PoShDualExplorers/Win32.ps1
Win32.ps1
#save the compiled Win32 exports wrapper to see if we can spin up faster... in my testing it didn't seem to make a difference if (Test-path $PSScriptRoot\Win32.dll) { Add-Type -path $PSScriptRoot\Win32.dll } else { Add-Type -OutputAssembly $PSScriptRoot\Win32.dll -TypeDefinition @" using System; using System.Run...
PowerShellCorpus/Github/Beej126_PoShDualExplorers/tester.ps1
tester.ps1
Add-Type -AssemblyName System.Windows.Forms [System.Windows.Forms.Application]::EnableVisualStyles() & $PSScriptRoot\FontAwesome.ps1 # handy wrapper for FontAwesome as a .Net class, from here: https://github.com/microvb/FontAwesome-For-WinForms-CSharp <# function createButton { param( [string]$toolTipText, [st...
PowerShellCorpus/Github/kylezjones_CRMTEST/Online.ps1
Online.ps1
######################################################### # Powershell Script to bring servers online # Author: Kyle Jones # Modification History: ### 09/05/2014 - script created ### 09/12/2014 - kzj changed exit codes for errors and made APP_POOL an array with looping logic ### 05/28/2015 - kzj change key on v...
PowerShellCorpus/Github/chriscla_SplunkBlack/appserver/SplunkBlack/addons/TA-SplunkBlack/bin/powershell/Microsoft-Windows-Sysmon-Operational.ps1
Microsoft-Windows-Sysmon-Operational.ps1
param( [string]$positionFileName = "splunk.log", [string]$logName = "Application", [int]$numEventsToRead = 1000 ) $output = "" # holds the output of a single event $splunk_output = "" # holds the output of all events #$positionFilePath = Join-Path -Path $env:SPLUNK_HOME "etc\apps\TA...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_Provision_2017_4_26_16_5_17/.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/Vidanez_DeployVMs/DeployVMusing_VSC.ps1
DeployVMusing_VSC.ps1
<#'----------------------------------------------------------------------------- 'Script Name : redeploy.ps1 'Author : Matthew Beattie 'Email : mbeattie@netapp.com 'Created : 17/12/13 'Description : This script invokes the "redeployVMs" method of the VSC API. ' : It redeploys all virtual...
PowerShellCorpus/Github/Vidanez_DeployVMs/DeployVM.ps1
DeployVM.ps1
<# .SYNOPSIS Deploy Multiple VMs to vCenter .DESCRIPTION VMs are deployed asynchronously based on a pre-configured csv file (DeployVM.csv) Designed to run from Powershell ISE .PARAMETER csvfile Path to DeployVM.csv file with new VM info .PARAMETER vCenter vCenter Server FQDN or IP .PARAMETER auto Wil...
PowerShellCorpus/Github/hobelinm_PSModuleRegister/RegisterModule.ps1
RegisterModule.ps1
<# .SYNOPSIS Registers a PowerShell module in the user's PS Module Path .DESCRIPTION Registers a PowerShell module in the user's PS Module path under $Home\Documents\WindowsPowerShell\Modules by creating a symbolic link to the actual location of the module manifest. Symbolic link name is the name of the modul...
PowerShellCorpus/Github/ksagala_set-allvdirs/set-allvdirs.ps1
set-allvdirs.ps1
# # # Script to allow you to set all virtual directories to a common name like mail.company.com # # Based on script published by Nathan Winters on his blog # http://nathanwinters.co.uk/2010/05/30/script-to-set-internalurl-and-externalurl-for-all-exchange-2010-virtual-directories/ # # Sources mentioned by Nathan...
PowerShellCorpus/Github/DQC-Comics_Orderform/DQC.Comics.OrderForm/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/DQC-Comics_Orderform/DQC.Comics.OrderForm/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/DQC-Comics_Orderform/DQC.Comics.OrderForm/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/DQC-Comics_Orderform/DQC.Comics.OrderForm/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/DQC-Comics_Orderform/DQC.Comics.OrderForm/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/DQC-Comics_Orderform/DQC.Comics.OrderForm/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/DQC-Comics_Orderform/DQC.Comics.OrderForm/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/DQC-Comics_Orderform/DQC.Comics.OrderForm/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/DQC-Comics_Orderform/DQC.Comics.OrderForm/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/PowerCLI_EVC-Helper-Script/EVC-Helper.ps1
EVC-Helper.ps1
<# .SYNOPSIS Contains functions that facilitate the selection of VM hosts and target EVC mode for a cluster .NOTES This scripts uses the $global:DefaultVIServers variable to retrieve the list with connected VIServers This scripts assumes that you have connected to one or more vCenter servers (no direct ES...
PowerShellCorpus/Github/jkorell_powershell-dns-updater/DNS_Updater.ps1
DNS_Updater.ps1
# Powershell DNS Updater for Jenkins Jobs # By: Justin Hyland # Desc: Takes input from jenkins, and updates the windows DNS # # Include Blacklist # if ( Test-Path .\DNS_Blacklist.ps1 ) { . .\DNS_Blacklist.ps1 } else { Write-Host "Blacklist file not available" exit 1 } # Grab some environmental varia...
PowerShellCorpus/Github/jkorell_powershell-dns-updater/DNS_Blacklist.ps1
DNS_Blacklist.ps1
# List of A records that should not be updated by this jenkins job # $DNSBlacklistArray = "www", "jenkins", "nagios", "pwrepo", "sam", "rhdspwreset"
PowerShellCorpus/Github/martin9700_Get-SAUser/Get-SAUser.ps1
Get-SAUser.ps1
Function Get-SAUser { <# .SYNOPSIS Simple function that will allow you to do the most common user administrative tasks from a single place. .DESCRIPTION This is a more advanced version of Get-ADUser. It allows you to see administratively useful fields in the default view, but ...
PowerShellCorpus/Github/martin9700_Get-SAUser/Get-SAGroup.ps1
Get-SAGroup.ps1
Function Get-SAGroup { <# #> [CmdletBinding()] Param ( [Parameter(Mandatory=$true)] [Alias("Group","SamAccountName","Name")] [string]$Identity, [string[]]$DefaultDisplayProperties = @("Name","SamAccountName","Description","DistinguishedName","GroupCategory","Group...
PowerShellCorpus/Github/MisLink_dotfiles/profile.ps1
profile.ps1
$OutputEncoding = New-Object -typename System.Text.UTF8Encoding [Console]::OutputEncoding = [Text.UTF8Encoding]::UTF8 # $outputencoding = [System.Text.Encoding]::GetEncoding("utf-8") Set-PSReadlineKeyHandler -Key Tab -Function Complete # Load posh-git module from current directory Import-Module posh-git Import-...
PowerShellCorpus/Github/OPSTest_E2E_NewRepo_2017_3_22_13_38_21/.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/OPSTest_E2E_Provision_1488981941535/.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/MicrosoftDocs_DocsRoot.da-dk/.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/danofsatx_vmpscli/setIPAddress.ps1
setIPAddress.ps1
<# setIPAddress.ps1 Author: Dan Mossor, RHCSA Created: 20 July 2016 Purpose: Programmatically assign IP addresses to Windows Virtual Machines within a Vmware VCenter environment. Usage: setIPAddress -site <sitename> -conn "<Connection Name>" sitename points to a local f...
PowerShellCorpus/Github/danofsatx_vmpscli/SetIntName.ps1
SetIntName.ps1
<# setIntName.ps1 Author: Dan Mossor, RHCSA Created: 20 July 2016 Purpose: Programmatically rename an interface on Windows Virtual Machines within a Vmware VCenter environment. Usage: setIntName -site <sitename> -net <Network Name> sitename points to a local file na...
PowerShellCorpus/Github/danofsatx_vmpscli/ListInterfaces.ps1
ListInterfaces.ps1
<# ListInterfaces.ps1 Author: Dan Mossor, RHCSA Created: 20 July 2016 Purpose: Programmatically list network interfaces on Windows Guests within a Vmware VCenter environment. Usage: ListInterfaces -site <sitename> sitename points to a local file named sitename.csv w...
PowerShellCorpus/Github/danofsatx_vmpscli/AddNetworkInterface.ps1
AddNetworkInterface.ps1
<# AddNetworkInterface.ps1 Author: Dan Mossor, RHCSA Created: 20 July 2016 Purpose: Programmatically add an interface to Virtual Machines within a Vmware VCenter environment. Usage: AddNetworkInterface -site <sitename> -net <Network Name> sitename points to ...
PowerShellCorpus/Github/halevk_CQRS/Shop/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/halevk_CQRS/Shop/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/halevk_CQRS/Shop/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/halevk_CQRS/Shop/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/dylanpeng_MVC-EF-DEMO.net/DemoMVC/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/dylanpeng_MVC-EF-DEMO.net/DemoMVC/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/dylanpeng_MVC-EF-DEMO.net/DemoMVC/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/dylanpeng_MVC-EF-DEMO.net/DemoMVC/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/dylanpeng_MVC-EF-DEMO.net/DemoMVC/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/dylanpeng_MVC-EF-DEMO.net/DemoMVC/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/dylanpeng_MVC-EF-DEMO.net/DemoMVC/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/dylanpeng_MVC-EF-DEMO.net/DemoMVC/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/csim_cruiser/Install.ps1
Install.ps1
function Install-Cruiser(){ $ModulePath = $Env:PSModulePath -split ";" | Select -Index 0 $BaseUrl = 'https://bitbucket.org/TechHike/cruiser/raw/default/Cruiser' New-Item ($ModulePath + "\Cruiser\") -ItemType Directory -Force | Out-Null Write-Host "Downloading Cruiser from $BaseUrl" $InstallFile...
PowerShellCorpus/Github/csim_cruiser/Cruiser/Cruiser-Config.ps1
Cruiser-Config.ps1
$script:config = @{ "history_path" = ".\Cruiser-History.xml"; "build_history_limit" = 50; "project_state_path" = ".\{0}-State.xml"; "log_path" = ".\Cruiser-{0:yyyy-MM-dd}.log" -f (Get-Date); "poll_interval" = 5; # minutes "source_dir" = ".\Source"; "output_dir" = ".\Output"; "html_status_path" = ".\Outp...
PowerShellCorpus/Github/csim_cruiser/Cruiser/Cruiser.ps1
Cruiser.ps1
param([switch]$Server, [switch]$Background) $global:CruiserInstallDirectory = [System.IO.Path]::GetDirectoryName($myInvocation.MyCommand.Definition) function Start-Cruiser { param([switch]$Server, [switch]$Background) Import-Module PSCX $script:global = @{ "install_dir" = $global:CruiserInstallDir...
PowerShellCorpus/Github/csim_cruiser/Cruiser/Build.ps1
Build.ps1
Build-FileProject
PowerShellCorpus/Github/ncruess_longhornmusic/LonghornMusic/packages/jQuery.1.9.1/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/ncruess_longhornmusic/LonghornMusic/packages/jQuery.1.9.1/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/ncruess_longhornmusic/LonghornMusic/packages/jQuery.1.9.1/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/ncruess_longhornmusic/LonghornMusic/packages/WebGrease.1.5.2/tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Visual Studio execution done via NuGet Package Manager Function VSExecution($toolsPath, $project) { $project.DTE.ExecuteCommand("File.SaveAll", [system.string]::Empty) # Get the msbuild version of the project and add the import $msbuild = [Microsof...
PowerShellCorpus/Github/ncruess_longhornmusic/LonghornMusic/packages/WebGrease.1.5.2/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # Return a relative path with reference to root as Uri object # $rootPath - root path # $relativePath - relative path # $appendToRelativePath - Optional parameter. If provided will be appended to relative Path using Path.Combine() Function GetRelativeUri($root...
PowerShellCorpus/Github/ncruess_longhornmusic/LonghornMusic/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/ncruess_longhornmusic/LonghornMusic/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/ncruess_longhornmusic/LonghornMusic/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/ncruess_longhornmusic/LonghornMusic/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/BrandonPotter_AppveyorDeployScriptInjection/deploy-script-inject.ps1
deploy-script-inject.ps1
param ( [string]$scriptUrl = $null ) if ($scriptUrl.Length -eq 0) { Write-Host "Parameter -scriptUrl was not provided, and is required." return } Write-Host "Downloading deploy script $scriptUrl" $WebClient=New-Object net.webclient $deployScriptContents = $WebClient.DownloadString($scriptUrl)...
PowerShellCorpus/Github/Aftnet_UniversalTileMaker/Icon Maker.ps1
Icon Maker.ps1
function loadConfiguration() { Add-Type @' using System; using System.Collections.Generic; using System.Linq; public class Size { public int Width { get; set; } public int Height { get; set; } public string FileName { get; set; } } public class TileCon...
PowerShellCorpus/Github/kib_IMCEAEX/Convert-BounceToX500.ps1
Convert-BounceToX500.ps1
#.Description # Convert URL Encoded address in a Bounce message to an X500 address # that can be added as an alias to the mail-enabled object #.Parameter bounceAddress # URL Encoded bounce message address# #.Example # Convert-BounceToX500 "IMCEAEX-_O=CONTOSO_OU=First+20Administrative+20Group_cn=Recipients_cn=...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo4b.ps1
demo4b.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo3d.ps1
demo3d.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo4a.ps1
demo4a.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo4DEVc.ps1
demo4DEVc.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo2c.ps1
demo2c.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo2a.ps1
demo2a.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo4DEVb.ps1
demo4DEVb.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo1a.ps1
demo1a.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo4DEVa.ps1
demo4DEVa.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo3g.ps1
demo3g.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo1c.ps1
demo1c.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo1d.ps1
demo1d.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo3f.ps1
demo3f.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo3e.ps1
demo3e.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo3a.ps1
demo3a.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo3b.ps1
demo3b.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo1b.ps1
demo1b.ps1
T# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, co...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo3c.ps1
demo3c.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/demo2b.ps1
demo2b.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/Tintri_webinar-powershell-examples/webinar_2015_07_14/credentials.ps1
credentials.ps1
# The MIT License (MIT) # # Copyright (c) 2015 Tintri, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
PowerShellCorpus/Github/v-peliao_E2E_Test1d.fr-be/.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/pdxcat_Breaklock/breaklock.ps1
breaklock.ps1
param( [Parameter(Mandatory=$true)][String]$ComputerName, [Switch]$Force ) Import-Module CAT\LogonSession -ErrorAction Stop $sessions = Get-LogonSession -ComputerName $ComputerName function send_spam ($user, $ComputerName) { $mail = New-Object System.Net.Mail.MailMessage $date = (Get-D...
PowerShellCorpus/Github/Rokory_iTunes/iTunes/iTunesResetPlayCounts.ps1
iTunesResetPlayCounts.ps1
# This script shows how to use the Reset-ITunesPlayCount cmdlet. # It resets the play count for tracks in several playlists, # which have not been played for more than one year, # and have a play count greater than 5, 4, 2, or 1. Import-Module iTunes Reset-ITunesPlayCount -PlayListName 'Beschwingt sðmtliche' -Pl...
PowerShellCorpus/Github/Rokory_iTunes/iTunes/iTunesSync.ps1
iTunesSync.ps1
# This script shows, how to use iTunes.psm1 # to convert several playlists at once # and renaming them at destination at the same time. # # It pipes a list of hashtables, # each containing a playlist name and a new name, # into the Convert-ItunesPlaylist cmdlet. # # You can use this script, # by customi...