full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/billhay_yacli/CommandLine/_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/billhay_yacli/CommandLine/_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/billhay_yacli/CommandLine/_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_1485767142592/.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/Samikouk_Artifacts/Artifacts/Windows-DomainJoin/DomainJoin.ps1
DomainJoin.ps1
Param( [ValidateNotNullOrEmpty()] [Parameter(Mandatory=$True)] [string] $domain, [ValidateNotNullOrEmpty()] [Parameter(Mandatory=$True)] [securestring] $domainOU, [ValidateNotNullOrEmpty()] [Parameter(Mandatory=$True)] [securestring] $domainUser, [ValidateNotNullOrEmpty...
PowerShellCorpus/Github/TravisEz13_xCredentialManager/Misc/New-xStoredCredential.ps1
New-xStoredCredential.ps1
$Properties = @{ UserTag = New-xDscResourceProperty -Name UserTag -Type String -Attribute Key ` -Description 'A tag uniquely identifying the user to store the credentials for.' UserCredential = New-xDscResourceProperty -Name UserCredential -Type PSCredentia...
PowerShellCorpus/Github/OPSTest_E2E_Provision_1487876741249/.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/reynorbert_JSManukanGrill/JtsManukanGrill/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/reynorbert_JSManukanGrill/JtsManukanGrill/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/MSB365_SendMailPSForm.ps1/SendMailPSForm.ps1
SendMailPSForm.ps1
<# .SYNOPSIS SendMailPSForm.ps1 .DESCRIPTION .PARAMETER .EXAMPLE .\SendMailPSForm.ps1 .NOTES You have to edit the default Body Text before you run the Script (Started from Line 95) Written by: Drago Petrovic .TROUBLENOTES Find me on: * LinkedIn: https://www.linkedin.com/in/dr...
PowerShellCorpus/Github/sayedihashimi_ngit-nuget/build-nugetpackage.ps1
build-nugetpackage.ps1
# This will build the .nupkg for ngit-nuget # nuget.exe must be on the path for this command to work function Get-ScriptDirectory { $Invocation = (Get-Variable MyInvocation -Scope 1).Value Split-Path $Invocation.MyCommand.Path } $pathToNuspec = Join-Path (Get-ScriptDirectory) src\Package.nuspec ...
PowerShellCorpus/Github/zloeber_New-ADPasswordReminder/New-ADPasswordReminder.ps1
New-ADPasswordReminder.ps1
#Requires -Version 2.0 <# .SYNOPSIS Notifies users that their password is about to expire. .DESCRIPTION Let's users know their password will soon expire. Details the steps needed to change their password, and advises on what the password policy requires. Accounts for both standard Default Domain Policy...
PowerShellCorpus/Github/zloeber_New-ADPasswordReminder/ScriptImages/Create-EmbeddedFiles.ps1
Create-EmbeddedFiles.ps1
# Create embeddedable files of all gifs in this directory. Copy this output into the script if you want them to be extracted. $OutFile = 'EncodedFiles.ps1' Get-ChildItem -Path .\ -Recurse -Filter "*.gif" | Foreach { $FileName = $_.Name #$NewFileName = $_.Name -replace '.gif','.txt' $VarName = '$decode_...
PowerShellCorpus/Github/JulienMinato_WxNcee/WebNceeMVC/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/JulienMinato_WxNcee/WebNceeMVC/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/JulienMinato_WxNcee/WebNceeMVC/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/JulienMinato_WxNcee/WebNceeMVC/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/JulienMinato_WxNcee/WebNceeMVC/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/JulienMinato_WxNcee/WebNceeMVC/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/JulienMinato_WxNcee/WebNceeMVC/packages/Microsoft.ApplicationInsights.WindowsServer.2.2.0/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) if ([System.IO.File]::Exists($project.FullName)) { function MarkItemASCopyToOutput($item) { Try { #mark it to copy if newer $item.Properties.Item("CopyToOutputDirectory").Value = 2 } Catch { write-host $_.Exception.ToString() }...
PowerShellCorpus/Github/JulienMinato_WxNcee/WebNceeMVC/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) if ($project.Type -eq 'Web Site') { Import-Module (Join-Path $toolsPath VS.psd1) $srcFiles = Join-Path $installPath "lib\net40\*.dll" $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $destDirec...
PowerShellCorpus/Github/JulienMinato_WxNcee/WebNceeMVC/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Uninstall.ps1
Uninstall.ps1
param($installPath, $toolsPath, $package, $project) if ($project.Type -eq 'Web Site') { Import-Module (Join-Path $toolsPath VS.psd1) $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $binDirectory = Join-Path $projectRoot "bin" $srcDirectory = Join-Path $...
PowerShellCorpus/Github/JulienMinato_WxNcee/WebNceeMVC/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/JulienMinato_WxNcee/WebNceeMVC/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) $roslynSubFolder = 'roslyn' if ($project -eq $null) { $project = Get-Project } $projectRoot = $project.Properties.Item('FullPath').Value $binDirectory = Join-Path $projectRoot 'bin' $targetDirectory = Join-Path $binDirectory $roslynSubFolder if (Te...
PowerShellCorpus/Github/JulienMinato_WxNcee/WebNceeMVC/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) $compilerPackageName = 'Microsoft.Net.Compilers' $roslynSubFolder = 'roslyn' if ($project -eq $null) { $project = Get-Project } $libDirectory = Join-Path $installPath 'lib\net45' $projectRoot = $project.Properties.Item('FullPath').Value $binDirectory...
PowerShellCorpus/Github/thetestpeople_Virtualenv-Bootstap-Script/virtualenv-bootstrap.ps1
virtualenv-bootstrap.ps1
# Make PS stop when something's gone wrong - instead of ploughing on # regardless. Don't ask me when you'd want the default behaviour. $ErrorActionPreference="Stop" # Set some variables # We're going to take the maximum version that matches this pattern $PythonVersionPattern = "2.[67]" $VirtualEnvName = "a...
PowerShellCorpus/Github/kashifatiq_OpticalPointOfSale/OpticalPointOfSale/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/kashifatiq_OpticalPointOfSale/OpticalPointOfSale/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/ruchinmunjal_BatShell/playCsv.ps1
playCsv.ps1
PowerShellCorpus/Github/ruchinmunjal_BatShell/Invoke-Sql.TempPoint.ps1
Invoke-Sql.TempPoint.ps1
<# .NOTES =========================================================================== Created with: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.128 Created on: 2016/10/01 10:49 AM Created by: Ruchin Organization: Filename: =================================================...
PowerShellCorpus/Github/ruchinmunjal_BatShell/SelfinSample.ps1
SelfinSample.ps1
<# .NOTES =========================================================================== Created on: 2016/10/01 11:07 PM Created by: Ruchin Organization: Teen Bhai Filename: SelfinSample =========================================================================== .DESCRIPTION A descripti...
PowerShellCorpus/Github/ruchinmunjal_BatShell/PsPlay.ps1
PsPlay.ps1
Windows PowerShell Copyright (C) 2015 Microsoft Corporation. All rights reserved. Ruchin@DESKTOP-JCEMLBO : ~ : 2016/09/29 6:47:22 PM : > $Profile ise At line:1 char:10 + $Profile ise + ~~~ Unexpected token 'ise' in expression or statement. + CategoryInfo : ParserError: (:) [], ParentCo...
PowerShellCorpus/Github/ruchinmunjal_BatShell/SelfinSample.TempPoint.ps1
SelfinSample.TempPoint.ps1
<# .NOTES =========================================================================== Created with: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.128 Created on: 2016/10/01 11:07 PM Created by: Ruchin Organization: Filename: =================================================...
PowerShellCorpus/Github/ruchinmunjal_BatShell/Invoke-Sql.ps1
Invoke-Sql.ps1
<# .NOTES =========================================================================== Created with: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.128 Created on: 2016/10/01 10:49 AM Created by: Ruchin Organization: Filename: =================================================...
PowerShellCorpus/Github/ruchinmunjal_BatShell/example.ps1
example.ps1
PowerShellCorpus/Github/trident25_VMware/VMInventory.ps1
VMInventory.ps1
$myCreds = Get-Credential Connect-VIServer -Server vcenter01.tsgateway.com -Credential $myCreds $VMs = Get-VM $VMs | Format-List
PowerShellCorpus/Github/OPSTest_E2E_Provision_1484813160423/.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/jaluoto_PSAppDeployToolkit-examples/PSAppDeployToolkit-3.6.8/Flash/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/jaluoto_PSAppDeployToolkit-examples/PSAppDeployToolkit-3.6.8/Flash/Deploy-Settings.ps1
Deploy-Settings.ps1
# --- Name and version information for the application [string]$appVendor = 'Adobe' [string]$appName = 'Flash Player' [string]$appVersion = '21.0.0.213' # Installation code Function Install { Execute-MSI -Action Install -Path 'install_flash_player_plugin.msi' -Transform 'Flash-Non-IE-TUT.mst' # ActiveX-ms...
PowerShellCorpus/Github/jaluoto_PSAppDeployToolkit-examples/PSAppDeployToolkit-3.6.8/Flash/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/jaluoto_PSAppDeployToolkit-examples/PSAppDeployToolkit-3.6.8/Flash/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 v...
PowerShellCorpus/Github/jaluoto_PSAppDeployToolkit-examples/PSAppDeployToolkit-3.6.8/Flash/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/v-peliao_TestForFeature.ca-es/.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/fenxu_fenxu_docs_20160719.hu-hu/.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/mjpeterson_Powershell/Get-Define.ps1
Get-Define.ps1
Param ( [Parameter(Mandatory=$True,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)] $Word ) $url = "https://od-api.oxforddictionaries.com:443/api/v1/entries/en/$($word)" $headers = @{} $headers.Add("app_id", "<your app id>") $headers.Add("app_key","<your app key>") try { $response = Inv...
PowerShellCorpus/Github/OpenLocalizationOrg_PowerShell-Docs_zh-TW/.openpublishing.build.ps1
.openpublishing.build.ps1
param( [string]$buildCorePowershellUrl = "https://opbuildstoragesandbox2.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1", [string]$parameters ) # Main $errorActionPreference = 'Stop' # Step-1 Download buildcore script to local echo "download build core script to local with source ur...
PowerShellCorpus/Github/mbegan_Box-PSModule/box_settings.ps1
box_settings.ps1
$mybox = New-Object System.Collections.Hashtable $mybox.RegBase = "HKCU:\SOFTWARE\boxAPIPSModule" $mybox.OAuthBase = 'https://app.box.com/api' $mybox.ApiBase = 'https://api.box.com/2.0' $mybox.Env = New-Object System.Collections.Hashtable
PowerShellCorpus/Github/jjrdk_ScriptCs.Metrics/tasks.ps1
tasks.ps1
properties { $configuration = "Release" $platform = "Any CPU" $folderPath = ".\" $cleanPackages = $false $oldEnvPath = "" } task default -depends CleanUpMsBuildPath task CleanUpMsBuildPath -depends BuildPackages { if($oldEnvPath -ne "") { Write-Host "Reverting Path variable" $Env:Path = $oldE...
PowerShellCorpus/Github/jjrdk_ScriptCs.Metrics/build.ps1
build.ps1
# Helper script for those who want to run psake without importing the module. # Example: # .\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)] [string]$buil...
PowerShellCorpus/Github/Permuta-Projeto_Code/Permuta/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/Permuta-Projeto_Code/Permuta/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/Permuta-Projeto_Code/Permuta/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/Permuta-Projeto_Code/Permuta/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/Permuta-Projeto_Code/Permuta/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/Permuta-Projeto_Code/Permuta/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/Permuta-Projeto_Code/Permuta/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/Permuta-Projeto_Code/Permuta/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/Permuta-Projeto_Code/Permuta/packages/EntityFramework.6.1.0/tools/init.ps1
init.ps1
param($installPath, $toolsPath, $package, $project) if (Get-Module | ?{ $_.Name -eq 'EntityFramework' }) { Remove-Module EntityFramework } Import-Module (Join-Path $toolsPath EntityFramework.psd1) # SIG # Begin signature block # MIIarwYJKoZIhvcNAQcCoIIaoDCCGpwCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQ...
PowerShellCorpus/Github/Permuta-Projeto_Code/Permuta/packages/EntityFramework.6.1.0/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Initialize-EFConfiguration $project Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' Write-Host Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma...
PowerShellCorpus/Github/Permuta-Projeto_Code/Permuta/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/Permuta-Projeto_Code/Permuta/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/Permuta-Projeto_Code/Permuta/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/oze4_ThreadedMessageBox/Scripts/Close-MessageBox.ps1
Close-MessageBox.ps1
FUNCTION Close-MessageBox { TRY { $Runspace = Get-Runspace -Name "MessageBox" $null = $Runspace.Dispose() $null = $Script:MessageBox.form1.Close() } CATCH { $_ } }
PowerShellCorpus/Github/oze4_ThreadedMessageBox/Scripts/Set-MessageBoxMessage.ps1
Set-MessageBoxMessage.ps1
FUNCTION Set-MessageBoxMessage ($Message) { IF($Script:MessageBox.IsRunning -eq $true) { $Script:MessageBox.textbox1.Text = $Message } }
PowerShellCorpus/Github/oze4_ThreadedMessageBox/Scripts/Add-MessageBoxMessage.ps1
Add-MessageBoxMessage.ps1
FUNCTION Add-MessageBoxMessage ($Message) { IF($Script:MessageBox.IsRunning -eq $true) { $Script:MessageBox.textbox1.Text += $Message } }
PowerShellCorpus/Github/oze4_ThreadedMessageBox/Scripts/Show-MessageBox.ps1
Show-MessageBox.ps1
FUNCTION Show-MessageBox { <# .SYNOPSIS Show a message box on a seperate thread .DESCRIPTION Allows you to show a custom title, and message while another task is running - can also choose to show an OK button, for acknowledgement .PARAMETER Ti...
PowerShellCorpus/Github/rodrigoff_dotCover.xunit.task/dotCoverXunitAnalysis/DotCoverAnalysis.ps1
DotCoverAnalysis.ps1
param ( [string]$searchPattern, [string]$outputDir, [string]$dotCoverTargetExecutable, [string]$dotCoverTargetArguments, [string]$dotCoverFilters, [string]$dotCoverAttributeFilters, [string]$dotCoverAdditionalArgs ) Write-Verbose "Entering script $MyInvocation.MyCommand.Name" Wri...
PowerShellCorpus/Github/OPSTest_E2E_NewRepo_14895464595892/.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/OpenLocalizationOrg_CEO_CE_Stage_PowerBI-Content-pr_de-DE/.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/hem-kant_SelfHosted-Microservice/SelfHostWebApp/packages/Microsoft.ApplicationInsights.WindowsServer.2.2.0/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) if ([System.IO.File]::Exists($project.FullName)) { function MarkItemASCopyToOutput($item) { Try { #mark it to copy if newer $item.Properties.Item("CopyToOutputDirectory").Value = 2 } Catch { write-host $_.Exception.ToString() }...
PowerShellCorpus/Github/hem-kant_SelfHosted-Microservice/SelfHostWebApp/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/hem-kant_SelfHosted-Microservice/SelfHostWebApp/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/hem-kant_SelfHosted-Microservice/SelfHostedMicroService/packages/Newtonsoft.Json.9.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/hem-kant_SelfHosted-Microservice/SelfHostedMicroService/packages/Microsoft.ApplicationInsights.WindowsServer.2.2.0/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) if ([System.IO.File]::Exists($project.FullName)) { function MarkItemASCopyToOutput($item) { Try { #mark it to copy if newer $item.Properties.Item("CopyToOutputDirectory").Value = 2 } Catch { write-host $_.Exception.ToString() }...
PowerShellCorpus/Github/hem-kant_SelfHosted-Microservice/SelfHostedMicroService/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/hem-kant_SelfHosted-Microservice/SelfHostedMicroService/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/xinxiaogang_CSH/UniversalStore.SampleModernTool/SampleWebApp/DeployScripts/CommonWebPreStep.ps1
CommonWebPreStep.ps1
function Prepare-HostFile { $computerName = $env:COMPUTERNAME $computerName = $computerName.substring(0,3) $hostFileName = "HostsFile.xml" $perEnvironmentHostFilePath = Join-Path $invocationPath $computerName+$hostFileName $hostFilePath = Join-Path $invocationPath $hostFileName if (Test-Path $perEnvironment...
PowerShellCorpus/Github/xinxiaogang_CSH/UniversalStore.SampleModernTool/SampleWebApp/DeployScripts/CommonWebLib.ps1
CommonWebLib.ps1
function Reset-IIS { iisreset Init-DeploymentLibrary } function Set-WebConfigurationPropertySafely { param($name, $value, $location, $filter, $psPath) Retry-Script { Set-WebConfigurationProperty -Name $name -Value $value -Location $location -Filter $filter -PSPath $psPath } } function Check-IfWeb...
PowerShellCorpus/Github/xinxiaogang_CSH/UniversalStore.SampleModernTool/SampleWebApp/DeployScripts/CommonWebPostStep.ps1
CommonWebPostStep.ps1
function Grant-HTTPSCertAccess { #Find out the cert that is bound to port 443, i.e. the https one $certsThumbprint = Get-ChildItem IIS:SSLBindings | ? { $_.Port -eq 443 } | % { $_.Thumbprint } $winHttpCertCfgPath = Join-Path $invocationPath "winHttpCertCfg.exe" #In the cert store, find out the ...
PowerShellCorpus/Github/xinxiaogang_CSH/UniversalStore.SampleModernTool/SampleWebApp/DeployScripts/SetupWebSite.ps1
SetupWebSite.ps1
param( [alias("S")][string]$sourcePath="D:\Websites\Tools", [alias("T")][string]$targetPath="D:\Websites\Tools", [alias("WS")][string]$siteName="Tools", [alias("VP")][string]$virtualPathName=$null, [alias("P")][int]$portNumber=443, [alias("CF")][string]$sslCertFilename=$null, [alias("CD")][string]$sslCer...
PowerShellCorpus/Github/xinxiaogang_CSH/UniversalStore.SampleModernTool/SampleWebApp/DeployScripts/CommonLib.ps1
CommonLib.ps1
function Init-DeploymentLibrary { #Fix the bug for powershell 1.0 or 2.0 for output redirection... #http://www.leeholmes.com/blog/2008/07/30/workaround-the-os-handles-position-is-not-what-filestream-expected/ $bindingFlags = [Reflection.BindingFlags] "Instance,NonPublic,GetField" $objectRef = $host.GetType().Ge...
PowerShellCorpus/Github/xinxiaogang_CSH/UniversalStore.SampleModernTool/SampleWebApp/Tools/CommonWebPreStep.ps1
CommonWebPreStep.ps1
function Prepare-HostFile { $computerName = $env:COMPUTERNAME $computerName = $computerName.substring(0,3) $hostFileName = "HostsFile.xml" $perEnvironmentHostFilePath = Join-Path $invocationPath $computerName+$hostFileName $hostFilePath = Join-Path $invocationPath $hostFileName if (Test-Path $perEnvironment...
PowerShellCorpus/Github/xinxiaogang_CSH/UniversalStore.SampleModernTool/SampleWebApp/Tools/CommonWebLib.ps1
CommonWebLib.ps1
function Reset-IIS { iisreset Init-DeploymentLibrary } function Set-WebConfigurationPropertySafely { param($name, $value, $location, $filter, $psPath) Retry-Script { Set-WebConfigurationProperty -Name $name -Value $value -Location $location -Filter $filter -PSPath $psPath } } function Check-IfWeb...
PowerShellCorpus/Github/xinxiaogang_CSH/UniversalStore.SampleModernTool/SampleWebApp/Tools/Post_Install.ps1
Post_Install.ps1
Write-Host 'Running Post_Install.ps1 ...' function Retry-Script { param($scriptBlock, $numOfTry=3, $sleepInSeconds=1) $errorCount = $error.Count $failed = $true for ($i=0; ($failed) -and ($i -lt $numOfTry); $i++) { try { invoke-expression -command "$scriptBlock" $failed = $false } catch [Sy...
PowerShellCorpus/Github/xinxiaogang_CSH/UniversalStore.SampleModernTool/SampleWebApp/Tools/CommonWebPostStep.ps1
CommonWebPostStep.ps1
function Grant-HTTPSCertAccess { #Find out the cert that is bound to port 443, i.e. the https one $certsThumbprint = Get-ChildItem IIS:SSLBindings | ? { $_.Port -eq 443 } | % { $_.Thumbprint } $winHttpCertCfgPath = Join-Path $invocationPath "winHttpCertCfg.exe" #In the cert store, find out the ...
PowerShellCorpus/Github/xinxiaogang_CSH/UniversalStore.SampleModernTool/SampleWebApp/Tools/SetupWebSite.ps1
SetupWebSite.ps1
param( [alias("S")][string]$sourcePath="D:\Websites\Tools", [alias("T")][string]$targetPath="D:\Websites\Tools", [alias("WS")][string]$siteName="Tools", [alias("VP")][string]$virtualPathName=$null, [alias("P")][int]$portNumber=443, [alias("CF")][string]$sslCertFilename=$null, [alias("CD")][string]$sslCer...
PowerShellCorpus/Github/xinxiaogang_CSH/UniversalStore.SampleModernTool/SampleWebApp/Tools/CommonLib.ps1
CommonLib.ps1
function Init-DeploymentLibrary { #Fix the bug for powershell 1.0 or 2.0 for output redirection... #http://www.leeholmes.com/blog/2008/07/30/workaround-the-os-handles-position-is-not-what-filestream-expected/ $bindingFlags = [Reflection.BindingFlags] "Instance,NonPublic,GetField" $objectRef = $host.GetType().Ge...
PowerShellCorpus/Github/aaspnas_DevTalksDemo16/Scripts/ContainerScripts/AppSetup.ps1
AppSetup.ps1
# # AppSetup.ps1 # ## Script usable for retreiving application package from ## github and extracting on server or in container. ## $BackUpPath = “C:\temp\master.zip” $Destination = “C:\temp\wwwroot” Add-Type -assembly “system.io.compression.filesystem” cd C:\ if (test-path .\temp) { cd temp del .\master....
PowerShellCorpus/Github/aaspnas_DevTalksDemo16/Scripts/ContainerScripts/Get-ContanerIpAddress.ps1
Get-ContanerIpAddress.ps1
# # Get-ContainerIPAddress.ps1 # param ($containerName, $IpaddressType) function Get-ContainerIPAddress ($ContainerName = "*", $IpaddressType = "*") { foreach ($c in get-container | where {$_.State -eq "Running" -and $_.Name -like $ContainerName}) { $ip = Invoke-Command -ContainerName $c.Name -Scr...
PowerShellCorpus/Github/aaspnas_DevTalksDemo16/Scripts/ContainerScripts/ContainerHostSetup.ps1
ContainerHostSetup.ps1
# # ContaninerHostSetup.ps1 # ## Script for setting up containers on win 2016 TP 4 param ($name) if ((get-windowsfeature -Name containers).InstallState -ne "Installed" ) { Add-WindowsFeature -Name containers -Restart } else { if (( get-vmswitch | where {$_.Name -eq "Virtual Switch"}) -eq $null) { New-VMS...
PowerShellCorpus/Github/aaspnas_DevTalksDemo16/Scripts/ContainerScripts/Demo.ps1
Demo.ps1
# # Demo.ps1 # Sample commands for manageing containers on windows # ## ## Powershell container management # Get-container New-Container -Name $name -ContainerImageName WindowsServerCore -SwitchName "Virtual Switch" Start-Container -Name $name Enter-PSSession -ContainerName $name -RunAsAdministrator ...
PowerShellCorpus/Github/aaspnas_DevTalksDemo16/Scripts/ContainerScripts/DockerSetup.ps1
DockerSetup.ps1
# # Script1.ps1 # wget https://aka.ms/tp4/docker -OutFile $env:SystemRoot\system32\docker.exe cd C:\ProgramData\ mkdir docker cd .\docker\ $script = @" @echo off set certs=%ProgramData%\docker\certs.d if exist %ProgramData%\docker (goto :run) mkdir %ProgramData%\docker :run if exist %certs%\server-ce...
PowerShellCorpus/Github/samuel1215_AzureLab/WaitLabReady.ps1
WaitLabReady.ps1
Param( [parameter(Mandatory=$true)] [string] $LabCSVFilePath ) $Servers = Import-Csv $LabCSVFilePath foreach ($Server in $Servers) { do { Sleep 30 } while((Get-AzureVM -ServiceName $Server.ServiceName -Name $Server.Name).Status -ne "ReadyRole") }
PowerShellCorpus/Github/samuel1215_AzureLab/StopLab.ps1
StopLab.ps1
Param( [parameter(Mandatory=$true)] [string] $LabCSVFilePath ) $Servers = Import-Csv $LabCSVFilePath for($i=$Servers.length-1;$i -ge 0;$i--) { Get-AzureVM -ServiceName $Servers[$i].ServiceName -Name $Servers[$i].Name | Stop-AzureVM -Force }
PowerShellCorpus/Github/samuel1215_AzureLab/SetStaticVNetIP.ps1
SetStaticVNetIP.ps1
Get-AzureVM -ServiceName studyrootdc | Set-AzureStaticVNetIP -IPAddress '192.168.0.132' | Update-AzureVM Get-AzureVM -ServiceName qmmfit | Set-AzureStaticVNetIP -IPAddress '192.168.0.133' | Update-AzureVM Get-AzureVM -ServiceName studye14dc2 | Set-AzureStaticVNetIP -IPAddress '192.168.0.134' | Update-AzureVM Get-Azu...
PowerShellCorpus/Github/samuel1215_AzureLab/StartLab.ps1
StartLab.ps1
Param( [parameter(Mandatory=$true)] [string] $LabCSVFilePath ) $Servers = Import-Csv $LabCSVFilePath $StartedVM_Begin = 0 $StartedVM_Current = 0 foreach ($Server in $Servers) { .\StartVM.ps1 -ServiceName $Server.ServiceName -Name $Server.Name if($Server.WaitForPastReady -eq "y") { ...
PowerShellCorpus/Github/samuel1215_AzureLab/StartVM.ps1
StartVM.ps1
Param( [parameter(Mandatory=$true)] [string] $ServiceName, [parameter(Mandatory=$true)] [string] $Name ) $op = Start-AzureVM -ServiceName $ServiceName -Name $Name $toString = $op.OperationId + ":" + $op.OperationStatus + ":" + $Name $toString
PowerShellCorpus/Github/samuel1215_AzureLab/Main.ps1
Main.ps1
cd C:\Workspace\MMAD\PowerShell\ ipmo azure Import-AzurePublishSettingsFile -PublishSettingsFile .\MMAD.publishsettings $uri = Get-AzureVM -ServiceName sapsan2k12 -Name sapsan2k12 | Get-AzureWinRMUri Set-ExecutionPolicy Unrestricted .\InstallWinRMCertAzureVM.ps1 -SubscriptionName "Migration Manager for Active Di...
PowerShellCorpus/Github/samuel1215_AzureLab/InstallWinRMCertAzureVM.ps1
InstallWinRMCertAzureVM.ps1
<# .SYNOPSIS Downloads and installs the certificate created or initially uploaded during creation of a Windows based Windows Azure Virtual Machine. .DESCRIPTION Downloads and installs the certificate created or initially uploaded during creation of a Windows based Windows Azure Virtual Machine. Running this ...
PowerShellCorpus/Github/samuel1215_AzureLab/ExecuteSuite.ps1
ExecuteSuite.ps1
Param( [parameter(Mandatory=$true)] [string] $Uri ) [System.Net.ServicePointManager]::MaxServicePointIdleTime = 30*60*1000 $request = [System.Net.HttpWebRequest][System.Net.WebRequest]::Create($Uri) $request.Method = "Get" $request.KeepAlive = $true $request.Timeout = 30*60*1000 $request.ReadW...