full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_Provision_2017_4_28_30_59_11/.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/OPS-E2E-PPE_E2E_D_Provision_2017_5_15_12_58_42/.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/vvchistiakov_io4posh/io4posh.tests.ps1 | io4posh.tests.ps1 | Clear-Host;
$here = Split-Path -Path $MyInvocation.MyCommand.Path -Parent;
$env:PSModulePath = $env:PSModulePath.Insert(0, (Split-Path -Path $here -Parent) + ';');
$name = $MyInvocation.MyCommand.Name.Split('.')[0];
Import-Module $name -Force;
function Test1 {
Write-Host "Test 1: Find subpath";
$item = Get-I... |
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_NewRepo_2017_4_21_26_5_16/.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/quantranmsu_NI-Circuit-Design-Suite/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/navdeepgaur_powershell/TranslateExcel/translateexcel_v0.1.ps1 | translateexcel_v0.1.ps1 | param(
[Parameter(Mandatory=$True,Position=1)]
[string]$excelworkbook,
[Parameter(Mandatory=$True,Position=2)]
[string]$excelworksheet,
[string]$fromLanguageCode = "auto",
[String]$toLanguageCode = "en"
)
$excelworkbook = "D:\wbooktests.xlsx"
$excelworksheet = "Sheet1"
echo "Only stuff already saved i... |
PowerShellCorpus/Github/navdeepgaur_powershell/TranslateExcel/translateexcel_v0.2.ps1 | translateexcel_v0.2.ps1 | #
#v-nagaur: email me for a newer version, or just get it from public directory of my workstation:
# \\corp-dsktp--051\PublicShare_eyewink_\Powershell\TranslateExcel
#INPUT: D:\A.XLSX, SHEETNAME; OUTPUT: D:\A_TRANSLATED.XLSX
#enable powershell script execution
#
# please execute the following in a powershell ... |
PowerShellCorpus/Github/navdeepgaur_powershell/TranslateExcel/translateexcel_v0.4.ps1 | translateexcel_v0.4.ps1 | #
#v-nagaur: email me for a newer version, or just get it from public directory of my workstation:
# \\corp-dsktp--051\PublicShare_eyewink_\Powershell\TranslateExcel
#INPUT: D:\A.XLSX, SHEETNAME; OUTPUT: D:\A_TRANSLATED.XLSX
#enable powershell script execution
#
# please execute the following in a powershell ... |
PowerShellCorpus/Github/navdeepgaur_powershell/TranslateExcel/translateexcel_v0.4_test.ps1 | translateexcel_v0.4_test.ps1 | #
#v-nagaur: email me for a newer version, or just get it from public directory of my workstation:
# \\corp-dsktp--051\PublicShare_eyewink_\Powershell\TranslateExcel
#INPUT: D:\A.XLSX, SHEETNAME; OUTPUT: D:\A_TRANSLATED.XLSX
#enable powershell script execution
#
# please execute the following in a powershell ... |
PowerShellCorpus/Github/navdeepgaur_powershell/TranslateExcel/translateexcel_v0.3.ps1 | translateexcel_v0.3.ps1 | param(
[Parameter(Mandatory=$True,Position=1)]
[string]$excelworkbook,
[Parameter(Mandatory=$True,Position=2)]
[string]$excelworksheet,
[string]$fromLanguageCode = "auto",
[String]$toLanguageCode = "en"
)
$excelworkbook = "D:\wbooktests.xlsx"
$excelworksheet = "Sheet1"
echo "Only stuff already saved i... |
PowerShellCorpus/Github/navdeepgaur_powershell/SQLtools/listColumns/List-AllColumnsFromServer.ps1 | List-AllColumnsFromServer.ps1 | param(
[Parameter (
Mandatory=$true,
Position = 1,
HelpMessage = "Give Server name here, use '.' for localhost."
)
] [String] $Servername = "."
)
Invoke-Sqlcmd -HostName $Servername -Query "sp_MSforeachdb 'select * from ?.information_schema.columns'" | Out-Gr... |
PowerShellCorpus/Github/navdeepgaur_powershell/ESCIEDisable/ESCIEDisablev1.0.ps1 | ESCIEDisablev1.0.ps1 | #requires -version 4.0
#requires –runasadministrator
#
#v-nagaur: email me for a newer version, or just get it from public directory of my workstation:
# \\corp-dsktp--051\PublicShare_eyewink_\Powershell\ESCIEDisable
#INPUT: None; just execute it as admin on your VM
# to enable powershell script execution
... |
PowerShellCorpus/Github/navdeepgaur_powershell/ESCIEDisable/ESCIEDisable.ps1 | ESCIEDisable.ps1 | #requires -version 4.0
#requires –runasadministrator
#
#v-nagaur: email me for a newer version, or just get it from public directory of my workstation:
# \\corp-dsktp--051\PublicShare_eyewink_\Powershell\ESCIEDisable
#INPUT: None; just execute it as admin on your VM
# to enable powershell script execution
... |
PowerShellCorpus/Github/cramyz_server-responsive-image/.Net MVC Proyect/Server Responsive Image/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/cramyz_server-responsive-image/.Net MVC Proyect/Server Responsive Image/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/cramyz_server-responsive-image/.Net MVC Proyect/Server Responsive Image/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/cramyz_server-responsive-image/.Net MVC Proyect/Server Responsive Image/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/cramyz_server-responsive-image/.Net MVC Proyect/Server Responsive Image/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/cramyz_server-responsive-image/.Net MVC Proyect/Server Responsive Image/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/cramyz_server-responsive-image/.Net MVC Proyect/Server Responsive Image/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/cramyz_server-responsive-image/.Net MVC Proyect/Server Responsive Image/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/itasouza_QrCodeAspNetMVC/QrCode/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/itasouza_QrCodeAspNetMVC/QrCode/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/itasouza_QrCodeAspNetMVC/QrCode/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/itasouza_QrCodeAspNetMVC/QrCode/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/itasouza_QrCodeAspNetMVC/QrCode/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/itasouza_QrCodeAspNetMVC/QrCode/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/itasouza_QrCodeAspNetMVC/QrCode/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/itasouza_QrCodeAspNetMVC/QrCode/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/goldnarms_Binding_AndroidActionItemBadge/src/ActionButtonBadge/NuGetPackage.ps1 | NuGetPackage.ps1 | Param (
[switch]$Publish
)
$ErrorActionPreference = "Stop"
$global:ExitCode = 1
function Write-Log {
#region Parameters
[cmdletbinding()]
Param(
[Parameter(ValueFromPipeline=$true)]
[array] $Messages,
[Parameter()] [ValidateSet("Error", "Warn", "Info")]
[string] $Level = "Info",... |
PowerShellCorpus/Github/goldnarms_Binding_AndroidActionItemBadge/src/ActionButtonBadge/NuGetSetup.ps1 | NuGetSetup.ps1 | Param (
[string]$Url,
[string]$Base64EncodedMessage
)
$ErrorActionPreference = "Stop"
$ExitCode = 1
function Write-Log {
#region Parameters
[cmdletbinding()]
Param(
[Parameter(ValueFromPipeline=$true)]
[array] $Messages,
[Parameter()] [ValidateSet("Error", "Warn", "Info")]
[st... |
PowerShellCorpus/Github/goldnarms_Binding_AndroidActionItemBadge/src/ActionButtonBadge/tools/init.ps1 | init.ps1 | # Runs the first time a package is installed in a solution, and every time the solution is opened.
param($installPath, $toolsPath, $package, $project)
# $installPath is the path to the folder where the package is installed.
# $toolsPath is the path to the tools directory in the folder where the package is instal... |
PowerShellCorpus/Github/goldnarms_Binding_AndroidActionItemBadge/src/ActionButtonBadge/tools/uninstall.ps1 | uninstall.ps1 | # Runs every time a package is uninstalled
param($installPath, $toolsPath, $package, $project)
# $installPath is the path to the folder where the package is installed.
# $toolsPath is the path to the tools directory in the folder where the package is installed.
# $package is a reference to the package object.
... |
PowerShellCorpus/Github/goldnarms_Binding_AndroidActionItemBadge/src/ActionButtonBadge/tools/install.ps1 | install.ps1 | # Runs every time a package is installed in a project
param($installPath, $toolsPath, $package, $project)
# $installPath is the path to the folder where the package is installed.
# $toolsPath is the path to the tools directory in the folder where the package is installed.
# $package is a reference to the packag... |
PowerShellCorpus/Github/v-peliao_E2E_Test1qd.hr-hr/.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/jhansgit_AzureWebApp05/AzureResourceGroup1/Scripts/Deploy-AzureResourceGroup.ps1 | Deploy-AzureResourceGroup.ps1 | #Requires -Version 3.0
#Requires -Module AzureRM.Resources
#Requires -Module Azure.Storage
Param(
[string] [Parameter(Mandatory=$true)] $ResourceGroupLocation,
[string] $ResourceGroupName = 'AzureResourceGroup1',
[switch] $UploadArtifacts,
[string] $StorageAccountName,
[string] $StorageCon... |
PowerShellCorpus/Github/dmdavalos_SamplePowerShell/InactiveADAccountDeactivator.ps1 | InactiveADAccountDeactivator.ps1 | # Title: Inactive AD Account Deactivator
# Author: Daniel Davalos
# Email: daniel@davalos.ws
# Date Created: December 22nd, 2014
#
# Description: This script will take a look in an OU and check the LastLogonDate
# attribute for accounts that have not logged in for the last thirty days. It
# will disable the ones... |
PowerShellCorpus/Github/exactmike_MoveRequestManagement/MoveRequestManagement.test.ps1 | MoveRequestManagement.test.ps1 | #
# This is a PowerShell Unit Test file.
# You need a unit test framework such as Pester to run PowerShell Unit tests.
# You can download Pester from http://go.microsoft.com/fwlink/?LinkID=534084
#
Describe "Get-Function" {
Context "Function Exists" {
It "Should Return" {
}
}
} |
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_Provision_2017_4_23_24_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/tkopacz_webapp-cdn-demo/tkdxplWebCDN/PublishScripts/Publish-WebApplicationWebsite.ps1 | Publish-WebApplicationWebsite.ps1 | #Requires -Version 3.0
<#
.SYNOPSIS
Creates and deploys a Microsoft Azure Website 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/dorohovrs_ps_banki/banki.ps1 | banki.ps1 | get-date -uformat "%d%m%Y" -OutVariable dd
$log_file = 'D:\banki\log.txt'
$date_start = Get-Date -Format "dd MMMM yyyy HH:mm"
$archive_banki = 'http://www.cbr.ru/mcirabis/BIK/bik_db_' + $dd + '.zip'
$destination='d:\banki\zip\' + 'bik_db_' + $dd + '.zip'
"*********************************************" >> $log_fi... |
PowerShellCorpus/Github/dorohovrs_ps_banki/passport.ps1 | passport.ps1 | get-date -uformat "%d%m%Y" -OutVariable dd
$date_start = Get-Date -Format "dd MMMM yyyy HH:mm"
$log_file = 'D:\passeport\log.txt'
$source_name = 'list_of_expired_passports.csv.bz2'
$passport = 'http://www.fms.gov.ru/upload/expired-passports/' + $source_name
$destination = 'd:\passeport\zip\' + $source_name
"***... |
PowerShellCorpus/Github/rsgfernandes_ebclideploy/ebclideploy.ps1 | ebclideploy.ps1 | #CLI deploy for AWS ElasticBeanstalk
#rodrigofernandes@outlook.com
$date=(Get-Date -format "yyyyMMd-HHmmss")
$region = type_your_region # example: us-east-1
$accesskey = type_your_access_key # example: AKIAXXXXXXXXXXXX
$secretkey = type_your_secret_key
$appname = type_your_application_name
$envname = type_your_... |
PowerShellCorpus/Github/sayedihashimi_geoffrey-old/getgeoffrey.ps1 | getgeoffrey.ps1 | [cmdletbinding()]
param(
[string]$sourceUri = 'https://raw.githubusercontent.com/sayedihashimi/geoffrey/master/geoffrey.psm1',
[string]$toolsDir = ("$env:LOCALAPPDATA\LigerShark\tools\")
)
$installFolder = (Join-Path $toolsDir 'geoffrey-pre')
$installPath = (Join-Path $installFolder 'geoffrey.psm1')
... |
PowerShellCorpus/Github/sayedihashimi_geoffrey-old/appveyor.ps1 | appveyor.ps1 | $env:ExitOnPesterFail = $true
$env:IsDeveloperMachine=$true
# disabling coverage for now, its not working on appveyor for some reason
#$env:PesterEnableCodeCoverage = $true
.\build.ps1 |
PowerShellCorpus/Github/sayedihashimi_geoffrey-old/build.ps1 | build.ps1 | [cmdletbinding(DefaultParameterSetName='build')]
param(
[Parameter(ParameterSetName='build',Position=0)]
[switch]$build,
[Parameter(ParameterSetName='build',Position=1)]
[switch]$cleanBeforeBuild,
[Parameter(ParameterSetName='clean',Position=0)]
[switch]$clean
)
Set-StrictMode -Ve... |
PowerShellCorpus/Github/sayedihashimi_geoffrey-old/tests/geoffrey.tests.ps1 | geoffrey.tests.ps1 | [cmdletbinding()]
param()
Set-StrictMode -Version Latest
function Get-ScriptDirectory{
split-path (((Get-Variable MyInvocation -Scope 1).Value).MyCommand.Path)
}
$scriptDir = ((Get-ScriptDirectory) + "\")
. (Join-Path $scriptDir 'import-geoffrey.ps1')
# begin tests
Describe 'New-GeoffreyTask tests'... |
PowerShellCorpus/Github/sayedihashimi_geoffrey-old/tests/e2e.tests.ps1 | e2e.tests.ps1 | [cmdletbinding()]
param()
Set-StrictMode -Version Latest
function Get-ScriptDirectory{
split-path (((Get-Variable MyInvocation -Scope 1).Value).MyCommand.Path)
}
$scriptDir = ((Get-ScriptDirectory) + "\")
. (Join-Path $scriptDir 'import-geoffrey.ps1')
Describe 'sample.ps1 tests'{
It 'can run th... |
PowerShellCorpus/Github/sayedihashimi_geoffrey-old/tests/import-geoffrey.ps1 | import-geoffrey.ps1 | Set-StrictMode -Version Latest
function Get-ScriptDirectory{
split-path (((Get-Variable MyInvocation -Scope 1).Value).MyCommand.Path)
}
$scriptDir = ((Get-ScriptDirectory) + "\")
function Load-GeoffreyModule{
[cmdletbinding()]
param(
[string]$geoffreyModulePath = (Join-Path $scriptDir '.... |
PowerShellCorpus/Github/sayedihashimi_geoffrey-old/samples/sample.ps1 | sample.ps1 | <#
.SYNOPSIS
Sample for using geoffrey.
.PARAMETER importFromSource
If set this will import from the local source
#>
[cmdletbinding()]
param(
[string]$installUri='https://raw.githubusercontent.com/sayedihashimi/geoffrey/master/getgeoffrey.ps1'
)
function Get-ScriptDirectory{
split-path (((... |
PowerShellCorpus/Github/sayedihashimi_geoffrey-old/samples/g.ps1 | g.ps1 | <#
.SYNOPSIS
Sample for using geoffrey.
.PARAMETER importFromSource
If set this will import from the local source
#>
[cmdletbinding()]
param()
function Get-ScriptDirectory{
split-path (((Get-Variable MyInvocation -Scope 1).Value).MyCommand.Path)
}
$scriptDir = ((Get-ScriptDirectory) + "\")
... |
PowerShellCorpus/Github/Iczer1_AD-Scripts-and-functions/AddPhoneInDisplayName.ps1 | AddPhoneInDisplayName.ps1 | <#
.SYNOPSIS
Monitors a group for all members that are user accounts and will append the phone number of the user to the display name of the user name (e.g. “Doe, John” to “Doe,John (215-789-4561)”).
.DESCRIPTION
TODO
.PARAMETER GroupName
Group the script will interact with
.PARAMETER Attribute
Multivalued A... |
PowerShellCorpus/Github/seankmchenry_winconfig/disable_wmp_content_items.ps1 | disable_wmp_content_items.ps1 | # remove the export folder/file if they exist
Remove-Item -Recurse -Force C:\TEMP\reg_export
Remove-Item C:\TEMP\export.reg
# list of keys to export
$keys = 'HKEY_CLASSES_ROOT\SystemFileAssociations\Directory.Audio\shell\Enqueue',
'HKEY_CLASSES_ROOT\SystemFileAssociations\Directory.Audio\shell\Play',
... |
PowerShellCorpus/Github/sundeeprms_3rdParty/PowerShellProject1/PowerShellProject1/Script.ps1 | Script.ps1 | #
# Script.ps1
#
Write-host " This is a Demo for GIT"
# this is a comment |
PowerShellCorpus/Github/stankovicja_IepRepo/IepProject/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/stankovicja_IepRepo/IepProject/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/stankovicja_IepRepo/IepProject/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/stankovicja_IepRepo/IepProject/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/stankovicja_IepRepo/IepProject/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/stankovicja_IepRepo/IepProject/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/stankovicja_IepRepo/IepProject/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/stankovicja_IepRepo/IepProject/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/stankovicja_IepRepo/IepProject/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/stankovicja_IepRepo/IepProject/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/stankovicja_IepRepo/IepProject/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/OPS-E2E-PPE_E2E_Provision_2017_4_8_26_5_19/.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/ducnta_PC-Gaming/Projects/WebSite2/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/ducnta_PC-Gaming/Projects/WebSite2/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/ducnta_PC-Gaming/Projects/WebSite2/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/ducnta_PC-Gaming/Projects/WebSite2/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/ducnta_PC-Gaming/Projects/WebSite2/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/ducnta_PC-Gaming/Projects/WebSite2/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/ducnta_PC-Gaming/Projects/WebSite2/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/ducnta_PC-Gaming/Projects/WebSite2/packages/Microsoft.AspNet.Providers.LocalDB.2.0.1/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
try {
# Set up variables
$timestamp = (Get-Date).ToString('yyyyMMddHHmmss')
$projectName = [IO.Path]::GetFileName($project.ProjectName.Trim([IO.PATH]::DirectorySeparatorChar, [IO.PATH]::AltDirectorySeparatorChar))
$catalogName = "aspnet-$project... |
PowerShellCorpus/Github/ducnta_PC-Gaming/Projects/WebSite2/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/ducnta_PC-Gaming/Projects/WebSite2/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/ducnta_PC-Gaming/Projects/WebSite2/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/ducnta_PC-Gaming/Projects/WebSite2/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/ducnta_PC-Gaming/Projects/WebSite2/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/ducnta_PC-Gaming/Projects/WebSite2/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/Edvin555_BookStore/BookStore/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/Edvin555_BookStore/BookStore/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/Edvin555_BookStore/BookStore/packages/jQuery.2.2.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/Edvin555_BookStore/BookStore/packages/jQuery.2.2.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/Edvin555_BookStore/BookStore/packages/jQuery.2.2.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/fenxu_azure-docs-pr.zh-tw/.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 ur... |
PowerShellCorpus/Github/joe-niland_windows-dev-box/install-tools.ps1 | install-tools.ps1 | # Non-development tools
cinst Firefox skype aria2 btsync evernote -y
# virtualclonedrive
|
PowerShellCorpus/Github/joe-niland_windows-dev-box/install-dev-js.ps1 | install-dev-js.ps1 | # & .\install-dev-common.ps1
Write-Host "Installing Javascript (i.e. node.js) development components"
cinst visualstudiocode nodejs.install ruby python Compass Yeoman
|
PowerShellCorpus/Github/joe-niland_windows-dev-box/configure-windows.ps1 | configure-windows.ps1 | Set-WindowsExplorerOptions -EnableShowFileExtension -EnableShowFullPathInTitleBar
Enable-MicrosoftUpdate
Update-ExecutionPolicy RemoteSigned
Set-StartScreenOptions -EnableDesktopBackgroundOnStart -EnableShowAppsViewOnStartScreen -EnableSearchEverywhereInAppsView |
PowerShellCorpus/Github/joe-niland_windows-dev-box/install-base-win10.ps1 | install-base-win10.ps1 | cinst chocolatey GoogleChrome clink cmder lastpass onedrive TotalCommander gpg4win -y
Install-Package git-credential-manager-for-windows -confirm
Install-Module posh-git
# Update built Cmder's copy of clink with the version from Chocolatey
$clinkDir = gci ${env:ProgramFiles(x86)}\clink | ?{ $_.PSIsContainer } |... |
PowerShellCorpus/Github/joe-niland_windows-dev-box/install-dev-common.ps1 | install-dev-common.ps1 | # ==============================================================================
#
# Joe Niland Copyright 2014 - Present - Released under the Apache 2.0 License
# Based on Chocolatey install script: https://chocolatey.org/install.ps1
#
# Copyright 2007-2008 The Apache Software Foundation.
#
# Licensed under ... |
PowerShellCorpus/Github/joe-niland_windows-dev-box/install-dev-appfabric.ps1 | install-dev-appfabric.ps1 | & .\install-dev-common.ps1
cinst appfabric |
PowerShellCorpus/Github/joe-niland_windows-dev-box/install-dev-tools.ps1 | install-dev-tools.ps1 | # & .\install-dev-common.ps1
Write-Host "Installing other common development components"
cinst vagrant putty heidisql winscp openssl.light fiddler4 sysinternals winmerge nmap wireshark curl paint.net -y
# psget
# git-credential-winstore Logparser Logparser.LizardGui
|
PowerShellCorpus/Github/joe-niland_windows-dev-box/install-dev-dotnet.ps1 | install-dev-dotnet.ps1 | # & .\install-dev-common.ps1
cinst DotNet4.6 tfs2015powertools Linqpad4 dotpeek dotnet3.5 mssqlservermanagementstudio2014express tfs2013powertools entityframeworkpowertools-vs2013 resharper-platform -y
# EntityFrameworkPowerTools
# webpi
cinst -source windowsfeatures IIS-WebServerRole IIS-WebServer IIS-HealthAn... |
PowerShellCorpus/Github/joe-niland_windows-dev-box/install-dev-winservices.ps1 | install-dev-winservices.ps1 | # & .\install-dev-common.ps1
Write-Host "Installing other Windows services"
cinst -source windowsfeatures MSMQ-Container MSMQ-Server |
PowerShellCorpus/Github/joe-niland_windows-dev-box/install-base-win7.ps1 | install-base-win7.ps1 | cinst chocolatey GoogleChrome clink cmder truecrypt lastpass onedrive TotalCommander git-credential-manager-for-windows Powershell gpg4win -y
cinst git -params "/GitAndUnixToolsOnPath" -y
Install-Module posh-git
# Update built Cmder's copy of clink with the version from Chocolatey
$clinkDir = gci ${env:ProgramFil... |
PowerShellCorpus/Github/foxg_cTO-Draft/syncUser-ocfWWField.ps1 | syncUser-ocfWWField.ps1 | Param(
# Set to true to prevent changes being made
[switch]$isTrialRun
)
Set-StrictMode -version 2
Import-Module ActiveDirectory
# attributeFilter lists the values of ExtensionAttribute6 which should be considered part of the "Field"
# list below matches who is entitled to the "Demo" org as per Alex P in ... |
PowerShellCorpus/Github/tim-dunn_Console-Host-Toolkit/Console-Host-Toolkit.tests.ps1 | Console-Host-Toolkit.tests.ps1 | #
# This is a PowerShell Unit Test file.
# You need a unit test framework such as Pester to run PowerShell Unit tests.
# You can download Pester from http://go.microsoft.com/fwlink/?LinkID=534084
#
Describe "Get-Function" {
Context "Function Exists" {
It "Should Return" {
}
}
} |
PowerShellCorpus/Github/tim-dunn_Console-Host-Toolkit/Console-Host-Toolkit.settings.ps1 | Console-Host-Toolkit.settings.ps1 | #
# Console_Host_Toolkit.ps1
#
|
PowerShellCorpus/Github/tim-dunn_Console-Host-Toolkit/StoredSecret/StoredSecret.tests.ps1 | StoredSecret.tests.ps1 | #
# This is a PowerShell Unit Test file.
# You need a unit test framework such as Pester to run PowerShell Unit tests.
# You can download Pester from http://go.microsoft.com/fwlink/?LinkID=534084
#
Describe "Get-Function" {
Context "Function Exists" {
It "Should Return" {
}
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.