full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/xpando_Dash/PowerShell/Scripts/Get-SID.ps1 | Get-SID.ps1 | param(
[Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)]
[String]$UserName
)
$u = New-Object System.Security.Principal.NTAccount($UserName)
$sid = $u.Translate([System.Security.Principal.SecurityIdentifier])
$sid.Value
|
PowerShellCorpus/Github/xpando_Dash/PowerShell/Scripts/edit.ps1 | edit.ps1 | $cmd = "notepad2_x86.exe"
if (Test-Is64bit) {
$cmd = "notepad2_x64.exe"
}
if (which $cmd) {
& $cmd $args
} |
PowerShellCorpus/Github/xpando_Dash/PowerShell/Scripts/Get-Hash.ps1 | Get-Hash.ps1 | <#
.SYNOPSIS
Creates a Hash of a file and prints the hash
.DESCRIPTION
Uses System.Security.Cryptography.HashAlgorithm and members to create the hash
Also uses System.Text.AsciiEncoding to convert string to byte array.
Created as a Module.
.NOTES
File Name : Get-Hash.PSM1
Aut... |
PowerShellCorpus/Github/xpando_Dash/PowerShell/Scripts/Encrypt.ps1 | Encrypt.ps1 | param
(
$certPath,
$plaintext
)
$cert = gi $certPath
[System.Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null
$thumbprint = $cert.Thumbprint
$contentInfo = New-Object Security.Cryptography.Pkcs.ContentInfo -ArgumentList (,[Text.Encoding]::UTF8.GetBytes($plaintext))
$envelope =... |
PowerShellCorpus/Github/xpando_Dash/PowerShell/Scripts/Install-JDK7.ps1 | Install-JDK7.ps1 | $ErrorActionPreference = "Stop"
$ProgressPreference = "SilentlyContinue"
if ($Host.Version.Major -lt 3) {
throw "Powershell v3 or greater is required."
}
Push-Location $PSScriptRoot
$downloadDir = "$ENV:ConEmuDir\Apps"
if (!(Test-Path $downloadDir)) {
md $downloadDir | Out-Null
}
Push-Location... |
PowerShellCorpus/Github/xpando_Dash/PowerShell/Scripts/Install-JRE8.ps1 | Install-JRE8.ps1 | $ErrorActionPreference = "Stop"
if ($Host.Version.Major -lt 3) {
throw "Powershell v3 or greater is required."
}
Push-Location $PSScriptRoot
$downloadDir = "$ENV:ConEmuDir\Apps"
if (!(Test-Path $downloadDir)) {
md $downloadDir | Out-Null
}
Push-Location $downloadDir
if (Test-Path .\JRE8) {
... |
PowerShellCorpus/Github/xpando_Dash/PowerShell/Scripts/ll.ps1 | ll.ps1 | Get-ChildItem $args -Force |
PowerShellCorpus/Github/xpando_Dash/PowerShell/Scripts/Test-TCPPort.ps1 | Test-TCPPort.ps1 | param(
[ValidateNotNullOrEmpty()]
[string] $EndPoint = $(throw "Please specify an EndPoint (Host or IP Address)"),
[string] $Port = $(throw "Please specify a Port")
)
$TimeOut = 1000
$IP = [System.Net.Dns]::GetHostAddresses($EndPoint)
$Address = [System.Net.IPAddress]::Parse($IP)
$Socket = New-Object S... |
PowerShellCorpus/Github/xpando_Dash/PowerShell/Scripts/Clear-AllEventLogs.ps1 | Clear-AllEventLogs.ps1 | Get-EventLog -list | % {
Write-Host "Clearing $($_.Log)"
Clear-EventLog -log $_.Log
}
|
PowerShellCorpus/Github/xpando_Dash/PowerShell/Scripts/Install-SysInternals.ps1 | Install-SysInternals.ps1 | $ErrorActionPreference = "Stop"
$ProgressPreference = "SilentlyContinue"
if ($Host.Version.Major -lt 3) {
throw "Powershell v3 or greater is required."
}
Push-Location $PSScriptRoot
$downloadDir = "$ENV:ConEmuDir\Apps"
if (!(Test-Path $downloadDir)) {
md $downloadDir | Out-Null
}
Push-Location... |
PowerShellCorpus/Github/xpando_Dash/PowerShell/Scripts/subl.ps1 | subl.ps1 | if (Test-Path "$PSScriptRoot\Apps\SublimeText\sublime_text.exe") {
& "$PSScriptRoot\Apps\SublimeText\sublime_text.exe" $args
} elseif (Test-Path "$ENV:ProgramFiles\Sublime Text 2\sublime_text.exe") {
& "$ENV:ProgramFiles\Sublime Text 2\sublime_text.exe" $args
}
|
PowerShellCorpus/Github/IvanBoyko_Azure-helpers/Set-VstsVariablesFromArmOutput.ps1 | Set-VstsVariablesFromArmOutput.ps1 | Param(
[string] $resourceGroupName
)
$lastRgDeployment = Get-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName | Sort Timestamp -Descending | Select -First 1
if (!$lastRgDeployment) {
throw "Resource Group Deployment could not be found for '$resourceGroupName'"
}
if ($lastRgDeployment.... |
PowerShellCorpus/Github/IvanBoyko_Azure-helpers/GetVMSizes.ps1 | GetVMSizes.ps1 | param(
[Parameter(Mandatory=$False)]
[string] $location = 'UK South'
)
#
# Option 1
#
$resources = Get-AzureRmResourceProvider -ProviderNamespace Microsoft.Compute
$resources.ResourceTypes.Where{($_.ResourceTypeName -eq 'virtualMachines')}.Locations
Get-AzureRmVmSize -Location $location | Sort-Object Nam... |
PowerShellCorpus/Github/IvanBoyko_Azure-helpers/GetSKUs.ps1 | GetSKUs.ps1 | #
# Based on: https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-cli-ps-findimage
#
param(
[Parameter(Mandatory=$False)]
[string] $locName = "UK South",
[Parameter(Mandatory=$False)]
[string] $pubName = "MicrosoftWindowsServer",
[Parameter(Mandatory=$False)]
[string] $... |
PowerShellCorpus/Github/ryebread8303_gw2api-pshell/gw2api.ps1 | gw2api.ps1 | <#
.Synopsis
Retrieve data from the Guild Wars 2 API
.DESCRIPTION
Long description
.EXAMPLE
Example of how to use this cmdlet
.EXAMPLE
Another example of how to use this cmdlet
#>
function Get-fromgw2api
{
[CmdletBinding()]
[Alias()]
[OutputType([int])]
Param
(
#... |
PowerShellCorpus/Github/coconono_exmerge/exmerge.ps1 | exmerge.ps1 | # Description: Interactive PST export of Exchange 2012 mailboxes -wdb 15jun12
# status: prompts tested, rights assignment tested, mailbox export untested
ECHO "Exchange 2010 Exmerge "
echo "Did you give yourself the correct roles?"
echo "EG ""New-ManagementRoleAssignment -Role ""Mailbox Import Export"" -User cocono... |
PowerShellCorpus/Github/ferbenor_linqtodb/SqlCe/GetStarted/packages/Microsoft.SqlServer.Compact.4.0.8876.1/tools/Install.ps1 | Install.ps1 | param($installPath, $toolsPath, $package, $project)
Import-Module (Join-Path $toolsPath VS.psd1)
$nativeBinDirectory = Join-Path $installPath "NativeBinaries"
if ($project.Type -eq 'Web Site') {
$projectRoot = Get-ProjectRoot $project
if (!$projectRoot) {
return;
}
$binDirectory = Jo... |
PowerShellCorpus/Github/ferbenor_linqtodb/SqlCe/GetStarted/packages/Microsoft.SqlServer.Compact.4.0.8876.1/tools/Uninstall.ps1 | Uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
Import-Module (Join-Path $toolsPath VS.psd1)
if ($project.Type -eq 'Web Site') {
$projectRoot = Get-ProjectRoot $project
if (!$projectRoot) {
return;
}
$binDirectory = Join-Path $projectRoot "bin"
$libDirectory = Join-Path $inst... |
PowerShellCorpus/Github/ferbenor_linqtodb/SQLite/HowToUseOldVersion/packages/System.Data.SQLite.1.0.86.0/tools/install.ps1 | install.ps1 | ###############################################################################
#
# install.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, $... |
PowerShellCorpus/Github/ferbenor_linqtodb/SQLite/GetStarted/packages/System.Data.SQLite.Core.1.0.93.0/tools/net45/install.ps1 | install.ps1 | ###############################################################################
#
# install.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, $... |
PowerShellCorpus/Github/ferbenor_linqtodb/SQLite/GetStarted/packages/System.Data.SQLite.Core.1.0.93.0/tools/net451/install.ps1 | install.ps1 | ###############################################################################
#
# install.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, $... |
PowerShellCorpus/Github/ferbenor_linqtodb/SQLite/GetStarted/packages/System.Data.SQLite.Core.1.0.93.0/tools/net20/install.ps1 | install.ps1 | ###############################################################################
#
# install.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, $... |
PowerShellCorpus/Github/ferbenor_linqtodb/SQLite/GetStarted/packages/System.Data.SQLite.Core.1.0.93.0/tools/net40/install.ps1 | install.ps1 | ###############################################################################
#
# install.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, $... |
PowerShellCorpus/Github/ferbenor_linqtodb/Video/LinqToSqlServer/packages/Microsoft.SqlServer.Types.11.0.1/tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
$sqlServerTypes = $project.ProjectItems | where Name -eq "SqlServerTypes"
if($sqlServerTypes)
{
$folderx86 = $sqlServerTypes.ProjectItems | where Name -eq "x86"
if ($folderx86)
{
$cppFilex86 = $folderx86.ProjectItems | where Name -eq "msvcr100.d... |
PowerShellCorpus/Github/ferbenor_linqtodb/Video/LinqToSqlServer/packages/Microsoft.SqlServer.Types.11.0.1/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
$packagePath = (New-Object system.IO.DirectoryInfo $toolsPath).Parent.FullName
$cppBinaryPathx86 = Join-Path $packagePath "nativeBinaries\x86\msvcr100.dll"
$cppBinaryPathx64 = Join-Path $packagePath "nativeBinaries\x64\msvcr100.dll"
$sqlBinaryPathx86 = Join-Path... |
PowerShellCorpus/Github/ferbenor_linqtodb/Video/LinqCrudOperations/packages/Microsoft.SqlServer.Types.11.0.1/tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
$sqlServerTypes = $project.ProjectItems | where Name -eq "SqlServerTypes"
if($sqlServerTypes)
{
$folderx86 = $sqlServerTypes.ProjectItems | where Name -eq "x86"
if ($folderx86)
{
$cppFilex86 = $folderx86.ProjectItems | where Name -eq "msvcr100.d... |
PowerShellCorpus/Github/ferbenor_linqtodb/Video/LinqCrudOperations/packages/Microsoft.SqlServer.Types.11.0.1/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
$packagePath = (New-Object system.IO.DirectoryInfo $toolsPath).Parent.FullName
$cppBinaryPathx86 = Join-Path $packagePath "nativeBinaries\x86\msvcr100.dll"
$cppBinaryPathx64 = Join-Path $packagePath "nativeBinaries\x64\msvcr100.dll"
$sqlBinaryPathx86 = Join-Path... |
PowerShellCorpus/Github/ferbenor_linqtodb/Video/LinqCrudOperations/packages/System.Data.SQLite.Core.1.0.93.0/tools/net45/install.ps1 | install.ps1 | ###############################################################################
#
# install.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, $... |
PowerShellCorpus/Github/ferbenor_linqtodb/Video/LinqCrudOperations/packages/System.Data.SQLite.Core.1.0.93.0/tools/net451/install.ps1 | install.ps1 | ###############################################################################
#
# install.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, $... |
PowerShellCorpus/Github/ferbenor_linqtodb/Video/LinqCrudOperations/packages/System.Data.SQLite.Core.1.0.93.0/tools/net20/install.ps1 | install.ps1 | ###############################################################################
#
# install.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, $... |
PowerShellCorpus/Github/ferbenor_linqtodb/Video/LinqCrudOperations/packages/System.Data.SQLite.Core.1.0.93.0/tools/net40/install.ps1 | install.ps1 | ###############################################################################
#
# install.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, $... |
PowerShellCorpus/Github/ferbenor_linqtodb/Video/LinqCrudOperations/packages/System.Data.SQLite.EF6.1.0.93.0/tools/net45/install.ps1 | install.ps1 | ###############################################################################
#
# provider.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, ... |
PowerShellCorpus/Github/ferbenor_linqtodb/Video/LinqCrudOperations/packages/System.Data.SQLite.EF6.1.0.93.0/tools/net451/install.ps1 | install.ps1 | ###############################################################################
#
# provider.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, ... |
PowerShellCorpus/Github/ferbenor_linqtodb/Video/LinqCrudOperations/packages/System.Data.SQLite.EF6.1.0.93.0/tools/net40/install.ps1 | install.ps1 | ###############################################################################
#
# provider.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, ... |
PowerShellCorpus/Github/ferbenor_linqtodb/Video/LinqCrudOperations/packages/Microsoft.SqlServer.Compact.4.0.8876.1/tools/Install.ps1 | Install.ps1 | param($installPath, $toolsPath, $package, $project)
Import-Module (Join-Path $toolsPath VS.psd1)
$nativeBinDirectory = Join-Path $installPath "NativeBinaries"
if ($project.Type -eq 'Web Site') {
$projectRoot = Get-ProjectRoot $project
if (!$projectRoot) {
return;
}
$binDirectory = Jo... |
PowerShellCorpus/Github/ferbenor_linqtodb/Video/LinqCrudOperations/packages/Microsoft.SqlServer.Compact.4.0.8876.1/tools/Uninstall.ps1 | Uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
Import-Module (Join-Path $toolsPath VS.psd1)
if ($project.Type -eq 'Web Site') {
$projectRoot = Get-ProjectRoot $project
if (!$projectRoot) {
return;
}
$binDirectory = Join-Path $projectRoot "bin"
$libDirectory = Join-Path $inst... |
PowerShellCorpus/Github/ferbenor_linqtodb/Video/LinqCrudOperations/packages/EntityFramework.6.1.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/ferbenor_linqtodb/Video/LinqCrudOperations/packages/EntityFramework.6.1.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/danilonandrade_PowerShell/PS Lesson 1.ps1 | PS Lesson 1.ps1 | # Get-ExecutionPolicy
# Get-ExecutionPolicy -List
### Undefined is Restricted
# Set-ExecutionPolicy RemoteSigned
# cd C:\Users\Danilo\Documents\COMP2101-F2016-PowerShell
# git init
# git add .
# git commit -m "PS Lesson 1"
# git remote add origin https://github.com/danilonandrade/PowerShell.git
# git push ... |
PowerShellCorpus/Github/davecowart_posh-files/Profile.ps1 | Profile.ps1 | function ep {
subl "$Env:userprofile\Dropbox\Symlinked"
}
# Load editors profile
. "$Env:userprofile\Dropbox\Symlinked\shell\editors.ps1"
# Load git aliases
. "$Env:userprofile\Dropbox\Symlinked\shell\git.ps1"
# Load project finder
. "$Env:userprofile\Dropbox\Symlinked\shell\project_finder.ps1"
# Load... |
PowerShellCorpus/Github/davecowart_posh-files/shell/files.ps1 | files.ps1 | function killex {
param([string]$extension)
Get-ChildItem -Rec | Where {$_.Extension -match "$extension"} | Remove-Item
}
function touch {
set-content -Path ($args[0]) -Value ($null)
} |
PowerShellCorpus/Github/davecowart_posh-files/shell/git.ps1 | git.ps1 | function gs {
git status -s
}
function gst {
git status
}
function ga {
git add . -u
}
function gp {
git push
}
function gpo {
git push origin
}
function gtfo {
git fetch origin
}
function gb {
git branch
}
function glog {
git log --format='%Cgreen%h%Creset %C(cyan)%an%Crese... |
PowerShellCorpus/Github/davecowart_posh-files/shell/project_finder.ps1 | project_finder.ps1 | function po {
if(test-path D:\Projects) {
$ProjectsDir = "D:\Projects"
} else {
$ProjectsDir = "C:\Projects"
}
cd $ProjectsDir
}
function gt {
param([string]$Name)
$ProjectsDir = ""
$term = "*$Name*.sln"
if(test-path D:\Projects) {
$ProjectsDir = "D:\Projects"
} elseif(test-path C:\Projec... |
PowerShellCorpus/Github/davecowart_posh-files/shell/editors.ps1 | editors.ps1 | Set-Alias subl "C:\Program Files\Sublime Text 2\sublime_text.exe"
Set-Alias vs "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe"
Set-Alias mpad "C:\Program Files (x86)\Markpad\MarkPad.exe"
function readme {
mpad README.md
}
function vso {
vs @(gci *.sln)
}
|
PowerShellCorpus/Github/Pasinozavr_PracticeTasks/GameStore/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/Pasinozavr_PracticeTasks/GameStore/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/Pasinozavr_PracticeTasks/GameStore/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/Pasinozavr_PracticeTasks/GameStore/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/Pasinozavr_PracticeTasks/GameStore/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/Pasinozavr_PracticeTasks/GameStore/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/Pasinozavr_PracticeTasks/GameStore/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/Pasinozavr_PracticeTasks/GameStore/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/Pasinozavr_PracticeTasks/GameStore/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/Pasinozavr_PracticeTasks/GameStore/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/Pasinozavr_PracticeTasks/GameStore/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
$roslynSubFolder = 'roslyn'
if ($project -eq $null) {
$project = Get-Project
}
$projectRoot = $project.Properties.Item('FullPath').Value
$binDirectory = Join-Path $projectRoot 'bin'
$targetDirectory = Join-Path $binDirectory $roslynSubFolder
if (Te... |
PowerShellCorpus/Github/Pasinozavr_PracticeTasks/GameStore/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
$compilerPackageName = 'Microsoft.Net.Compilers'
$roslynSubFolder = 'roslyn'
if ($project -eq $null) {
$project = Get-Project
}
$libDirectory = Join-Path $installPath 'lib\net45'
$projectRoot = $project.Properties.Item('FullPath').Value
$binDirectory... |
PowerShellCorpus/Github/rikedje_MegaSample/Start-MegaSample.ps1 | Start-MegaSample.ps1 |
$invocationPath = Split-Path $MyInvocation.MyCommand.Path
Write-Host "Checking prereqs..."
Import-Module .\PowerShell\MegaSample.psm1
Get-MegaSampleToolPaths
Write-Host "Clean up..."
Remove-Item (Join-Path $invocationPath Temp\* )
Remove-Item (Join-Path $invocationPath CSharp\Temp\* )
Write-Host "Bui... |
PowerShellCorpus/Github/AnatoliyKizyulya_OOP-Learning/PowershellScript.ps1 | PowershellScript.ps1 | test script |
PowerShellCorpus/Github/lukemgriffith_Templater/tests.ps1 | tests.ps1 | ipmo .\ModuleLoader.psm1
set-location C:\temp
Invoke-Template -Name exampleTemplate.ps1 -Verbose |
PowerShellCorpus/Github/lukemgriffith_Templater/psTemplater.ps1 | psTemplater.ps1 | class psTemplater {
static [string]$root
static [System.Collections.Generic.List[psvariable]]$Params
}
|
PowerShellCorpus/Github/lukemgriffith_Templater/wrapper.ps1 | wrapper.ps1 |
if (-not (Get-Module -ListAvailable -Name psake -ea SilentlyContinue )) {
Install-Module psake
} else {
Import-Module psake
}
Invoke-psake -buildFile $PSScriptRoot\build.ps1 |
PowerShellCorpus/Github/lukemgriffith_Templater/example.ps1 | example.ps1 |
ipmo $PSScriptRoot\ModuleLoader.psm1
Start-Transcript -Path C:\temp\tempbindingtrans.txt -Append
#Trace-Command -Expression {
# Currently DisableAutoInjectParameters switch does not work.
$a = Template -Name "TestTemplate" -TemplateParameters @{ModuleName="TestModule";ModuleBody="function test {}"} -ro... |
PowerShellCorpus/Github/lukemgriffith_Templater/build.ps1 | build.ps1 | Task Default -depends "Unit", "Acceptance"
Task -Name PreDeploy -action {
ni -it j -Path "$env:USERPROFILE\Documents\WindowsPowerShell\Modules\Templater" -Value $PSScriptRoot
}
Task -name Unit -action {
ipmo Templater
Set-Location $PSScriptRoot;
$pOut = Invoke-Pester -passthru
... |
PowerShellCorpus/Github/lukemgriffith_Templater/Functions/_HelperFunctions.ps1 | _HelperFunctions.ps1 | function FlushTemplate {
param (
[Object]$Template,
[String]$Target
)
ValidateTemplate -Tempalte $Template -ErrorAction Stop
Write-Verbose ("Processing template {0}" -f $Template.Name)
$item = $Template.Children
ProcessTemplateItem -parentPath $Target -t... |
PowerShellCorpus/Github/lukemgriffith_Templater/Functions/Functions.ps1 | Functions.ps1 | function Invoke-Template {
param(
[Parameter(ValueFromPipelineByPropertyName=$true)]
[String]$Name,
[String]$Path = "."
)
$pathToTemplate = "$([psTemplater]::root)\Templates\$Name"
$scriptParams = Get-Command $pathToTemplate
$parameters = ProcessParameters $sc... |
PowerShellCorpus/Github/lukemgriffith_Templater/Functions/_HelperFunctions.tests.ps1 | _HelperFunctions.tests.ps1 | Describe "Templater\_HelperFunctions" {
Context "FlushTemplate" {
}
Context "RecurseObject" {
}
Context "HasChildren" {
$obj = [pscustomobject]@{
Children = [pscustomobject]@... |
PowerShellCorpus/Github/lukemgriffith_Templater/Keywords/Keywords.tests.ps1 | Keywords.tests.ps1 |
InModuleScope -ModuleName "Templater" {
Describe "Template\Keywords" {
Context "Template" {
Mock Document {
return [pscustomobject]@{
Title = "I am a file.txt"
}
}
$Output ... |
PowerShellCorpus/Github/lukemgriffith_Templater/Keywords/Keywords.ps1 | Keywords.ps1 |
function Template {
param(
[String]$Name,
[Hashtable]$TemplateParameters = $PSBoundParameters,
[ScriptBlock]$rootItem
)
if ($PSBoundParameters.ContainsKey("TemplateParameters")) {
$list = [System.Collections.Generic.List[psvariable]]::new()
$Templa... |
PowerShellCorpus/Github/lukemgriffith_Templater/Templates/exampleTemplate.ps1 | exampleTemplate.ps1 | Param(
[Parameter(HelpMessage="name for module.")]
[string]$ModuleName,
[Parameter(HelpMessage="Body of module.")]
[string]$ModuleBody
)
Template -Name $ModuleName -rootItem {
Directory -Name $ModuleName -Children {
Directory -DisableAutoInjectParameters -Name "... |
PowerShellCorpus/Github/andyzib_Templates/PowerShell_ScriptTemplate.ps1 | PowerShell_ScriptTemplate.ps1 | #requires -version 3
<#
.SYNOPSIS
<Overview of script>
.DESCRIPTION
<Brief description of script>
.PARAMETER <Parameter_Name>
<Brief description of parameter input required. Repeat this attribute if required>
.INPUTS
<Inputs if any, otherwise state None>
.OUTPUTS
<Outputs if any, otherwise state ... |
PowerShellCorpus/Github/andyzib_Templates/PSCredential.ps1 | PSCredential.ps1 | <#
$mycredentials = Get-Credential
When you have to provide credentials in non-interactive mode, you can create a PSCredential object in the following way.
$secpasswd = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force
$mycreds = New-Object System.Management.Automation.PSCredential ("username", $... |
PowerShellCorpus/Github/codingoutloud_playertracker/SportRadarPlayByPlay/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/codingoutloud_playertracker/SportRadarPlayByPlay/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/codingoutloud_playertracker/SportRadarPlayByPlay/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/codingoutloud_playertracker/SportRadarPlayByPlay/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/codingoutloud_playertracker/SportRadarPlayByPlay/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/codingoutloud_playertracker/SportRadarPlayByPlay/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/codingoutloud_playertracker/SportRadarPlayByPlay/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/codingoutloud_playertracker/SportRadarPlayByPlay/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/codingoutloud_playertracker/SportRadarPlayByPlay/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/cqueiroz-pivotal_Questrade-Development-Workshop/NET_Service/OrderService/packages/Microsoft.AspNet.Providers.LocalDB.1.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/cqueiroz-pivotal_Questrade-Development-Workshop/NET_Service/OrderService/packages/Newtonsoft.Json.8.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://www.newtonsoft.com/json/install?version=" + $package.Version
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWindo... |
PowerShellCorpus/Github/cqueiroz-pivotal_Questrade-Development-Workshop/NET_Service/OrderService/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/cqueiroz-pivotal_Questrade-Development-Workshop/NET_Service/OrderService/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/cqueiroz-pivotal_Questrade-Development-Workshop/NET_Service/OrderService/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/cqueiroz-pivotal_Questrade-Development-Workshop/NET_Service/OrderService/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/cqueiroz-pivotal_Questrade-Development-Workshop/NET_Service/OrderService/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/cqueiroz-pivotal_Questrade-Development-Workshop/NET_Service/OrderService/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/cqueiroz-pivotal_Questrade-Development-Workshop/NET_Service/OrderService/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/cqueiroz-pivotal_Questrade-Development-Workshop/NET_Service/OrderService/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/cqueiroz-pivotal_Questrade-Development-Workshop/NET_Service/OrderService/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/cqueiroz-pivotal_Questrade-Development-Workshop/NET_Service/OrderService/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/cqueiroz-pivotal_Questrade-Development-Workshop/NET_Service/OrderService/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/chethaa_manug7cr/artifacts/windows-chrome/startChocolatey.ps1 | startChocolatey.ps1 | <##################################################################################################
Description
===========
Bootstrap for ensuring pre-requisites are validated prior to installing chocolatey packages.
Usage examples
==============
PowerShell -ExecutionPolicy bypass... |
PowerShellCorpus/Github/chethaa_manug7cr/artifacts/windows-chrome/ChocolateyPackageInstaller.ps1 | ChocolateyPackageInstaller.ps1 | <##################################################################################################
Description
===========
- This script does the following -
- installs chocolatey
- installs specified chocolatey packages
- This script generates logs in the following folder -
- %ALLUSERSP... |
PowerShellCorpus/Github/chethaa_manug7cr/artifacts/windows-firefox/startChocolatey.ps1 | startChocolatey.ps1 | <##################################################################################################
Description
===========
Bootstrap for ensuring pre-requisites are validated prior to installing chocolatey packages.
Usage examples
==============
PowerShell -ExecutionPolicy bypass... |
PowerShellCorpus/Github/chethaa_manug7cr/artifacts/windows-firefox/ChocolateyPackageInstaller.ps1 | ChocolateyPackageInstaller.ps1 | <##################################################################################################
Description
===========
- This script does the following -
- installs chocolatey
- installs specified chocolatey packages
- This script generates logs in the following folder -
- %ALLUSERSP... |
PowerShellCorpus/Github/chethaa_manug7cr/artifacts/windows-7zip/startChocolatey.ps1 | startChocolatey.ps1 | <##################################################################################################
Description
===========
Bootstrap for ensuring pre-requisites are validated prior to installing chocolatey packages.
Usage examples
==============
PowerShell -ExecutionPolicy bypass... |
PowerShellCorpus/Github/chethaa_manug7cr/artifacts/windows-7zip/ChocolateyPackageInstaller.ps1 | ChocolateyPackageInstaller.ps1 | <##################################################################################################
Description
===========
- This script does the following -
- installs chocolatey
- installs specified chocolatey packages
- This script generates logs in the following folder -
- %ALLUSERSP... |
PowerShellCorpus/Github/chethaa_manug7cr/artifacts/windows-chocolatey/startChocolatey.ps1 | startChocolatey.ps1 | <##################################################################################################
Description
===========
Bootstrap for ensuring pre-requisites are validated prior to installing chocolatey packages.
Usage examples
==============
PowerShell -ExecutionPolicy bypass... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.