full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/Team-Delphinium-Belladonna_Project/Marek/DatabaseProject/SQLiteEntity/packages/System.Data.SQLite.EF6.1.0.97.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/Team-Delphinium-Belladonna_Project/Marek/DatabaseProject/SQLiteEntity/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/Team-Delphinium-Belladonna_Project/Marek/DatabaseProject/SQLiteEntity/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/Team-Delphinium-Belladonna_Project/Marek/DatabaseProject/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/Team-Delphinium-Belladonna_Project/Marek/DatabaseProject/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/Team-Delphinium-Belladonna_Project/Marek/DatabaseProject/packages/EntityFramework.5.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$importedModule = Get-Module | ?{ $_.Name -eq 'EntityFramework' }
if ($PSVersionTable.PSVersion -ge (New-Object Version @( 3, 0 )))
{
$thisModuleManifest = 'EntityFramework.PS3.psd1'
}
else
{
$thisModuleManifest = 'EntityFramework.psd1'
}
$thisModule... |
PowerShellCorpus/Github/Team-Delphinium-Belladonna_Project/Marek/DatabaseProject/packages/EntityFramework.5.0.0/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
function Invoke-ConnectionFactoryConfigurator($assemblyPath, $project)
{
$appDomain = [AppDomain]::CreateDomain(
'EntityFramework.PowerShell',
$null,
(New-Object System.AppDomainSetup -Property @{ ShadowCopyFiles = 'true' }))
... |
PowerShellCorpus/Github/Team-Delphinium-Belladonna_Project/TanyaTeamWork/packages/Newtonsoft.Json.7.0.1/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# open json.net splash page on package install
# don't open if json.net is installed as a dependency
try
{
$url = "http://www.newtonsoft.com/json/install?version=" + $package.Version
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWindo... |
PowerShellCorpus/Github/Team-Delphinium-Belladonna_Project/TanyaTeamWork/packages/EntityFramework.5.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$importedModule = Get-Module | ?{ $_.Name -eq 'EntityFramework' }
if ($PSVersionTable.PSVersion -ge (New-Object Version @( 3, 0 )))
{
$thisModuleManifest = 'EntityFramework.PS3.psd1'
}
else
{
$thisModuleManifest = 'EntityFramework.psd1'
}
$thisModule... |
PowerShellCorpus/Github/Team-Delphinium-Belladonna_Project/TanyaTeamWork/packages/EntityFramework.5.0.0/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
function Invoke-ConnectionFactoryConfigurator($assemblyPath, $project)
{
$appDomain = [AppDomain]::CreateDomain(
'EntityFramework.PowerShell',
$null,
(New-Object System.AppDomainSetup -Property @{ ShadowCopyFiles = 'true' }))
... |
PowerShellCorpus/Github/OPSTest_E2E_Provision_1487234394634/.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/ironashram_esxi_cluster_update/esxi_cluster_update.ps1 | esxi_cluster_update.ps1 | <#
.SYNOPSIS
<VMware cluster update>
.NOTES
Version: 1.0
Author: m1k
Creation Date: 20/11/2015
.EXAMPLE
.\esxi_cluster_update.ps1
#>
$vmHostData = @{}
$vmGuestData = @{}
$global:vmHosts = $null
$global:vmGuests = $null
function do_clear_screen(){
clear
Write-Host "#... |
PowerShellCorpus/Github/ft3411_Hello1/quax.ps1 | quax.ps1 | # Mein Powershell-Script
# UTF8-Version mit BOM - funktioniert mit Umlauten
$s = Get-Service wuauserv
if ($s.Status -eq 'Running') {
"Service akiv"
} else {
"Service nicht aktiv (not running)"
"Status: $($s.Status)"
}
|
PowerShellCorpus/Github/mykolaantoniv_PoweShell_Mercurial/mercurial.ps1 | mercurial.ps1 | $VerbosePreference = 'Continue'
### Amend these URLs to swap out Mercurial / Python versions ###
$mercurialurl = 'http://mercurial.selenic.com/release/windows/mercurial-2.9.0-x64.msi'
$pythonurl = 'http://www.python.org/ftp/python/2.7.6/python-2.7.6.amd64.msi'
$exeurl = 'http://mercurial.selenic.com/release/windo... |
PowerShellCorpus/Github/bobfrankly_Derp/Derp.ps1 | Derp.ps1 | . .\resources\filePaths.PS1
foreach ($p in $filePaths) {
testFunction -allTheDerps $p
}
|
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_NewRepo_2017_5_17_17_58_30/.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/Zorkiy4_Toggl-to-ETS/config.default.ps1 | config.default.ps1 | $api_token = ""
$client_name = "Akvelon"
$irregular_time_start = "21"
$irregular_time_end = "8"
$irregular_time_prefix = "Irregular hours - " |
PowerShellCorpus/Github/Zorkiy4_Toggl-to-ETS/toggl_to_ets.ps1 | toggl_to_ets.ps1 | #
# Call the script like below
# . .\toggl_to_ets.ps1 -since 2016-11-01 -until 2016-11-15
#
param (
[string]$since = [DateTime]::Today.AddDays(-1).ToString('yyyy-MM-dd'),
[string]$until = [DateTime]::Today.AddDays(-1).ToString('yyyy-MM-dd')
)
#Load configuration from file
. $PSScriptRoot\config.ps... |
PowerShellCorpus/Github/shumilovandrei_myproject/ParameterControl/ParameterControl/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/shumilovandrei_myproject/ParameterControl/ParameterControl/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/shumilovandrei_myproject/ParameterControl/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/shumilovandrei_myproject/ParameterControl/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/Nightst0rm_weakpathfolderscan/folderperm.ps1 | folderperm.ps1 | # Author : Parvez Anwar (@parvezghh)
# Date : 17/11/13
#
# powershell.exe -executionpolicy bypass -file folderperm.ps1
$numofpaths = 0
$countcopies = 0
$filetocopy = "testfile.txt"
$myarray = (gi env:path).value.split(';')
Write-Host ""
Write-Host "[i] Number of folder paths :" $myarray.count
... |
PowerShellCorpus/Github/OpenLocalizationTestOrg_azure-docs-pr11_ja-JP/.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/scarytom_ovum/ovum.ps1 | ovum.ps1 | if ($args.Count -ne 2)
{
Write-Host "Usage: ovum.ps1 lang projectdir"
break
}
$ErrorActionPreference='Stop'
$parent = $args[0]
$womb = $args[1]
$ovary = "$env:temp\" + [System.IO.Path]::GetRandomFileName()
Write-Host "working in $ovary"
New-Item "$ovary" -type directory | Out-Null
if (!(Test-Path "$w... |
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/prepare-building-mroonga.ps1 | prepare-building-mroonga.ps1 | # check install cmake
if ((Get-Command cmake) -eq $null) {
Write-Host "Please install cmake 2.8.11.2."
Exit
}
# check install bison
if ((Get-Command bison) -eq $null) {
Write-Host "Please install bison."
Exit
}
$workDir = "work"
$sourceDir = "source"
if (Test-Path -path $workDir) {
# Mroonga ... |
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/unzip.ps1 | unzip.ps1 | if ($useNightly -eq $TRUE) {
$nightly = "source-nightly.zip"
if (Test-Path -path "$nightly") {
$zipname = "$nightly"
} else {
Write-Host "Not found valid nightly package source."
exit 1
}
} else {
$stable = "source.zip"
if (Test-Path -path "$stable") {
$zipname = "$stable"
} el... |
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/install-mroonga.ps1 | install-mroonga.ps1 | # @$mariadbVer MariaDBVer
# @$arch win32/winx64
# @$installSqlDir specify install.sql dir
. ".\versions.ps1"
cd $workDir
function Wait-UntilRunning($cmdName) {
do
{
$Running = Get-Process $cmdName -ErrorAction SilentlyContinue
Start-Sleep -m 500
} while (!$Running)
}
function Wait-UntilT... |
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/install-cmake-3.0.ps1 | install-cmake-3.0.ps1 | $cmakeVersion = "3.0.1"
Invoke-WebRequest -Uri http://www.cmake.org/files/v3.0/cmake-${cmakeVersion}-win32-x86.zip -OutFile cmake.zip
$pathToZip = "$pwd\cmake.zip"
#Load the assembly
[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null
[System.IO.Compression.ZipFile]... |
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/versions.ps1 | versions.ps1 | $originDir = $(Get-Item ".").FullName
$workDir = "$originDir\work"
$mariadbVer = "10.1.23"
$mroongaVer = "7.04"
$useNightly = $null
#$useReleasePackage = $null
$downloadRequestSkip = $null
|
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/get-mroonga.ps1 | get-mroonga.ps1 | . ".\versions.ps1"
try {
Invoke-WebRequest -Uri http://packages.groonga.org/source/mroonga/mariadb-${mariadbVer}-with-mroonga-${mroongaVer}-for-windows.zip -OutFile source.zip
} catch [System.Net.WebException] {
Write-Host "Not Found package."
Exit 1
}
|
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/package-unzip.ps1 | package-unzip.ps1 | # $file: need specify full path
. ".\versions.ps1"
function Unzip-MroongaPackage($workDir, $mariaDBVer, $arch) {
$file = "$workDir\mariadb-$mariadbVer-$arch.zip"
if ($file -eq $null) {
Write-Host "Could not find valid built package."
exit 1
}
#Load the assembly
[System.Reflection.Assembly... |
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/install-cmake-3.1.ps1 | install-cmake-3.1.ps1 | $cmakeVersion = "3.1.3"
Invoke-WebRequest -Uri http://www.cmake.org/files/v3.1/cmake-${cmakeVersion}-win32-x86.zip -OutFile cmake.zip
$pathToZip = "$pwd\cmake.zip"
#Load the assembly
[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null
[System.IO.Compression.ZipFile]... |
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/build-vc-core.ps1 | build-vc-core.ps1 | . ".\versions.ps1"
if ($downloadRequestSkip -eq $TRUE) {
Write-Host "Package downloading skipped."
} elseif ($useReleasePackage -eq $TRUE) {
Write-Host "Use Mroonga $mroongaVer source"
.\get-mroonga.ps1
$zipname = "source.zip"
} else {
$yes = New-Object System.Management.Automation.Host.ChoiceDescri... |
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/build-vc2015.ps1 | build-vc2015.ps1 | $vcVer = "vc2015"
$applyPatch = $TRUE
# $useReleasePackage = $TRUE
.\build-vc-core.ps1
|
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/build-ci-core.ps1 | build-ci-core.ps1 | . ".\versions.ps1"
# always use nightly package
$useNightly = $TRUE
# download Mroonga nightly source
Write-Host "Use Mroonga $mroongaVer nightly source"
.\get-mroonga-nightly.ps1
$zipname = "source-nightly.zip"
# prepare building Mroonga
Write-Host "extract Mroonga $mroongaVer zip"
.\unzip.ps1
Write-Host... |
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/install-cmake.ps1 | install-cmake.ps1 | $cmakeVersion = "2.8.11.2"
Invoke-WebRequest -Uri http://www.cmake.org/files/v2.8/cmake-${cmakeVersion}-win32-x86.zip -OutFile cmake.zip
$pathToZip = "$pwd\cmake.zip"
#Load the assembly
[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null
[System.IO.Compression.ZipFi... |
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/get-mroonga-batfiles.ps1 | get-mroonga-batfiles.ps1 | . ".\versions.ps1"
$batfileDir = "batfiles"
if (!(Test-Path -path $batfileDir)) {
New-Item $batfileDir -itemType directory
}
$batfiles = "build-vc2013.bat",
"build-vc2013-zip-32.bat",
"build-vc2013-zip-64.bat",
"build-vc2013-msi-32.bat",
"build-vc2013-msi-64.bat",
"build-vc2015.bat",
"build-vc2015-zip-3... |
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/create-mrnzip.ps1 | create-mrnzip.ps1 | . ".\versions.ps1"
[Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem")
function New-ZipItem([string]$destFile, [string]$srcDir)
{
$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal
$includeBaseDir = $false
[System.IO.Compression.ZipFile]::CreateFromDirectory... |
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/build-vc2013.ps1 | build-vc2013.ps1 | $vcVer = "vc2013"
$applyPatch = $TRUE
# $useReleasePackage = $TRUE
.\build-vc-core.ps1
|
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/get-mroonga-nightly.ps1 | get-mroonga-nightly.ps1 | . ".\versions.ps1"
if ($nightlyVer -eq $null) {
$today = Get-Date -Format "yyyy.MM.dd"
$nightlyVer = "$today"
}
try {
Invoke-WebRequest -Uri http://packages.groonga.org/nightly/mariadb-${mariadbVer}-with-mroonga-${mroongaVer}-for-windows.${nightlyVer}.zip -OutFile source-nightly.zip
} catch [System.Net... |
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/apply-patch.ps1 | apply-patch.ps1 | . ".\versions.ps1"
# check install patch
if ((Get-Command patch) -eq $null) {
Write-Host "Please install MinGW patch."
Exit
}
if ($applyPatch -eq $null) {
Write-Host "Nothing to do!"
} else {
cd "$workDir\source"
$patches = $(Get-ChildItem "$originDir\..\patches").FullName
foreach ($item in $pa... |
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/Test/check-install-mroonga.ps1 | check-install-mroonga.ps1 | # Check installed Mroonga for (x86|x64)
function check_built_mroonga($arch) {
$currentDir = pwd
cd ..\work\mariadb-*-with-mroonga-*-$arch\bin
cmd /c "start mysqld"
cmd /c 'mysql -e "Show Engines;" -uroot'
cmd /c "mysqladmin -uroot shutdown"
cd $currentDir
}
$arch = "win32", "winx64"
foreach ... |
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/tools/build-vc2010-and-vc2013.ps1 | build-vc2010-and-vc2013.ps1 | $vcVers = "vc2010", "vc2013"
cd ..
foreach ($vcVer in $vcVers) {
.\build-ci-core.ps1
}
|
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/jenkins/daily-mroonga-building-vc2013.ps1 | daily-mroonga-building-vc2013.ps1 | # git clean -fdx
$vcVer = "vc2013"
cd .\powershell
.\build-ci-core.ps1
|
PowerShellCorpus/Github/cosmo0920_PowerShell-for-Mroonga-building/powershell/appveyor/setting.ps1 | setting.ps1 | $useNightly = $TRUE |
PowerShellCorpus/Github/Lezhag_Chat/ChatProject Server v4/packages/EntityFramework.5.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$importedModule = Get-Module | ?{ $_.Name -eq 'EntityFramework' }
if ($PSVersionTable.PSVersion -ge (New-Object Version @( 3, 0 )))
{
$thisModuleManifest = 'EntityFramework.PS3.psd1'
}
else
{
$thisModuleManifest = 'EntityFramework.psd1'
}
$thisModule... |
PowerShellCorpus/Github/Lezhag_Chat/ChatProject Server v4/packages/EntityFramework.5.0.0/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
function Invoke-ConnectionFactoryConfigurator($assemblyPath, $project)
{
$appDomain = [AppDomain]::CreateDomain(
'EntityFramework.PowerShell',
$null,
(New-Object System.AppDomainSetup -Property @{ ShadowCopyFiles = 'true' }))
... |
PowerShellCorpus/Github/Lezhag_Chat/ChatProject Client v4/packages/EntityFramework.5.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$importedModule = Get-Module | ?{ $_.Name -eq 'EntityFramework' }
if ($PSVersionTable.PSVersion -ge (New-Object Version @( 3, 0 )))
{
$thisModuleManifest = 'EntityFramework.PS3.psd1'
}
else
{
$thisModuleManifest = 'EntityFramework.psd1'
}
$thisModule... |
PowerShellCorpus/Github/Lezhag_Chat/ChatProject Client v4/packages/EntityFramework.5.0.0/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
function Invoke-ConnectionFactoryConfigurator($assemblyPath, $project)
{
$appDomain = [AppDomain]::CreateDomain(
'EntityFramework.PowerShell',
$null,
(New-Object System.AppDomainSetup -Property @{ ShadowCopyFiles = 'true' }))
... |
PowerShellCorpus/Github/Hedkandi_powershell/MSI Functions.ps1 | MSI Functions.ps1 | # Ref: http://www.laurierhodes.info/?q=node/104
$WixInstallerDLL = "C:\Program Files (x86)\WiX Toolset v4.0\bin\WixToolset.Dtf.WindowsInstaller.dll"
if (Test-Path -Path "FileSystem::$WixInstallerDLL") {
Add-Type -Path $WixInstallerDLL -ErrorAction Stop
}
else {
throw "Failed to open WixToolset.Dtf.Windo... |
PowerShellCorpus/Github/Hedkandi_powershell/Get-IsTypeAvailable.ps1 | Get-IsTypeAvailable.ps1 | function Get-IsTypeAvailable {
param(
[Parameter(Mandatory=$true,
Position=0)]
[ValidateNotNullOrEmpty()]
[string]$TypeName
)
return [bool](([Management.Automation.PSTypeName]$TypeName).Type)
}
|
PowerShellCorpus/Github/Hedkandi_powershell/Copy-SCCMDeployment.ps1 | Copy-SCCMDeployment.ps1 | function Copy-SCCMDeployment {
[CmdletBinding(SupportsShouldProcess=$true,
HelpUri = 'http://www.microsoft.com/')]
param(
[ValidateNotNullOrEmpty()]
[string]
$OldApplication,
[ValidateNotNullOrEmpty()]
[string]
$NewApplication,
... |
PowerShellCorpus/Github/Hedkandi_powershell/Get-RDPPasswordHash.ps1 | Get-RDPPasswordHash.ps1 | # Source:
# https://social.technet.microsoft.com/Forums/exchange/en-US/07558d3c-4cb7-4ece-868f-b8a6ac9d3ace/cryptunprotectdata-from-powershell?forum=winserverpowershell
# Modified to be able to generate hashes which can be used with rdp-files used in mstsc.exe
# Changes (http://www.remkoweijnen.nl/blog/2008/03/02/h... |
PowerShellCorpus/Github/Hedkandi_powershell/GetActiveConsoleUsername.ps1 | GetActiveConsoleUsername.ps1 | $code = @"
private enum WTS_INFO_CLASS
{
WTSInitialProgram = 0,
WTSApplicationName = 1,
WTSWorkingDirectory = 2,
WTSOEMId = 3,
WTSSessionId = 4,
WTSUserName = 5,
WTSWinStationName = 6,
WTSDomainName = 7,
WTSConnectState = 8,
... |
PowerShellCorpus/Github/Hedkandi_powershell/io.path.ps1 | io.path.ps1 | $Path = "C:\windows\system32\test.txt"
[IO.Path]::GetExtension($Path)
[IO.Path]::GetDirectoryName($Path)
[IO.Path]::GetFileName($Path)
[IO.Path]::GetFileNameWithoutExtension($Path)
[IO.Path]::GetInvalidFileNameChars() -join "-"
[IO.Path]::GetInvalidPathChars() -join "-"
[IO.Path]::GetPathRoot($Path)
[IO.Path]::... |
PowerShellCorpus/Github/Hedkandi_powershell/Invoke-SCCMSchedule.ps1 | Invoke-SCCMSchedule.ps1 | function Global:Invoke-SCCMSchedule {
[CmdletBinding()]
param(
[string]$ComputerName = $env:ComputerName,
[parameter(mandatory=$true)]
[ValidateSet("Hardware Inventory","Software Inventory","Discovery Inventory","File Collection","IDMIF Collection","Client Machine Authentication ","... |
PowerShellCorpus/Github/Hedkandi_powershell/CompareVersions.ps1 | CompareVersions.ps1 | $OldVersion = [System.Version]::new("0.1.0.0")
$NewVersion = [System.Version]::new(([System.Diagnostics.FileVersionInfo]::GetVersionInfo("PATH").FileVersion))
Write-Host "NewVersion: $NewVersion"
Write-Host "OldVersion: $OldVersion"
($OldVersion -lt $NewVersion)
|
PowerShellCorpus/Github/MSUDenverSystemsEngineering_Slic3r/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/MSUDenverSystemsEngineering_Slic3r/AppDeployToolkit/AppDeployToolkitExtensions.ps1 | AppDeployToolkitExtensions.ps1 | <#
.SYNOPSIS
This script is a template that allows you to extend the toolkit with your own custom functions.
.DESCRIPTION
The script is automatically dot-sourced by the AppDeployToolkitMain.ps1 script.
.NOTES
Toolkit Exit Code Ranges:
60000 - 68999: Reserved for built-in exit codes in Deploy-Applicatio... |
PowerShellCorpus/Github/MSUDenverSystemsEngineering_Slic3r/AppDeployToolkit/AppDeployToolkitMain.ps1 | AppDeployToolkitMain.ps1 | <#
.SYNOPSIS
This script contains the functions and logic engine for the Deploy-Application.ps1 script.
.DESCRIPTION
The script can be called directly to dot-source the toolkit functions for testing, but it is usually called by the Deploy-Application.ps1 script.
The script can usually be updated to the latest versio... |
PowerShellCorpus/Github/MSUDenverSystemsEngineering_Slic3r/AppDeployToolkit/AppDeployToolkitHelp.ps1 | AppDeployToolkitHelp.ps1 | <#
.SYNOPSIS
Displays a graphical console to browse the help for the App Deployment Toolkit functions
.DESCRIPTION
Displays a graphical console to browse the help for the App Deployment Toolkit functions
.EXAMPLE
AppDeployToolkitHelp.ps1
.NOTES
.LINK
http://psappdeploytoolkit.com
#>
##*================... |
PowerShellCorpus/Github/MSUDenverSystemsEngineering_Slic3r/Tests/PSScriptAnalyzer.tests.ps1 | PSScriptAnalyzer.tests.ps1 | Describe 'Testing against PSScriptAnalyzer rules' {
Context 'PSScriptAnalyzer Standard Rules' {
$analysis = Invoke-ScriptAnalyzer -Path 'Deploy-Application.ps1'
$scriptAnalyzerRules = Get-ScriptAnalyzerRule
forEach ($rule in $scriptAnalyzerRules) {
It "Should pass $rule" {
If ($analysis.RuleName -co... |
PowerShellCorpus/Github/leonlianght_ExcelMonitor/src/Hide.ps1 | Hide.ps1 | ##########################
## For my love Pinky. ##
## ##
## - Leon ##
##########################
function Set-WindowStyle {
param(
[Parameter()]
[ValidateSet('FORCEMINIMIZE', 'HIDE', 'MAXIMIZE', 'MINIMIZE', 'RESTORE',
'SHOW', 'SHOWDEFAULT', 'SHOWMA... |
PowerShellCorpus/Github/leonlianght_ExcelMonitor/src/update.ps1 | update.ps1 | ##########################
## For my love Pinky. ##
## ##
## - Leon ##
##########################
Write-Host "Checking for Update...";
$gitResutl = git pull;
$wshell = New-Object -ComObject Wscript.Shell;
if ($gitResutl -eq "Already up-to-date.") {
$popupResult = $wshel... |
PowerShellCorpus/Github/leonlianght_ExcelMonitor/src/ExcelMonitor.ps1 | ExcelMonitor.ps1 | ##########################
## For my love Pinky. ##
## ##
## - Leon ##
##########################
# First Run "Set-ExecutionPolicy RemoteSigned" in Powershell
# Kill all other powershell process
Get-Process -Name powershell* | Where-Object {[System.Diagnostics.Process]::G... |
PowerShellCorpus/Github/leonlianght_ExcelMonitor/src/Show.ps1 | Show.ps1 | ##########################
## For my love Pinky. ##
## ##
## - Leon ##
##########################
$path = ".\userdata";
function Set-WindowStyle {
param(
[Parameter()]
[ValidateSet('FORCEMINIMIZE', 'HIDE', 'MAXIMIZE', 'MINIMIZE', 'RESTORE',
'SHOW',... |
PowerShellCorpus/Github/leonlianght_ExcelMonitor/src/Kill.ps1 | Kill.ps1 | ##########################
## For my love Pinky. ##
## ##
## - Leon ##
##########################
Write-Host "Stopping...";
start-sleep -seconds 1;
Get-Process -Name powershell* | Where-Object {[System.Diagnostics.Process]::GetCurrentProcess().id -ne $_.id} | foreach { Stop-P... |
PowerShellCorpus/Github/agowa338_ACME-Scripts/Get-AcmeCertificate.ps1 | Get-AcmeCertificate.ps1 | # Copyright 2017 Klaus Frank
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublic... |
PowerShellCorpus/Github/psadmin-io_ps-logstash/tuxmon_collect.ps1 | tuxmon_collect.ps1 | Param(
[string]$PS_CFG_HOME = $env:PS_CFG_HOME,
[string]$TUXDOM = $env:TUXDOM,
[string]$TUXDIR = $env:TUXDIR
)
# schtasks /create /tn $env:TUXDOM-MonitorQueue /tr "powershell -executionpolicy unrestricted -NoLogo -WindowStyle hidden -command '& <path>\tuxmon_collect.ps1 ${env:PS_CF... |
PowerShellCorpus/Github/psadmin-io_ps-logstash/kibana/start_kibana.ps1 | start_kibana.ps1 | $env:kibana_home = "e:\elk\5.4\kibana-5.4.0-windows-x86"
$env:JAVA_HOME="e:\elk\jdk-1.8.0_91"
cd $env:kibana_home
.\bin\kibana
|
PowerShellCorpus/Github/psadmin-io_ps-logstash/kibana/installKibanaService.ps1 | installKibanaService.ps1 | Start-Process -FilePath e:\elk\nssm.exe -ArgumentList 'install kibana-5.4.0 "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" "-command "& { e:\elk\5.4\kibana-5.4.0-windows-x86\start_kibana.ps1 }"" ' -NoNewWindow -Wait
|
PowerShellCorpus/Github/psadmin-io_ps-logstash/logstash/installLogstashService.ps1 | installLogstashService.ps1 | Start-Process -FilePath e:\elk\nssm.exe -ArgumentList 'install logstash-5.4.0 "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" "-command "& { e:\elk\5.4\logstash-5.4.0\start_logstash.ps1 }"" ' -NoNewWindow -Wait
|
PowerShellCorpus/Github/psadmin-io_ps-logstash/logstash/start_logstash.ps1 | start_logstash.ps1 | $env:logstash_home = "e:\elk\5.4\logstash-5.4.0"
$env:JAVA_HOME="e:\elk\jdk-1.8.0_91"
cd $env:logstash_home
.\bin\logstash -f .\pipeline.conf -r -l .\logs\logstash.log --config.reload.automatic
|
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Cmdlets/Format-WinEvent.ps1 | Format-WinEvent.ps1 | function Format-WinEvent()
{
Param (
[Parameter(Mandatory=$true,
ValueFromPipeline=$true)]
[Diagnostics.Eventing.Reader.EventRecord[]]
$Events,
[Parameter(Mandatory=$true,
ValueFromPipeline=$true)]
[Validateset("EME... |
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Cmdlets/Analyze-EmetEventSummary.ps1 | Analyze-EmetEventSummary.ps1 | function Analyze-EmetEventSummary()
{
Param(
[parameter(Mandatory=$true,
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true)]
$EmetEventSummary,
[parameter(Mandatory=$true,
ValueFromPipeline=$true,
ValueFromPipelineByProp... |
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Cmdlets/Set-EmetTelemetry.ps1 | Set-EmetTelemetry.ps1 | function Set-EmetTelemetry()
{
Param(
$EmetDirectory = (get-item (Get-ItemPropertyValue -Name ImagePath -path HKLM:\SYSTEM\CurrentControlSet\Services\EMET_Service).split('"')[1]).Directory.fullname,
$LocalTelemetryPath = $EmetDirectory,
$EmetRegistryLocation = "HKLM:\SOFTWARE\Microsoft\EMET",
... |
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Cmdlets/New-EmetEventSummary.ps1 | New-EmetEventSummary.ps1 | class EmetEvents
{
$Processes = @{}
AddProcess($ProcessName)
{
$Process = New-Object ProcessSummary
$Process.ProcessName = $ProcessName
$this.Processes.Add($ProcessName, $Process)
}
}
class ProcessSummary
{
[string]$ProcessName
$Mitigations = @{}
... |
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Cmdlets/Find-EmetProtectedApplication.ps1 | Find-EmetProtectedApplication.ps1 | function Find-EmetProtectedApplication()
{
param(
$EmetApplicationPath, # Now supports lists of paths
$EmetConfiguration, # This must be the configuration provided by Get-EmetConfiguration
$DrivesToSearch = ((GET-WMIOBJECT –query “SELECT * from win32_logicaldisk where DriveType = '3'”).name)
)... |
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Cmdlets/Generate-EmetEvent.ps1 | Generate-EmetEvent.ps1 | function Generate-EmetEvent()
{
Param(
[Parameter(Mandatory="true",
ParameterSetName="Stock",Position=0)]
[switch]$Stock,
[Parameter(Mandatory="true",
ParameterSetName="Live",Position=0)]
[switch]$Live,
[Parameter(Mandatory="true",
Param... |
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Cmdlets/Get-EmtConfiguration.ps1 | Get-EmtConfiguration.ps1 | Function Get-EmtConfiguration()
{
param(
[string] $ConfigurationFileLocation = (join-path ($PSScriptRoot | Split-Path -Parent) "Config\EMT_Config.json")
)
$EMT_Configuration = Get-Content -Path $ConfigurationFileLocation -Raw | ConvertFrom-Json
$EMT_Configuration | add-member -MemberType N... |
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Cmdlets/Check-EmetRegisteredApplicationGracePeriod.ps1 | Check-EmetRegisteredApplicationGracePeriod.ps1 | Ôªøfunction Check-EmetRegisteredApplicationGracePeriod()
{
Param(
[Parameter(Mandatory=$true)]
$EmetApplicationRegistry,
[Parameter(Mandatory=$true)]
[int]$GracePeriod
)
begin
{
$ApplicationsInGracePeriod = @()
}
process
{
foreach... |
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Cmdlets/New-ScheduledTaskComObject.ps1 | New-ScheduledTaskComObject.ps1 | function New-ScheduledTaskComObject()
{
# This fuction creates a com object, set its configuration,
Param(
[Parameter(Mandatory=$true,
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true)]
[string]$TaskName,
[parameter(ValueFromPipeline=$true... |
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Cmdlets/New-EmetApplicationRegistry.ps1 | New-EmetApplicationRegistry.ps1 | function New-EmetApplicationRegistry()
{
param(
[parameter(Mandatory=$true)]
$EmetProtectedApplications,
[string]$ApplicationRegistryLocation = (join-path (get-item (Get-ItemPropertyValue -Name ImagePath -path HKLM:\SYSTEM\CurrentControlSet\Services\EMET_Service).split('"')[1]).Directory.fullname... |
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Cmdlets/Write-EmetOverrideFile.ps1 | Write-EmetOverrideFile.ps1 | function Write-EmetOverrideFile()
{
param(
[parameter(Mandatory=$true)]
$version,
[parameter(Mandatory=$true)]
[string]$ProcessPath,
[parameter(Mandatory=$true)]
[string]$ProcessName,
[parameter(Mandatory=$true)]
[string]$MitigationName,
[parameter(Mandatory=$true)]
... |
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Cmdlets/Edit-EmetApplicationRegistry.ps1 | Edit-EmetApplicationRegistry.ps1 | function Edit-EmetApplicationRegistry()
{
Param(
# This default is not good enough. The Path property is not always showing up = /
[string]$ApplicationRegistryLocation = (join-path (get-item (Get-ItemPropertyValue -Name ImagePath -path HKLM:\SYSTEM\CurrentControlSet\Services\EMET_Service).split('"')[1])... |
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Cmdlets/Repair-EmetConfiguration.ps1 | Repair-EmetConfiguration.ps1 | function Repair-EmetConfiguration()
{
param(
[parameter(Mandatory=$true)]
[string]$ProcessName,
[Parameter(Mandatory=$true)]
[string]$MitigationName,
[parameter(Mandatory=$true)]
[string]$ProcessPath,
[string]$EmetParentDirectory = (get-item (Get-ItemPropertyValue -Name Image... |
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Cmdlets/Update-EmetApplicationRegistry.ps1 | Update-EmetApplicationRegistry.ps1 | function Update-EmetApplicationRegistry()
{
Param(
[string]$ApplicationRegistryLocation = (Join-Path (get-item (Get-ItemPropertyValue -Name ImagePath -path HKLM:\SYSTEM\CurrentControlSet\Services\EMET_Service).split('"')[1]).Directory.fullname "EMET_Application_Registry.xml"),
[string[]]$ProtectedApplic... |
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Cmdlets/Get-EmetConfiguration.ps1 | Get-EmetConfiguration.ps1 | function Get-EmetConfiguration()
{
Param
(
[string]$EmetParentPath = (get-item (Get-ItemPropertyValue -Name ImagePath -path HKLM:\SYSTEM\CurrentControlSet\Services\EMET_Service).split('"')[1]).Directory.fullname,
[string]$ExportedConfigurationLocation = (join-path $EmetParentPath "Exported_Confi... |
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Scripts/EMET_Event_Converter.ps1 | EMET_Event_Converter.ps1 | # install the custom event log for EMET events with json messages
#New-EventLog -LogName "Microsoft-Windows-EMET-JSON/Operational" -Source EMT
# Get all the events in the windows application event log and format them into objects
if (-not(Get-Module -Name EMT))
{
Import-Module EMT
}
# Get all event in th... |
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Scripts/Install_EMT.ps1 | Install_EMT.ps1 | if (-not([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] “Administrator”))
{
write-host "
Not running with administrative priviledges.
This script will not be able to make the scheduled
task needed to trigger EmetAnalyze... |
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Scripts/EMET_Analyzer.ps1 | EMET_Analyzer.ps1 | Import-Module -Name EMT
# Get the static configuration from the EMT configuration file and enumerate some setting from
# the running EMET installation
$EMT_Configuration = Get-EmtConfiguration
Update-EmetApplicationRegistry
$FilterHashTable = @{LogName='Application'; ProviderName='EMET'; ID=2; starttime=$EMT... |
PowerShellCorpus/Github/lxswiftxl_EMET-Management-Toolkit/EMT/Scripts/Uninstall_EMT.ps1 | Uninstall_EMT.ps1 | if (-not([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] “Administrator”))
{
write-host "
Not running with administrative priviledges.
This script will not be able to remove the scheduled
task, and event logs related to ... |
PowerShellCorpus/Github/JDogHerman_nmapdiff/nmapdiff.ps1 | nmapdiff.ps1 | <#
.SYNOPSIS
.DESCRIPTION
.PARAMETER target
List of NMap Tragets you want to scan
.PARAMETER options
NMap options to be added to the default scan
.EXAMPLE
.\nmapdiff.ps1 -target 192.168.1.0/24
.NOTES
#>
param (
[Parameter(Mandatory=$true)][string] $target
)
$options = ""
$smtpS... |
PowerShellCorpus/Github/OPSTest_E2E_Provision_1487584471834/.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/ekhoenix_DotNetChallenge/HolmuskDotNETFHIRChallenge/packages/Newtonsoft.Json.6.0.7/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/ekhoenix_DotNetChallenge/HolmuskDotNETFHIRChallenge/packages/EntityFramework.5.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$importedModule = Get-Module | ?{ $_.Name -eq 'EntityFramework' }
if ($PSVersionTable.PSVersion -ge (New-Object Version @( 3, 0 )))
{
$thisModuleManifest = 'EntityFramework.PS3.psd1'
}
else
{
$thisModuleManifest = 'EntityFramework.psd1'
}
$thisModule... |
PowerShellCorpus/Github/ekhoenix_DotNetChallenge/HolmuskDotNETFHIRChallenge/packages/EntityFramework.5.0.0/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
function Invoke-ConnectionFactoryConfigurator($assemblyPath, $project)
{
$appDomain = [AppDomain]::CreateDomain(
'EntityFramework.PowerShell',
$null,
(New-Object System.AppDomainSetup -Property @{ ShadowCopyFiles = 'true' }))
... |
PowerShellCorpus/Github/sixeyed_azure-devtest-labs/docker/win10-client-ub-server/install-choco-and-dev-tools.ps1 | install-choco-and-dev-tools.ps1 |
# install chocolatey
iex (wget 'https://chocolatey.org/install.ps1' -UseBasicParsing)
# dev tools - Docker for Windows, POSH Git and VS Code
choco install docker-for-windows -y -pre
choco install visualstudiocode -y
choco install poshgit -y |
PowerShellCorpus/Github/khalexx_PowershellJSONStarter/JSONStarter.ps1 | JSONStarter.ps1 | param(
$ConfigPath=$(throw "ConfigPath is required"),
[switch]$Test
)
If (-not (Test-Path $ConfigPath)) {
throw "$ConfigPath not found"
}
[string]$jsonString = Get-Content $ConfigPath -raw
$json = ConvertFrom-Json $jsonString
foreach ($script in $json.Script) {
$command=$script.Command
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.