full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/I-Telematics_mygitproject/aebappgit/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/I-Telematics_mygitproject/aebappgit/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/I-Telematics_mygitproject/aebappgit/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/I-Telematics_mygitproject/aebappgit/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/I-Telematics_mygitproject/aebappgit/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/I-Telematics_mygitproject/aebappgit/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/I-Telematics_mygitproject/aebappgit/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/eshudnow_test/Get-ADInformation.ps1
Get-ADInformation.ps1
########################################### # Get-ADInformation.ps1 v1.4.4 # # Script by: Elan Shudnow and Jason Anderson # Last Updated: 03/05/2017 ########### Supported Platforms ############ # Active Directory: All Versions # # Note: This script requires all pre-Windows 2008 R2 DCs to have the "Active Direct...
PowerShellCorpus/Github/eshudnow_test/OpenSaveDialog.ps1
OpenSaveDialog.ps1
Function Get-FileName($initialOpenDirectory, $titleOpenDialog) { [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | Out-Null $OpenFileDialog = New-Object System.Windows.Forms.OpenFileDialog $OpenFileDialog.initialDirectory = $initialOpenDirectory # $OpenFileDialog.filter = "All f...
PowerShellCorpus/Github/eshudnow_test/Reset-ADPasswords.ps1
Reset-ADPasswords.ps1
<# .SYNOPSIS A brief description of the Reset-ADPasswords.ps1 file. .DESCRIPTION A description of the file. .PARAMETER Import A description of the LyncOnline parameter. .PARAMETER Export A description of the ExchangeOnline parameter. .NOTES ==========================================...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_NewRepo_2017_5_2_27_58_56/.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/LiquimindInc_BluetoothBear/BluetoothBear/_CreateNewNuGetPackage/Config.ps1
Config.ps1
#========================================================== # Edit the variable values below to configure how your .nupkg file is packed (i.e. created) and pushed (i.e. uploaded) to the NuGet gallery. # # If you have modified this script: # - if you uninstall the "Create New NuGet Package From Project After Each Bu...
PowerShellCorpus/Github/LiquimindInc_BluetoothBear/BluetoothBear/_CreateNewNuGetPackage/DoNotModify/UploadNuGetPackage.ps1
UploadNuGetPackage.ps1
#========================================================== # DO NOT EDIT THIS FILE. # If you want to configure how your package is uploaded, modify the Config.ps1 file. # To run this script from inside Visual Studio, right-click on the "RunMeToUploadNuGetPackage.cmd" file and choose "Run". #=======================...
PowerShellCorpus/Github/LiquimindInc_BluetoothBear/BluetoothBear/_CreateNewNuGetPackage/DoNotModify/New-NuGetPackage.ps1
New-NuGetPackage.ps1
#Requires -Version 2.0 <# .SYNOPSIS Creates a NuGet Package (.nupkg) file from the given Project or NuSpec file, and optionally uploads it to a NuGet Gallery. .DESCRIPTION Creates a NuGet Package (.nupkg) file from the given Project or NuSpec file. Additional parameters may be provided to also upload the ...
PowerShellCorpus/Github/LiquimindInc_BluetoothBear/BluetoothBear/_CreateNewNuGetPackage/DoNotModify/CreateNuGetPackage.ps1
CreateNuGetPackage.ps1
#========================================================== # DO NOT EDIT THIS FILE. # If you want to configure how your package is created, modify the Config.ps1 file. # # This script is ran automatically after every successful build. # This script creates a NuGet package for the current project, and places the ....
PowerShellCorpus/Github/LiquimindInc_BluetoothBear/BluetoothBear_iOS/_CreateNewNuGetPackage/Config.ps1
Config.ps1
#========================================================== # Edit the variable values below to configure how your .nupkg file is packed (i.e. created) and pushed (i.e. uploaded) to the NuGet gallery. # # If you have modified this script: # - if you uninstall the "Create New NuGet Package From Project After Each Bu...
PowerShellCorpus/Github/LiquimindInc_BluetoothBear/BluetoothBear_iOS/_CreateNewNuGetPackage/DoNotModify/UploadNuGetPackage.ps1
UploadNuGetPackage.ps1
#========================================================== # DO NOT EDIT THIS FILE. # If you want to configure how your package is uploaded, modify the Config.ps1 file. # To run this script from inside Visual Studio, right-click on the "RunMeToUploadNuGetPackage.cmd" file and choose "Run". #=======================...
PowerShellCorpus/Github/LiquimindInc_BluetoothBear/BluetoothBear_iOS/_CreateNewNuGetPackage/DoNotModify/New-NuGetPackage.ps1
New-NuGetPackage.ps1
#Requires -Version 2.0 <# .SYNOPSIS Creates a NuGet Package (.nupkg) file from the given Project or NuSpec file, and optionally uploads it to a NuGet Gallery. .DESCRIPTION Creates a NuGet Package (.nupkg) file from the given Project or NuSpec file. Additional parameters may be provided to also upload the ...
PowerShellCorpus/Github/LiquimindInc_BluetoothBear/BluetoothBear_iOS/_CreateNewNuGetPackage/DoNotModify/CreateNuGetPackage.ps1
CreateNuGetPackage.ps1
#========================================================== # DO NOT EDIT THIS FILE. # If you want to configure how your package is created, modify the Config.ps1 file. # # This script is ran automatically after every successful build. # This script creates a NuGet package for the current project, and places the ....
PowerShellCorpus/Github/LiquimindInc_BluetoothBear/BluetoothBearAndroid/_CreateNewNuGetPackage/Config.ps1
Config.ps1
#========================================================== # Edit the variable values below to configure how your .nupkg file is packed (i.e. created) and pushed (i.e. uploaded) to the NuGet gallery. # # If you have modified this script: # - if you uninstall the "Create New NuGet Package From Project After Each Bu...
PowerShellCorpus/Github/LiquimindInc_BluetoothBear/BluetoothBearAndroid/_CreateNewNuGetPackage/DoNotModify/UploadNuGetPackage.ps1
UploadNuGetPackage.ps1
#========================================================== # DO NOT EDIT THIS FILE. # If you want to configure how your package is uploaded, modify the Config.ps1 file. # To run this script from inside Visual Studio, right-click on the "RunMeToUploadNuGetPackage.cmd" file and choose "Run". #=======================...
PowerShellCorpus/Github/LiquimindInc_BluetoothBear/BluetoothBearAndroid/_CreateNewNuGetPackage/DoNotModify/New-NuGetPackage.ps1
New-NuGetPackage.ps1
#Requires -Version 2.0 <# .SYNOPSIS Creates a NuGet Package (.nupkg) file from the given Project or NuSpec file, and optionally uploads it to a NuGet Gallery. .DESCRIPTION Creates a NuGet Package (.nupkg) file from the given Project or NuSpec file. Additional parameters may be provided to also upload the ...
PowerShellCorpus/Github/LiquimindInc_BluetoothBear/BluetoothBearAndroid/_CreateNewNuGetPackage/DoNotModify/CreateNuGetPackage.ps1
CreateNuGetPackage.ps1
#========================================================== # DO NOT EDIT THIS FILE. # If you want to configure how your package is created, modify the Config.ps1 file. # # This script is ran automatically after every successful build. # This script creates a NuGet package for the current project, and places the ....
PowerShellCorpus/Github/ZhangMaKe_CiTest2GitHub/CiTest2Website/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/ZhangMaKe_CiTest2GitHub/CiTest2Website/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/ZhangMaKe_CiTest2GitHub/CiTest2Website/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/ZhangMaKe_CiTest2GitHub/CiTest2Website/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/ZhangMaKe_CiTest2GitHub/CiTest2Website/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/ZhangMaKe_CiTest2GitHub/CiTest2Website/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/ZhangMaKe_CiTest2GitHub/CiTest2Website/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/ZhangMaKe_CiTest2GitHub/CiTest2Website/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/ZhangMaKe_CiTest2GitHub/CiTest2Website/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/ZhangMaKe_CiTest2GitHub/CiTest2Website/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/ZhangMaKe_CiTest2GitHub/CiTest2Website/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/manojattal_SampleCodes/eManager.Domain/packages/CodeContracts.Unofficial.1.0.0.2/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) $project.Object.References | Where-Object { $_.Name -eq 'DELETE_ME' } | ForEach-Object { $_.Remove() }
PowerShellCorpus/Github/manojattal_SampleCodes/eManager.Domain/packages/UpgradeMvc3ToMvc4.1.0.1/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # Save project if any unsaved changes are pending $project.Save() # Get project directory $projectDirectory = [System.IO.Path]::GetDirectoryName($project.FullName) # Load project XML $projectXml = [xml](get-content $project.FullName) # Get project names...
PowerShellCorpus/Github/manojattal_SampleCodes/eManager.Domain/packages/EntityFramework.6.0.2/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/manojattal_SampleCodes/eManager.Domain/packages/EntityFramework.6.0.2/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/manojattal_SampleCodes/eManager.Domain/packages/Microsoft.AspNet.Providers.LocalDb.2.0.0/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/manojattal_SampleCodes/eManager.Domain/packages/jQuery.1.7.1.1/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Determine the file paths $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName if (Test-Path $projectIntelliSense...
PowerShellCorpus/Github/manojattal_SampleCodes/eManager.Domain/packages/jQuery.1.7.1.1/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # VS 11 and above supports the new intellisense JS files $supportsJsIntelliSenseFile = [System.Version]::Parse($dte.Version).Major -ge 11 if (-not $supportsJsIntelliSenseFile) { Write-Host "IntelliSense JS files are n...
PowerShellCorpus/Github/manojattal_SampleCodes/eManager.Domain/packages/jQuery.1.7.1.1/Tools/common.ps1
common.ps1
function Get-Checksum($file) { $cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider" $fileInfo = Get-Item $file trap { ; continue } $stream = $fileInfo.OpenRead() if ($? -eq $false) { # Couldn't open file for reading return $null } $bytes = $...
PowerShellCorpus/Github/manojattal_SampleCodes/Video/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/manojattal_SampleCodes/Video/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/manojattal_SampleCodes/Video/packages/jQuery.1.7.1.1/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Determine the file paths $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName if (Test-Path $projectIntelliSense...
PowerShellCorpus/Github/manojattal_SampleCodes/Video/packages/jQuery.1.7.1.1/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # VS 11 and above supports the new intellisense JS files $supportsJsIntelliSenseFile = [System.Version]::Parse($dte.Version).Major -ge 11 if (-not $supportsJsIntelliSenseFile) { Write-Host "IntelliSense JS files are n...
PowerShellCorpus/Github/manojattal_SampleCodes/Video/packages/jQuery.1.7.1.1/Tools/common.ps1
common.ps1
function Get-Checksum($file) { $cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider" $fileInfo = Get-Item $file trap { ; continue } $stream = $fileInfo.OpenRead() if ($? -eq $false) { # Couldn't open file for reading return $null } $bytes = $...
PowerShellCorpus/Github/shwnd_PSWebServer/web-server.ps1
web-server.ps1
param ( [string] $packageDir = 'Packages', [string] $directory = './', [int] $port = 8080 ) Add-Type -AssemblyName "System.Net.Http" function Write-Http-Response($content, $response) { $buffer = [System.Text.Encoding]::UTF8.GetBytes($content) $response.ContentLength64 = $buffer.Length ...
PowerShellCorpus/Github/sergey-krakos_Neuro.DocWriter/Neuro.DW/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/sergey-krakos_Neuro.DocWriter/Neuro.DW/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/nehavikash2014_Testneha/TEST_SCRIPT.ps1
TEST_SCRIPT.ps1
New-Item -path "d:\GitTesting" -name "testing" -itemType "directory"
PowerShellCorpus/Github/falkheiland_PSSonicWALL/init.ps1
init.ps1
# use this file to define global variables on module scope # or perform other initialization procedures. # this file will not be touched when new functions are exported to # this module.
PowerShellCorpus/Github/falkheiland_PSSonicWALL/Convert-SonicwallExpToTxt.ps1
Convert-SonicwallExpToTxt.ps1
function Convert-SonicwallExpToTxt { <# .SYNOPSIS Converts SonicWAll Export-file into txt-File .DESCRIPTION Loads SonicWALL Export-File <name>.exp, removes the 2 trailing '&&', decode base64, converts ASCII signs, saves as <name>.txt .PARAMETER FilePath Full Path to Export-File .E...
PowerShellCorpus/Github/JanJoris_psake-example/Build/psake-config.ps1
psake-config.ps1
<# ------------------------------------------------------------------- Defaults ------------------------------------------------------------------- $config.buildFileName="default.ps1" $config.framework = "4.0" $config.taskNameFormat="Executing {0}" $config.verboseError=$false $config.coloredOutput = $true $con...
PowerShellCorpus/Github/JanJoris_psake-example/Build/flavors.ps1
flavors.ps1
#requires -Version 1 Task Default -Depends ProductionCI Task ProductionCI { Invoke-psake psakefile.ps1 CI -properties @{ 'solutionFileName' = 'Dummy.sln' 'build_platform' = 'x86' 'configuration' = 'Release' 'project_name' = 'Dummy.UWP.Test' } } Task ProductionCD { Invoke-psake ps...
PowerShellCorpus/Github/JanJoris_psake-example/Build/psakefile-tools.ps1
psakefile-tools.ps1
#requires -Version 3 function Get-SolutionFolder { return (Get-Item $PSScriptRoot).Parent.FullName } function Get-SolutionPath { param ( [string] $solutionName ) return ((Get-SolutionFolder) + "\$solutionName") } function Get-ProjectFilePath { param ( [string] $p...
PowerShellCorpus/Github/JanJoris_psake-example/Build/psake.ps1
psake.ps1
# Helper script for those who want to run psake without importing the module. # Example run from PowerShell: # .\psake.ps1 "default.ps1" "BuildHelloWord" "4.0" # Must match parameter definitions for psake.psm1/invoke-psake # otherwise named parameter binding fails param( [Parameter(Position=0,Mandatory=0)...
PowerShellCorpus/Github/JanJoris_psake-example/Build/psakefile.ps1
psakefile.ps1
#requires -Version 3 . '.\psakefile-tools.ps1' Properties { $solutionFileName = $null $build_platform = $null $configuration = $null $project_name = $null $app_name = $null $display_name = $null $product_id = $null } Task VerifyBuildProperties { Assert ($solutionFileName -ne $null) 'Solu...
PowerShellCorpus/Github/dsokac_C_sharp_tutoring/WeatherDressing/packages/jQuery.2.1.1/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Determine the file paths $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName if (Test-Path $projectIntelliSense...
PowerShellCorpus/Github/dsokac_C_sharp_tutoring/WeatherDressing/packages/jQuery.2.1.1/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # VS 11 and above supports the new intellisense JS files $vsVersion = [System.Version]::Parse($dte.Version) $supportsJsIntelliSenseFile = $vsVersion.Major -ge 11 if (-not $supportsJsIntelliSenseFile) { $displayVersio...
PowerShellCorpus/Github/dsokac_C_sharp_tutoring/WeatherDressing/packages/jQuery.2.1.1/Tools/common.ps1
common.ps1
function Get-Checksum($file) { $cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider" $fileInfo = Get-Item $file trap { ; continue } $stream = $fileInfo.OpenRead() if ($? -eq $false) { # Couldn't open file for reading return $null } $bytes = $...
PowerShellCorpus/Github/dsokac_C_sharp_tutoring/WeatherDressing - Copy/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/dsokac_C_sharp_tutoring/WeatherDressing - Copy/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/dsokac_C_sharp_tutoring/WeatherDressing - Copy/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/dsokac_C_sharp_tutoring/WeatherDressing - Copy/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, ...
PowerShellCorpus/Github/dsokac_C_sharp_tutoring/WeatherDressing - Copy/packages/System.Data.SQLite.EF6.1.0.99.0/tools/net46/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/dsokac_C_sharp_tutoring/WeatherDressing - Copy/packages/System.Data.SQLite.EF6.1.0.99.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/vlariono_PSRotateLog/.build.ps1
.build.ps1
try{ Import-Module InvokeBuild } catch { throw $_ } #region ModuleInfo $moduleName = "PSRotateLog" $moduleVersion = "1.0" # endregion $moduleContent = @() $modulePath = "$($Variable:PSScriptRoot)\Release\$moduleName\$moduleVersion" $sourceRoot = "$($Variable:PSScriptRoot)\Source" $manifest = @{ Path =...
PowerShellCorpus/Github/vlariono_PSRotateLog/Source/Remove-IISLog/Remove-IISLog.private.ps1
Remove-IISLog.private.ps1
function Get-OldestFileV2 { [OutputType([System.IO.FileInfo])] #region Param param( [Parameter(Position=0, Mandatory=$true)] [ValidateScript({Test-Path -Path $_ -PathType 'Container'})] [System.IO.DirectoryInfo] $Path ) #endregion process{ Get-...
PowerShellCorpus/Github/vlariono_PSRotateLog/Source/Remove-IISLog/Remove-IISLog.ps1
Remove-IISLog.ps1
function Remove-IISLog{ <# .SYNOPSIS Removes logs .DESCRIPTION Log removing based on directory size, files count, files age .EXAMPLE C:\PS> Remove-IISLog -Path C:\Inetpub\Logs -FolderSize 100MB Removes old files and keeps only 100MB of the newest files .EXAM...
PowerShellCorpus/Github/vlariono_PSRotateLog/Source/Remove-IISLog/Tests/Remove-IISLog.Tests.ps1
Remove-IISLog.Tests.ps1
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace '\\Tests','' $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.' Get-ChildItem -Path $here -Recurse -Include "*.ps1" -Exclude '*.Tests.ps1'|ForEach-Object{ . $_.FullName } describe "Remove-IISLog.ps1" { ...
PowerShellCorpus/Github/vlariono_PSRotateLog/Source/Compress-IISLogs/Compress-IISLogs.private.ps1
Compress-IISLogs.private.ps1
function Compress-File{ #region Params param( [Parameter(Position=0, Mandatory=$true)] [ValidateScript({Test-Path -Path $_ -PathType 'leaf'})] [System.String] $InputFile, [Parameter(Position=1, Mandatory=$true)] [ValidateNotNullOrEmpty()] [System....
PowerShellCorpus/Github/vlariono_PSRotateLog/Source/Compress-IISLogs/Compress-IISLog.ps1
Compress-IISLog.ps1
function Compress-IISLog{ <# .SYNOPSIS Performs gzip compression of IIS logs .DESCRIPTION Reads original logs from source directory and saves compressed logs to destination directory. The original files will be deleted after compression. The script won't rotate files which have been modif...
PowerShellCorpus/Github/vlariono_PSRotateLog/Source/Compress-IISLogs/Tests/Compress-IISLogs.Tests.ps1
Compress-IISLogs.Tests.ps1
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace '\\Tests','' $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.' Get-ChildItem -Path $here -Recurse -Include "*.ps1" -Exclude '*.Tests.ps1'|ForEach-Object{ . $_.FullName } function Get-RandomIPv4 { return [IP...
PowerShellCorpus/Github/ccdnkz_Selasa_141110400_Christine/Latihan1/Latihan Database/Pertemuan11_a/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/ccdnkz_Selasa_141110400_Christine/Latihan1/Latihan Database/Pertemuan11_a/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/Flodu31_PowerShell-Scripts/SQLServer/Restore_RecoveryMode_DB_v1.0.ps1
Restore_RecoveryMode_DB_v1.0.ps1
#===================================================================================================================================== # # NAME: Restore Recovering mode databases # # AUTHOR: Florent APPOINTAIRE # DATE: 06/06/2017 # VERSION: 1.0 # # COMMENT: The purpose of this script is to restore your database...
PowerShellCorpus/Github/Flodu31_PowerShell-Scripts/SQLServer/Backup_DB_To_Azure_v1.0.ps1
Backup_DB_To_Azure_v1.0.ps1
#===================================================================================================================================== # # NAME: Backup Databases to Azure # # AUTHOR: Florent APPOINTAIRE # DATE: 06/06/2017 # VERSION: 1.0 # # COMMENT: The purpose of this script is to backup your SQL Server databa...
PowerShellCorpus/Github/Flodu31_PowerShell-Scripts/SQLServer/Set_Recovery_Model_Full_v1.0.ps1
Set_Recovery_Model_Full_v1.0.ps1
#===================================================================================================================================== # # NAME: Change Recovery Model # # AUTHOR: Florent APPOINTAIRE # DATE: 06/06/2017 # VERSION: 1.0 # # COMMENT: The purpose of this script is to change the recovery model for all...
PowerShellCorpus/Github/Flodu31_PowerShell-Scripts/Azure/Capture_Azure_Image.ps1
Capture_Azure_Image.ps1
#By executing this script, the VM will not be able to start anymore after the Sysprep #Variables $subscriptionName = "Visual Studio" $ipName = "FLOAPP-IIS01PublicIP" $location = "WestEurope" $rgName = "Compute" $newRG = "WebServers" $vmName = "FLOAPP-IIS01" $vnetRG = "Network" $vnetName = "FLOAPP-VNet" $s...
PowerShellCorpus/Github/mryoho_SIS-AD_Sync/ResetUserPasswordsFromCSV.ps1
ResetUserPasswordsFromCSV.ps1
Import-Module ActiveDirectory Function SetUserPassword($Users, $ChangePasswordAtLogon, $PasswordNeverExpires, $CannotChangePassword) { $Objs = @() ForEach($User in $Users){ If(dsquery user -samid $User.sAMAccountName) { $SecurePassword = $User.password | ConvertTo-SecureString -AsPlainText -Force #...
PowerShellCorpus/Github/mryoho_SIS-AD_Sync/CreateOrUpdateADUsersFromCSV.ps1
CreateOrUpdateADUsersFromCSV.ps1
Import-Module ActiveDirectory #This function checks to see if a user exists. # If it does exist, it updates it's information and moves it to the correct OU # If it does not exist, it creates the user with the correct info and in the correct OU Function CreateOrUpdateUsers($Users) { $Objs =@() #blank array to ho...
PowerShellCorpus/Github/mryoho_SIS-AD_Sync/SAM_AD_Directory_Sync.ps1
SAM_AD_Directory_Sync.ps1
#Set up directories $ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path $CSVsDir = Join-Path -Path $ScriptDir -ChildPath CSVs # Import email settings from config file [xml]$ConfigFile = Get-Content "$ScriptDir\config.xml" # Import Modules Import-Module "$ScriptDir\Modules\join-object.psm1" Import-M...
PowerShellCorpus/Github/mryoho_SIS-AD_Sync/TestWork/eliminate_last_name_suffix.ps1
eliminate_last_name_suffix.ps1
Function EliminateSuffix($LastName) { $temp1 = $LastName.Split(",") If ( $temp1.length -gt 1 ) { $LastName = $temp1[0] } Else { $temp2 = $LastName.Split(" ") If ( $temp2.length -gt 1 ) { $LastName = $temp2[0] } } return $LastName } Function EliminateSuffixForUserSet($Users) { $Objs =@...
PowerShellCorpus/Github/mryoho_SIS-AD_Sync/TestWork/Join_Testing.ps1
Join_Testing.ps1
Function join-object-old($first=@(), $second = $(throw “Please specify a target to join”), $where={$firstItem -eq $secondItem}, $output={$firstItem}) { if(-not $first) { foreach($element in $input) { $first += $element } } foreach($firstItem in $first) { foreach($secondItem in $second) {...
PowerShellCorpus/Github/fitzwop_TimGitTest.lv-lv/.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/chrisism_VSTS.ChocolateyTools/ChocolateyTools/ChocolateyInstallPackage/installpackage.ps1
installpackage.ps1
param ( [string]$packageId, [string]$packageVersion ) $chocoBin = [Environment]::GetEnvironmentVariable("ChocolateyInstall", "Machine") + "\bin" if(-not (Test-Path $chocoBin)) { Write-Output "Environment variable 'ChocolateyInstall' was not found in the system variables. Attempting to find it in the user var...
PowerShellCorpus/Github/chrisism_VSTS.ChocolateyTools/ChocolateyTools/ChocolateyInstalled/installchoco.ps1
installchoco.ps1
param ( [string]$upgradeIfNeeded ) $chocoPath = [Environment]::GetEnvironmentVariable("ChocolateyInstall", "Machine") $isChocoInstalled = Test-Path "$chocoPath\bin\cinst.exe" if (-not $isChocoInstalled) { Write-Host "Downloading and installing Chocolatey" iwr https://chocolatey.org/install.ps1 -UseBasicP...
PowerShellCorpus/Github/travissutton_netapp-powershell/scripts/Get-NcVolumeContents.ps1
Get-NcVolumeContents.ps1
[CmdletBinding()] PARAM ( [parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)] [object]$Controller, [parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)] [string]$Vserver, [parameter(Mandatory=$true,ValueFromPipelineByPropertyNam...
PowerShellCorpus/Github/rodriguesdev_SOLID/SolidPattern/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/rodriguesdev_SOLID/SolidPattern/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/unsalersoz_SlidingConcurrentCache/SlidingConcurrentCache/_CreateNewNuGetPackage/Config.ps1
Config.ps1
#========================================================== # Edit the variable values below to configure how your .nupkg file is packed (i.e. created) and pushed (i.e. uploaded) to the NuGet gallery. # # If you have modified this script: # - if you uninstall the "Create New NuGet Package From Project After Each Bu...
PowerShellCorpus/Github/unsalersoz_SlidingConcurrentCache/SlidingConcurrentCache/_CreateNewNuGetPackage/DoNotModify/UploadNuGetPackage.ps1
UploadNuGetPackage.ps1
#========================================================== # DO NOT EDIT THIS FILE. # If you want to configure how your package is uploaded, modify the Config.ps1 file. # To run this script from inside Visual Studio, right-click on the "RunMeToUploadNuGetPackage.cmd" file and choose "Run". #=======================...
PowerShellCorpus/Github/unsalersoz_SlidingConcurrentCache/SlidingConcurrentCache/_CreateNewNuGetPackage/DoNotModify/New-NuGetPackage.ps1
New-NuGetPackage.ps1
#Requires -Version 2.0 <# .SYNOPSIS Creates a NuGet Package (.nupkg) file from the given Project or NuSpec file, and optionally uploads it to a NuGet Gallery. .DESCRIPTION Creates a NuGet Package (.nupkg) file from the given Project or NuSpec file. Additional parameters may be provided to also upload the ...
PowerShellCorpus/Github/unsalersoz_SlidingConcurrentCache/SlidingConcurrentCache/_CreateNewNuGetPackage/DoNotModify/CreateNuGetPackage.ps1
CreateNuGetPackage.ps1
#========================================================== # DO NOT EDIT THIS FILE. # If you want to configure how your package is created, modify the Config.ps1 file. # # This script is ran automatically after every successful build. # This script creates a NuGet package for the current project, and places the ....
PowerShellCorpus/Github/OPSTest_E2E_Provision_1488778790519/.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/ffeldhaus_posh-s3-client/src/S3-Client.ps1
S3-Client.ps1
# workarounds for PowerShell issues if ($PSVersionTable.PSVersion.Major -lt 6) { Add-Type @" using System.Net; using System.Security.Cryptography.X509Certificates; public class TrustAllCertsPolicy : ICertificatePolicy { public bool CheckValidationResult( Ser...
PowerShellCorpus/Github/rismoney_winkeeper/winkeeper.ps1
winkeeper.ps1
<# .SYNOPSIS winkeeper is like etckeeper for windows .DESCRIPTION stores all your windows configs in a gitrepo takes a single command: [init|gpo|ou|groups|users|sync|all] to turn off push -p $false .PARAMETER command only takes a single command: [init|gpo|ou|groups|users|sync|all] .PARAMETE...
PowerShellCorpus/Github/rismoney_winkeeper/git/gitsync.ps1
gitsync.ps1
function gitsync{ Param( [Parameter(Mandatory=$true)] [bool]$push, [Parameter(Mandatory=$true)] [string]$msg ) pushd $winkeeper_local Invoke-Expression "git checkout $git_branch" Invoke-Expression "git add -A -v" Invoke-Expression "git commit -m `"Auto generated commit for $msg...
PowerShellCorpus/Github/rismoney_winkeeper/git/gitinit.ps1
gitinit.ps1
function gitinit { [CmdletBinding()] Param( [Parameter(Mandatory=$True,Position=1)] [string]$username, [Parameter(Mandatory=$True,Position=2)] [string]$useremail, [Parameter(Mandatory=$True,Position=3)] [string]$remote ) if(!(test-path $winkeeper_local )){ New-Item -ItemTy...