full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/lsiteware_prova/SW/packages/AutoMapper.3.3.1/tools/windows8/Install.ps1 | Install.ps1 | param($installPath, $toolsPath, $package, $project)
# This is the MSBuild targets file to add
$targetsFile = [System.IO.Path]::Combine($toolsPath, '..\' + $package.Id + '.targets')
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Cu... |
PowerShellCorpus/Github/lsiteware_prova/SW/packages/AutoMapper.3.3.1/tools/windows8/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
# Grab the loaded MSBuild project for the project
$msbuild = [Microsoft.Build.Evaluatio... |
PowerShellCorpus/Github/lsiteware_prova/SW/packages/AutoMapper.3.3.1/tools/MonoTouch/Install.ps1 | Install.ps1 | param($installPath, $toolsPath, $package, $project)
# This is the MSBuild targets file to add
$targetsFile = [System.IO.Path]::Combine($toolsPath, '..\' + $package.Id + '.targets')
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Cu... |
PowerShellCorpus/Github/lsiteware_prova/SW/packages/AutoMapper.3.3.1/tools/MonoTouch/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
# Grab the loaded MSBuild project for the project
$msbuild = [Microsoft.Build.Evaluatio... |
PowerShellCorpus/Github/lsiteware_prova/SW/packages/AutoMapper.3.3.1/tools/MonoAndroid/Install.ps1 | Install.ps1 | param($installPath, $toolsPath, $package, $project)
# This is the MSBuild targets file to add
$targetsFile = [System.IO.Path]::Combine($toolsPath, '..\' + $package.Id + '.targets')
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Cu... |
PowerShellCorpus/Github/lsiteware_prova/SW/packages/AutoMapper.3.3.1/tools/MonoAndroid/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
# Grab the loaded MSBuild project for the project
$msbuild = [Microsoft.Build.Evaluatio... |
PowerShellCorpus/Github/lsiteware_prova/SW/packages/AutoMapper.3.3.1/tools/wpa81/Install.ps1 | Install.ps1 | param($installPath, $toolsPath, $package, $project)
# This is the MSBuild targets file to add
$targetsFile = [System.IO.Path]::Combine($toolsPath, '..\' + $package.Id + '.targets')
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Cu... |
PowerShellCorpus/Github/lsiteware_prova/SW/packages/AutoMapper.3.3.1/tools/wpa81/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
# Grab the loaded MSBuild project for the project
$msbuild = [Microsoft.Build.Evaluatio... |
PowerShellCorpus/Github/lsiteware_prova/SW/packages/AutoMapper.3.3.1/tools/net40/Install.ps1 | Install.ps1 | param($installPath, $toolsPath, $package, $project)
# This is the MSBuild targets file to add
$targetsFile = [System.IO.Path]::Combine($toolsPath, '..\' + $package.Id + '.targets')
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Cu... |
PowerShellCorpus/Github/lsiteware_prova/SW/packages/AutoMapper.3.3.1/tools/net40/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
# Grab the loaded MSBuild project for the project
$msbuild = [Microsoft.Build.Evaluatio... |
PowerShellCorpus/Github/netjustin_JobSearch/usajobsSearch_nokey.ps1 | usajobsSearch_nokey.ps1 | <#
usajobsSearch
last modified: 2015-11-30
purpose: simplify the search for government work
potential use case:
- fast, repeatable search
- support for matching against an array of values, or against a regular
expression, e.g. 'programm(er|ing)'
limitations:
- does not return Assessment Questions... |
PowerShellCorpus/Github/autocloudarc_0001-Set-AclForHomeDrives/Set-AclForHomeDrives.ps1 | Set-AclForHomeDrives.ps1 | #requires -version 4.0
#requires -RunAsAdministrator
<#
****************************************************************************************************************************************************************************
PROGRAM : 0001-Set-AclForHomeDrivesFromInputFiles.ps1
DESCIRPTION : Takes administrat... |
PowerShellCorpus/Github/harsha01_anglrjsprjt/HrSoftUI/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/harsha01_anglrjsprjt/HrSoftUI/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/harsha01_anglrjsprjt/HrSoftUI/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/PMaslanka93_SportStoreRepository/SklepInternetowy/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/PMaslanka93_SportStoreRepository/SklepInternetowy/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/niemyjski_PowerShell-Scripts/UpdateDart.ps1 | UpdateDart.ps1 | Import-Module -Name 'C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\Pscx'
function downloadFile([string]$url, [string]$targetFile) {
"`nDownloading $url"
$uri = New-Object "System.Uri" "$url"
$request = [System.Net.HttpWebRequest]::Create($uri)
$request.set_Timeout(1... |
PowerShellCorpus/Github/InversiioN_Integratieproject201516/Integratieproject201516/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/InversiioN_Integratieproject201516/Integratieproject201516/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/InversiioN_Integratieproject201516/Integratieproject201516/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/InversiioN_Integratieproject201516/Integratieproject201516/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/InversiioN_Integratieproject201516/Integratieproject201516/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/InversiioN_Integratieproject201516/Integratieproject201516/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/InversiioN_Integratieproject201516/Integratieproject201516/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/InversiioN_Integratieproject201516/Integratieproject201516/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/InversiioN_Integratieproject201516/Integratieproject201516/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/InversiioN_Integratieproject201516/Integratieproject201516/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/InversiioN_Integratieproject201516/Integratieproject201516/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/landhb_Invoke-CertWebClient/Invoke-CertWebClient.ps1 | Invoke-CertWebClient.ps1 | #REQUIRES -Version 2.0
<#
.SYNOPSIS
A functional way to utilize System.Net.WebClient with X509 Smart Card certificates in PSv2.
.DESCRIPTION
Invoke-CertWebClient defines a WebClient extension class that creates a request using provided
certificates. It also has takes arguments to assist making cert... |
PowerShellCorpus/Github/LXGaming_Powershell/WallpaperChanger/Wallpaper Changer.ps1 | Wallpaper Changer.ps1 | Write-Host "LX's School Wallpaper Chnage Script Has Been Started" -foregroundcolor green
Write-Host ""
Write-Host "This Script Bypass Group Policys, RUN AT YOUR OWN RISK" -foregroundcolor red
Write-Host ""
$A = "D:\Wallpaper\1.jpg"
$B = "D:\Wallpaper\2.jpg"
$C = "D:\Wallpaper\3.jpg"
$D = "D:\Wallpaper\4.jpg"
... |
PowerShellCorpus/Github/LXGaming_Powershell/Gradle/GradleUpdater.ps1 | GradleUpdater.ps1 | Clear-Host
$GradleVersion = "4.0"
$Base = Get-ChildItem -Directory "" -Depth 3
ForEach ($Folder in $Base) {
if ((Test-Path ($Folder.FullName + "\.gradle")) -And (Test-Path ($Folder.FullName + "\build.gradle")) -And (Test-Path ($Folder.FullName + "\gradlew"))) {
Write-Host ("Processing: " + $Folder.Name)
... |
PowerShellCorpus/Github/LXGaming_Powershell/Gradle/MultiBuild.ps1 | MultiBuild.ps1 | Clear-Host;
Write-Host("LX's Multi-Build PowerShell Script.");
if (!$PSCommandPath) {
Write-Host("Unable to find script execution path!");
return;
}
$Path = Get-ChildItem -Directory (Split-Path -Parent $PSCommandPath);
ForEach ($Folder in $Path) {
Write-Host("Checking '" + $Folder.Name + "'...");
... |
PowerShellCorpus/Github/LXGaming_Powershell/Gradle/GradleBuilder.ps1 | GradleBuilder.ps1 | Clear-Host
$Base = Get-ChildItem -Directory "" -Depth 3
ForEach ($Folder in $Base) {
if ((Test-Path ($Folder.FullName + "\.gradle")) -And (Test-Path ($Folder.FullName + "\build.gradle")) -And (Test-Path ($Folder.FullName + "\gradlew"))) {
Write-Host ("Processing: " + $Folder.Name)
Remove-Item ($Folder.... |
PowerShellCorpus/Github/LXGaming_Powershell/Gradle/GradleClean.ps1 | GradleClean.ps1 | Clear-Host
$GradleVersion = "3.5"
$Base = Get-ChildItem -Directory "" -Depth 4
ForEach ($Folder in $Base) {
if ($Folder.Parent.Name -eq ".gradle" -and $Folder.Name.Length -eq 3 -and $Folder.Name -ne $GradleVersion) {
Write-Host ("Removing - " + $Folder.FullName);
Remove-Item ($Folder.FullName) -Recurs... |
PowerShellCorpus/Github/LXGaming_Powershell/Misc/BulkCopy.ps1 | BulkCopy.ps1 | $Directory = Get-ChildItem -File "" -Depth 3
foreach ($File in $Directory) {
if ($File.Name -eq "build.bat") {
Write-Host("Processing - " + $File.FullName);
Copy-Item -Path "" -Destination $File.FullName;
}
} |
PowerShellCorpus/Github/LXGaming_Powershell/Misc/ReplaceLine.ps1 | ReplaceLine.ps1 | Clear-Host
$Base = Get-ChildItem -File "" -Depth 3
ForEach ($File in $Base) {
if ($File.Name -eq "README.md") {
$Content = Get-Content $File.FullName -Raw;
if (!$Content.Contains("")) {
Write-Host ("Not Processing - " + $File.FullName)
continue;
}
Write-Host ("Processing - "... |
PowerShellCorpus/Github/LXGaming_Powershell/Misc/ForgeModFinder.ps1 | ForgeModFinder.ps1 | Clear-Host
$Base = Get-ChildItem -File "" -Depth 3
ForEach ($File in $Base) {
if ($File.Name -eq "build.gradle") {
$IsForgeMod = $False;
foreach ($Line in Get-Content $File.FullName) {
if ($IsForgeMod -eq $True) {
break;
}
if ($Line.Contains('apply plugin: "net.minecraftfo... |
PowerShellCorpus/Github/LXGaming_Powershell/Misc/ModCodeScanner.ps1 | ModCodeScanner.ps1 | Clear-Host
$Base = Get-ChildItem -File "" -Depth 2
$Decompiler = "";
ForEach ($File in $Base) {
if ($File.Extension -ieq "jar") {
continue;
}
if (Test-Path -Path $File.FullName.Replace(".jar", "")) {
continue;
}
Write-Host ("Processing '" + $File.Name + "'...");
$ProcessStartInfo = ... |
PowerShellCorpus/Github/LXGaming_Powershell/Misc/WindowsPackageRemover.ps1 | WindowsPackageRemover.ps1 | Clear-Host;
Write-Host("Microsoft Package Remover.");
Write-Host("Author - LX_Gaming");
Write-Host("License - https://www.apache.org/licenses/LICENSE-2.0");
Write-Host("Website - https://lxgaming.github.io");
Write-Host("Script Idea - https://www.youtube.com/watch?v=gnAzCnbDNr8");
Write-Host("");
$Result = R... |
PowerShellCorpus/Github/LXGaming_Powershell/Misc/MonitorFile.ps1 | MonitorFile.ps1 | Clear-Host
$File = "";
Get-Content $File -Tail 0 -Wait |
PowerShellCorpus/Github/LXGaming_Powershell/Misc/Armor.ps1 | Armor.ps1 | Clear-Host;
$Data = @{name="Armor";version="0.0.1-ALPHA";uniqueId="0000-000000-000-0000"}
Invoke-RestMethod -Uri https://lxgaming.ddns.net/analytics/armor.php -ContentType "application/x-www-form-urlencoded" -Method POST -Body $Data |
PowerShellCorpus/Github/LXGaming_Powershell/Misc/BulkReplace.ps1 | BulkReplace.ps1 | Clear-Host
$Base = Get-ChildItem -File "" -Depth 3
ForEach ($File in $Base) {
if ($File.Name -eq "") {
Write-Host ("Processing - " + $File.FullName);
$Content = (Get-Content $File.FullName).Replace("", "");
Set-Content $File.FullName $Content
}
} |
PowerShellCorpus/Github/LXGaming_Powershell/Misc/MoveFile.ps1 | MoveFile.ps1 | $File = ""
$Destination = ""
Remove-Item $Destination
Move-Item $File $Destination |
PowerShellCorpus/Github/LXGaming_Powershell/FileRenamer/FileRenamer.ps1 | FileRenamer.ps1 | $Files = Get-ChildItem "C:\Users\alexr\Desktop\Rename"
ForEach($File in $Files) {
$Name = $File.CreationTime.Year.ToString() + "-";
if ($File.CreationTime.Month.toString().length -eq 1) {
$Name += "0" + $File.CreationTime.Month.ToString() + "-";
} else {
$Name += $File.CreationTime.Month.ToString(... |
PowerShellCorpus/Github/LXGaming_Powershell/DriveLister/LXDevice.ps1 | LXDevice.ps1 | # Script Start
# Assembly Start
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
# Assembly End
# Reference Start
$LXDeviceForm = New-Object System.Windows.Forms.Form
$LXDeviceIcon = [System.Drawing.Icon]::ExtractAssociatedIcon($PSHOME + "\powershell.exe")
$LXDeviceFont = Ne... |
PowerShellCorpus/Github/LXGaming_Powershell/KeyStatus/LXKeyStatus.ps1 | LXKeyStatus.ps1 | PowerShell.exe -windowstyle hidden {
# Script Start
# Assembly Start
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
# Assembly End
# Reference Start
$LXKsTimer = New-Object 'System.Windows.Forms.Timer'
$InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowSt... |
PowerShellCorpus/Github/LXGaming_Powershell/Lolnet/VoteCombo.ps1 | VoteCombo.ps1 | Clear-Host;
$BaseAmount = 150;
$Array = @{}
For ($Index = 0; $Index -le 10000; $Index++) {
$Lolcoins = [Math]::Floor($BaseAmount * (($Index + 0.5) / 365));
if ($Array.Count -ne 0 -and $Array.ContainsValue($Lolcoins)) {
continue;
}
$Array.Add($Index, $Lolcoins);
}
$Array.GetEnumerator() | S... |
PowerShellCorpus/Github/PatrickTerlisten_PowerShell-Snippets/Find files with missing prefix.ps1 | Find files with missing prefix.ps1 | # This snippets searches for files with a missing prefix (in this case yyyyMMdd), takes the creation date of the file and adds this to the filename
Get-Childitem "C:\Users\p.terlisten\Documents" -recurse | Where-Object {$_.FullName -notlike "*Vorlagen*"} | Get-ChildItem -File | Where-Object {$_.name -notmatch '^\d{8... |
PowerShellCorpus/Github/PatrickTerlisten_PowerShell-Snippets/Example Slack Webrequest.ps1 | Example Slack Webrequest.ps1 | $payload = @{
"channel" = "#monitoring";
"icon_emoji" = ":bomb:";
"text" = "This is my message. Hello there!";
"username" = "SimpleMonitor";
}
Invoke-WebRequest `
-Uri "https://hooks.slack.com/services/123456789/987654321/NmbVT3YR65mUecmxSvNbpbLqu4MFZnh" `
-Method "POST" `
-Body (ConvertTo-Json -Compr... |
PowerShellCorpus/Github/PatrickTerlisten_PowerShell-Snippets/Get-ThinAppUsage.ps1 | Get-ThinAppUsage.ps1 | <#
.SYNOPSIS
No parameters needed.
.DESCRIPTION
This script iterates through the ThinApp sandbox directory and outputs a list of used ThinApps and their last access date.
Please change the following variables:
$SearchPath: This should point to the user pr... |
PowerShellCorpus/Github/stuartminch_powershell/cleanup_utility.ps1 | cleanup_utility.ps1 | $bjnProcess = Get-Process -processname BlueJeans
If ($bjnProcess) {
Stop-Process -processname BlueJeans
} else {
Write-Output "No BlueJeans process is running."
}
$bjnPerMachine = Get-WmiObject -Class Win32_Product -Filter "Name = 'Blue Jeans (All User)'"
$bjnPerUser = Get-WmiObject -Class Win32_Produc... |
PowerShellCorpus/Github/elliot_nagios-check_dhcp/check_dhcp/check_dhcp_scopes.ps1 | check_dhcp_scopes.ps1 | ############################################################
# check_dhcp_scopes
#
# Usage:
# check_dhcp_scopes.ps1 -Warning <VALUE> -Critical <VALUE>
#
# Author: Elliot Anderson <elliot.a@gmail.com>
# License: MIT
############################################################
Param (
[ValidateRange(0,100... |
PowerShellCorpus/Github/OPSTest_E2E_Provision_1488531256656/.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/zhenjiao-ms_optest8/.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/larkos_SpelAffaren/SpelAffaren/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/larkos_SpelAffaren/SpelAffaren/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/larkos_SpelAffaren/SpelAffaren/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/larkos_SpelAffaren/SpelAffaren/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/larkos_SpelAffaren/SpelAffaren/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/larkos_SpelAffaren/SpelAffaren/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/larkos_SpelAffaren/SpelAffaren/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/larkos_SpelAffaren/SpelAffaren/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/larkos_SpelAffaren/SpelAffaren/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/IlyaFinkelshteyn_ParallelTests/CreateDb.ps1 | CreateDb.ps1 | param (
[Parameter(Mandatory=$true)]
[string]$JobName,
[Parameter(Mandatory=$true)]
[string]$masterCategory,
[Parameter(Mandatory=$true)]
[string]$AccountName,
[Parameter(Mandatory=$true)]
[string... |
PowerShellCorpus/Github/sdonaghy_tech-challenges.archive/IronGate/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/sdonaghy_tech-challenges.archive/IronGate/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/sdonaghy_tech-challenges.archive/IronGate/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/sdonaghy_tech-challenges.archive/IronGate/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/sdonaghy_tech-challenges.archive/IronGate/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/sdonaghy_tech-challenges.archive/IronGate/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/sdonaghy_tech-challenges.archive/IronGate/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/jose-raul-barreras_admin-scripts/prepare_windows.ps1 | prepare_windows.ps1 | # Create temp directory
New-Item c:\temp -type directory -Force
$wc=new-object system.net.webclient
$wc.UseDefaultCredentials = $true
$wc.downloadfile("https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/upgrade_to_ps3.ps1","c:\temp\upgrade_to_ps3.ps1")
$wc.downloadfile("https://github.com/a... |
PowerShellCorpus/Github/Javier3131_Examen/Examen/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/Javier3131_Examen/Examen/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/Javier3131_Examen/Examen/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/Javier3131_Examen/Examen/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/Javier3131_Examen/Examen/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/Javier3131_Examen/Examen/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/Javier3131_Examen/Examen/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/Javier3131_Examen/Examen/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/Javier3131_Examen/Examen/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/tugberkugurlu_MSBuildSamples/1_BasicSample/build.ps1 | build.ps1 | param(
$buildFile = (join-path (Split-Path -parent $MyInvocation.MyCommand.Definition) "MyProject.msbuild"),
$buildParams = "/p:Configuration=Release",
$buildTarget = "/t:Default"
)
& "$(get-content env:windir)\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" $buildFile $buildParams $buildTarget |
PowerShellCorpus/Github/Takeru-chan_chgkbd/chgkbd.ps1 | chgkbd.ps1 | Param($opt)
if ($opt -eq "en") {
$modeset = @("kbd101.dll", "PCAT_101KEY", "0", "Switch to English mode")
} elseif ($opt -eq "jp") {
$modeset = @("kbd106.dll", "PCAT_106KEY", "2", "Switch to Japanese mode")
} else {
Write-Host "Current status:" -NoNewLine
Get-ItemProperty HKLM:\System\CurrentControlSet\Servi... |
PowerShellCorpus/Github/simplyadrian_powershell-install_tools_for_database_manager_for_microsoft_sql_server/src/install_tools_for_database_manager_for_microsoft_sql_server.ps1 | install_tools_for_database_manager_for_microsoft_sql_server.ps1 | # Powershell 2.0
# Stop and fail script when a command fails.
$ErrorActionPreference = "Stop"
# load library functions
$rsLibDstDirPath = "$env:rs_sandbox_home\RightScript\lib"
. "$rsLibDstDirPath\tools\PsOutput.ps1"
. "$rsLibDstDirPath\tools\ResolveError.ps1"
. "$rsLibDstDirPath\win\Version.ps1"
try
{... |
PowerShellCorpus/Github/asjafjell_AppVeyorTestPackage/AppVeyorScripts/NugetRestore.ps1 | NugetRestore.ps1 | Write-Host "----------------------------------------------------------------" -foreground "Yellow"
Write-Host "before_build: Restoring NuGet dependencies " -foreground "Yellow"
Write-Host "----------------------------------------------------------------" -foreground "Yellow"
nuget restore |
PowerShellCorpus/Github/asjafjell_AppVeyorTestPackage/AppVeyorScripts/TestPreamble.ps1 | TestPreamble.ps1 | Write-Host "----------------------------------------------------------------" -foreground "Yellow"
Write-Host "test: Running tests in solution if any " -foreground "Yellow"
Write-Host "----------------------------------------------------------------" -foreground "Yellow" |
PowerShellCorpus/Github/asjafjell_AppVeyorTestPackage/AppVeyorScripts/AssemblyInfoVersionPatcher.ps1 | AssemblyInfoVersionPatcher.ps1 | Param(
[string]$assemblyInfoPath
)
. .\AppVeyorScripts\Common.ps1 #Source common code into script
$assemblyInfoName = (Get-Item $assemblyInfoPath).Name
Write-Host "---------------------------------------------------------------- " -foreground "Yellow"
Write-Host "before_build: Patching version in $ass... |
PowerShellCorpus/Github/asjafjell_AppVeyorTestPackage/AppVeyorScripts/Common.ps1 | Common.ps1 | function Find-Data-Or-Throw
{
param( [string]$description,
[string]$source,
[string]$data
)
if( -not($source -like "*$data*") )
{
throw "Did not find $data in $description. Please check spelling and/or source data"
}
} |
PowerShellCorpus/Github/asjafjell_AppVeyorTestPackage/AppVeyorScripts/DeployPreamble.ps1 | DeployPreamble.ps1 | Write-Host "----------------------------------------------------------------" -foreground "Yellow"
Write-Host "deploy: Deploying NuGet package " -foreground "Yellow"
Write-Host "----------------------------------------------------------------" -foreground "Yellow" |
PowerShellCorpus/Github/asjafjell_AppVeyorTestPackage/AppVeyorScripts/NuspecVersionPatcher.ps1 | NuspecVersionPatcher.ps1 | Param(
[string]$assembly,
[string]$nuspec
)
. .\AppVeyorScripts\Common.ps1 #Source common code into script
$nuspecName = (Get-Item $nuspec).Name
##LAG metode
Write-Host "----------------------------------------------------------------" -foreground "Yellow"
Write-Host "after_build: Patching $nuspecName... |
PowerShellCorpus/Github/igoravl_MyDemos/2017-04-27 - Meetup Delivering Software/WebServerVm.ps1 | WebServerVm.ps1 | param
(
[Parameter(Mandatory=$true)]
[string] $VmName,
[string] $HostName = 'localhost',
[int] $ProcessorCount = 1,
[long] $MemorySize = 2GB,
[string] $VmAdminUserName,
[securestring] $VmAdminPassword
)
Configuration HostConfiguration {
param
(
... |
PowerShellCorpus/Github/AlqoholUni_Software-EngineeringARU/Programming/Main/Applicant Reviewer/packages/MetroFramework.Design.1.2.0.3/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
foreach ($reference in $project.Object.References)
{
if($reference.Name -eq "MetroFramework.Design")
{
$reference.CopyLocal = $false;
}
}
|
PowerShellCorpus/Github/AlqoholUni_Software-EngineeringARU/Programming/Main/Applicant Reviewer/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/AlqoholUni_Software-EngineeringARU/Programming/Main/Applicant Reviewer/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/OPS-E2E-PPE_E2E_Provision_2017_4_25_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/seb-epsi_projet-GMAO/premier_test_gmao/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/seb-epsi_projet-GMAO/premier_test_gmao/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/seb-epsi_projet-GMAO/premier_test_gmao/packages/System.Data.SQLite.EF6.1.0.99.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/seb-epsi_projet-GMAO/premier_test_gmao/packages/System.Data.SQLite.EF6.1.0.99.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, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.