full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/OPS-E2E-Prod_E2E_P_D_NewRepo_2017_5_27_8_44_37/.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/OPS-E2E-PPE_E2E_D_NewRepo_2017_5_9_23_59_17/.openpublishing.build.ps1
.openpublishing.build.ps1
param( [string]$buildCorePowershellUrl = "https://opbuildstorageprod.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1", [string]$parameters ) # Main $errorActionPreference = 'Stop' # Step-1: Download buildcore script to local echo "download build core script to local with source url: ...
PowerShellCorpus/Github/dchristian3188_DemoWorkingWithPlaster/Demo.ps1
Demo.ps1
$baseDir = 'C:\github\DemoWorkingWithPlaster' $outPutDir = Join-Path -Path $baseDir -ChildPath Output # Install Latest Version Find-Module -Name Plaster -Repository PSGallery | Install-Module -Verbose -Force Function Reset-Workspace { Remove-Item -Path $outPutDir -Recurse -Force -ErrorAction Silentl...
PowerShellCorpus/Github/dchristian3188_DemoWorkingWithPlaster/Module/basicTest.ps1
basicTest.ps1
$moduleRoot = Resolve-Path "$PSScriptRoot\.." $moduleName = Split-Path $moduleRoot -Leaf Describe "General project validation: $moduleName" { $scripts = Get-ChildItem $moduleRoot -Include *.ps1, *.psm1, *.psd1 -Recurse # TestCases are splatted to the script so we need hashtables $testCase = $scri...
PowerShellCorpus/Github/dchristian3188_DemoWorkingWithPlaster/Function/testsTemplate.ps1
testsTemplate.ps1
Describe xxModuleNamexx { It "Needs to have real tests" { $true | Should be $true } }
PowerShellCorpus/Github/dchristian3188_DemoWorkingWithPlaster/Function/functionTemplate.ps1
functionTemplate.ps1
<% "function $PLASTER_PARAM_FunctionName" %> { <% If ($PLASTER_PARAM_Help -eq 'Yes') { @" <# .Synopsis Short description .DESCRIPTION Long description .EXAMPLE Example of how to use this cmdlet #> "@ } %> <% if ($PLASTER_PARAM_CmdletBinding -...
PowerShellCorpus/Github/rohnedwards_Summit2016Demos/AdvancedParameterCompletion/01_ValidateSet.ps1
01_ValidateSet.ps1
return #region Very simple static ValidateSet() function Show-StaticValidateSetExample { [CmdletBinding()] param( [ValidateSet('Folder1', 'Folder2', 'Folder3')] [string[]] $FolderName ) $PSBoundParameters } #endregion #region Simple dynamic ValidateSet() # What if you d...
PowerShellCorpus/Github/rohnedwards_Summit2016Demos/AdvancedParameterCompletion/03_Improve_Get-Command.ps1
03_Improve_Get-Command.ps1
return # Get-Command is an awesome cmdlet, but I don't like how some of the parameters aren't # completed and/or if they are, they aren't always filtered based on other parameters # that have been defined on the command line. That's OK, though, because custom completers # can be registerd to override any command'...
PowerShellCorpus/Github/rohnedwards_Summit2016Demos/AdvancedParameterCompletion/02_Argument_Completer_Intro.ps1
02_Argument_Completer_Intro.ps1
return #region Your first argument completer #region Notes # Argument completers are actually quite simple. You associate a scriptblock with # a parameter and a command (the command name is actually optional, and excluding # it means that any parameter with that name that doesn't have another # command/par...
PowerShellCorpus/Github/rohnedwards_Summit2016Demos/AdvancedParameterCompletion/07_Accessing_Internal_Module_Members.ps1
07_Accessing_Internal_Module_Members.ps1
return # For v5, you can bind the argument completer scriptblock to a module's scope so it # has direct access to the module's internal commands/variables. With TabExpansionPlusPlus, # you can try that, but it will remove the binding when it binds the scriptblock to it's # module scope so you can use its helper f...
PowerShellCorpus/Github/rohnedwards_Summit2016Demos/AdvancedParameterCompletion/04_Native_Completer.ps1
04_Native_Completer.ps1
return #region Notes # 'Native' completers are usually used for external, non-PowerShell commands, such # as net.exe, ipconfig.exe, etc. You'll notice immediately that the completer # scriptblock doesn't get the same parameters passed to it as a 'normal' completer. # # Three parameters are passed to a native c...
PowerShellCorpus/Github/rohnedwards_Summit2016Demos/AdvancedParameterCompletion/06_Abusing_Native_Completers.ps1
06_Abusing_Native_Completers.ps1
return #region Notes # Native completers provide a way to register a single completer for all function # parameters (even parameters that aren't defined). The only problem, besides the # fact that this probably isn't what native completers were intended to do, is # that it doesn't give you the same information...
PowerShellCorpus/Github/rohnedwards_Summit2016Demos/AdvancedParameterCompletion/05_Demo_Completion_Order.ps1
05_Demo_Completion_Order.ps1
return #region Precedence for argument completers: # # 1. ValidateSet/Enumeration # 2. Normal argument completer registered with command and parameter names # 2a. Lookup is performed for command/parameter name combo # 2b. If combo isn't found, lookup is performed with just parameter name # 3. [A...
PowerShellCorpus/Github/rohnedwards_Summit2016Demos/ModulesWithMetaProgramming/03d_add_attached_property_parameter_completion.ps1
03d_add_attached_property_parameter_completion.ps1
return #region Notes # # This functions just like the previous example, but we're going to use a 'Native' argument completer to # try to mimic Intellisense for attached properties (I'm not promising this is a good idea) # #endregion #region Build dynamic module $WpfModuleWithAttachedProperties = New-Modul...
PowerShellCorpus/Github/rohnedwards_Summit2016Demos/ModulesWithMetaProgramming/03c_add_attached_properties.ps1
03c_add_attached_properties.ps1
return #region Notes # # Let's think about the problem: We need to be able to pass parameters like -Grid.Row with a value. For now let's assume # there's no easy way to know which commands will allow which parameters, so using DynamicParam {} to create parameters # is out. # # First, if you knew you wanted ...
PowerShellCorpus/Github/rohnedwards_Summit2016Demos/ModulesWithMetaProgramming/03a_simple_wpf_module.ps1
03a_simple_wpf_module.ps1
return #region Notes # # This takes the same concept as earlier, except no DSL is necessary because we'll use # reflection to figure out valid parameters and what to do with them # #endregion #region Build dynamic module $SimpleWpfModule = New-Module -Name SimpleWpfModule -ScriptBlock { $__CommandNam...
PowerShellCorpus/Github/rohnedwards_Summit2016Demos/ModulesWithMetaProgramming/01_creating_multiple_commands_from_the_same_scriptblock.ps1
01_creating_multiple_commands_from_the_same_scriptblock.ps1
return #region Dynamic commands won't be visible outside of the module if they're created after module import time $DynamicModule = New-Module -Name DynamicCommand -ScriptBlock { # Dynamic commands will share this definition: $ReferenceCommand = { [CmdletBinding()] param( ) ...
PowerShellCorpus/Github/rohnedwards_Summit2016Demos/ModulesWithMetaProgramming/03b_simple_wpf_module_with_variables.ps1
03b_simple_wpf_module_with_variables.ps1
return # Building on the previous WPF example, let's make it so the -Name parameter automatically # assigns the WPF elements to a variable. We don't want to pollute the global scope, so # let's create a new dynamic module for each Window (this assumes that the only root # element you'll ever use with this module ...
PowerShellCorpus/Github/rohnedwards_Summit2016Demos/ModulesWithMetaProgramming/02_cim_commands.ps1
02_cim_commands.ps1
return #region Notes # # This script will create a module that allows the creation of commands that can generate # and run dynamic WQL against other computers. It has something that might be called a # domain specific language that looks like this: # # CimCommand Get-CimService { # CimParameter s...
PowerShellCorpus/Github/jwenz723_inContactPerfmonPulsePlugin/get-counters.ps1
get-counters.ps1
$error.Clear() # Credentials for posting metrics into Pulse $pair = "jwenz723@gmail.com:59247fb2-727c-45e2-a2a2-e35f66f80b3a" $bytes = [System.Text.Encoding]::ASCII.GetBytes($pair) $base64 = [System.Convert]::ToBase64String($bytes) $basicAuthValue = "Basic $base64" # Get the path to the param.json file $scri...
PowerShellCorpus/Github/hellosnow_simple_doc/.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/sreal_ducking-bear-tools/remote-install/release-tools.ps1
release-tools.ps1
<# .SYNOPSIS Script method wrapped the required methods for the automated tools. .DESCRIPTION ./release-tools.ps1 is the wrapper script vcalled by the automated release processes. On the build server, it wraps the calls that move a packaged release to the management gateway box and then into the release environm...
PowerShellCorpus/Github/sreal_ducking-bear-tools/site-tools/site-tools.ps1
site-tools.ps1
## # . ./site_tools.ps1 # sre, 2012-12-24 # # ./Backup-Database -Config-File CONFIG.XML # ./Backup-Folder -Config-File CONFIG.XML # # Requirements: PowerShell v3 [PSScheduledJob] Function Restore-Folder { [CmdletBinding()] Param( [Parameter(Mandatory=$true)][String] $ConfigFile, [Parameter(Mandator...
PowerShellCorpus/Github/sreal_ducking-bear-tools/site-tools/ps-internal-wrapper.ps1
ps-internal-wrapper.ps1
Function Check-Handle-Regex { Param ( [string] $regex ) $handle = D:\apps\sysinternals.bin\handle.exe foreach ($line in $handle) { if ($line -match '\S+\spid:') { $exe = $line } elseif ($line -match $regex) { "$exe - $line" } } }
PowerShellCorpus/Github/sreal_ducking-bear-tools/site-tools/execute_test_script.ps1
execute_test_script.ps1
Clear-Host Write-Host Dot Loading Site-Tools.ps1. -fore Gray . D:\AdminScripts\site-tools.ps1 #. C:\projects\projects-current\site-tools\site-tools.ps1 Write-Host Generating Scheduled Tasks -fore Gray Create-Schedule -ConfigFile "D:\AdminScripts\site-tools-config\raaf-stage.xml" #-Verbose Create-Sched...
PowerShellCorpus/Github/jrillo_MiscScripts/OrderHandlingScript/Start-DellOrderSync.ps1
Start-DellOrderSync.ps1
<# .SYNOPSIS This script queries Dell's site to find all orders. It then parses through these orders to find only new or changed orders since the last download. It then syncs any new or changed orders in Sharepoint. .PARAMETER SpSiteUrl The Sharepoint site url to query and modify Sharepoint orders .PARAMET...
PowerShellCorpus/Github/jrillo_MiscScripts/PLCScript/New-ModPollScheduledTask.ps1
New-ModPollScheduledTask.ps1
#Requires -Version 4 <# .NOTES Created on: 12/9/2014 Created by: Adam Bertram Filename: New-ModPollScheduledTask.ps1 #> [CmdletBinding()] param ( [ValidateScript({ if (!(Test-Path -Path $_ -PathType Leaf)) { throw "Send-Modpoll.ps1 cannot be found at ...
PowerShellCorpus/Github/jrillo_MiscScripts/PLCScript/Start-ModPollMonitor.ps1
Start-ModPollMonitor.ps1
#Requires -Version 4 <# .NOTES Created on: 10/8/2014 Created by: Adam Bertram Filename: Start-ModPollMonitor.ps1 Requirements: Share permissions for Everyone on destination share The source computer account Modify NTFS rights on destination folder .P...
PowerShellCorpus/Github/jrillo_MiscScripts/PLCScript/Send-ModPoll.ps1
Send-ModPoll.ps1
#Requires -Version 4 <# .NOTES Created on: 12/9/2014 Created by: Adam Bertram Filename: Send-ModPoll.ps1 .PARAMETER ModPollFilePath The file path where the modpoll.exe file is located .PARAMETER LogFilePath The file path to the log file that's generated wit...
PowerShellCorpus/Github/angelosanramon_packer/windows2k12r2/wsus.ps1
wsus.ps1
# Script: WSUS.ps1 # Author: Gregory Strike # Website: www.GregoryStrike.com # Date: 02-19-2010 # Information: This script was adapated from the WUA_SearchDownloadInstall.vbs VBScript from Microsoft. It uses the # Microsoft.Update.Session COM object to query a WSUS server, find a...
PowerShellCorpus/Github/angelosanramon_packer/windows2k12r2/postinstall.ps1
postinstall.ps1
# Enable Remote Desktop Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server' -Name fDenyTSConnections -Value 0 Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name UserAuthentication -Value 1 netsh advfirewall firewall add rule name="Rem...
PowerShellCorpus/Github/angelosanramon_packer/windows10/wsus.ps1
wsus.ps1
# Script: WSUS.ps1 # Author: Gregory Strike # Website: www.GregoryStrike.com # Date: 02-19-2010 # Information: This script was adapated from the WUA_SearchDownloadInstall.vbs VBScript from Microsoft. It uses the # Microsoft.Update.Session COM object to query a WSUS server, find a...
PowerShellCorpus/Github/angelosanramon_packer/windows10/postinstall.ps1
postinstall.ps1
# Enable Remote Desktop Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server' -Name fDenyTSConnections -Value 0 Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name UserAuthentication -Value 1 netsh advfirewall firewall add rule name="Rem...
PowerShellCorpus/Github/RonFields72_Ron.ContosoUniversity/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/RonFields72_Ron.ContosoUniversity/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/RonFields72_Ron.ContosoUniversity/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/RonFields72_Ron.ContosoUniversity/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/RonFields72_Ron.ContosoUniversity/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/RonFields72_Ron.ContosoUniversity/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/RonFields72_Ron.ContosoUniversity/PublishScripts/Publish-WebApplicationWebsite.ps1
Publish-WebApplicationWebsite.ps1
#Requires -Version 3.0 <# .SYNOPSIS Creates and deploys a Windows Azure Web Site for a Visual Studio web project. For more detailed documentation go to: http://go.microsoft.com/fwlink/?LinkID=394471 .EXAMPLE PS C:\> .\Publish-WebApplicationWebSite.ps1 ` -Configuration .\Configurations\WebApplication1-WAWS-d...
PowerShellCorpus/Github/kimizhu_77716test/.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/PrateekKumarSingh_PSSnake/Invoke-Snake.ps1
Invoke-Snake.ps1
Function Invoke-Snake() { #Calling the Assemblies [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing.graphics") #Create the Conatainer Form to place the Labels and Tex...
PowerShellCorpus/Github/PrateekKumarSingh_PSSnake/new.ps1
new.ps1
Function Invoke-Snake() { #Calling the Assemblies [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing.graphics") #Create the Conatainer Form to place the Labels and Tex...
PowerShellCorpus/Github/rstropek_DockerVS2015Intro/dockerDemos/07-win-container-nano-server/connect-nano-server.ps1
connect-nano-server.ps1
Import-Module Hyper-V net start WinRM $computerName = "Simple Nano Server" $vm = Get-VM -Name $computerName $vmIP = (Get-VMNetworkAdapter $vm)[0].IPAddresses[0] Set-Item WSMan:\localhost\Client\TrustedHosts $vmIP -Force $cred = Get-Credential $session = New-PSSession -ComputerName $vmIP -Credential $cred ...
PowerShellCorpus/Github/rstropek_DockerVS2015Intro/dockerDemos/07-win-container-nano-server/setup-nano-docker-server.ps1
setup-nano-docker-server.ps1
# For details see https://technet.microsoft.com/en-us/library/mt126167.aspx Import-Module Hyper-V # Location where the Windows Server 2016 ISO is mounted. We will copy the # Nano Server Image Generator from there. $winServerInstallRoot = "d:\" $temp = "c:\temp" $nanoServerImageGeneratorFolder = "$temp\NanoSer...
PowerShellCorpus/Github/rstropek_DockerVS2015Intro/dockerDemos/07-win-container-nano-server/setup-simple-nano-server.ps1
setup-simple-nano-server.ps1
# Location where the Windows Server 2016 ISO is mounted. # We will copy the Nano Server Image Generator from there. $winServerInstallRoot = "d:\" $temp = "c:\temp" $nanoServerImageGeneratorFolder = "$temp\NanoServerImageGenerator" $targetPath = $temp + "\demo\NanoServerVM.vhd" $computerName = "mynanoserver" $se...
PowerShellCorpus/Github/rstropek_DockerVS2015Intro/dockerDemos/00-AzureARM/Deploy-AzureResourceGroup.ps1
Deploy-AzureResourceGroup.ps1
# Note that this script needs PuTTY and openssl. You might # need to change the paths according to your setup $putty = "C:\ProgramData\chocolatey\lib\putty.portable\tools" $openssl = "C:\Program Files\OpenSSL\bin\openssl.exe" $scriptRoot = $PSScriptRoot # "C:\Code\github\DockerVS2015Intro\dockerDemos\00-AzureARM" ...
PowerShellCorpus/Github/powerline_fonts/install.ps1
install.ps1
<# .SYNOPSIS Installs the provided fonts. .DESCRIPTION Installs all the provided fonts by default. The FontName parameter can be used to pick a subset of fonts to install. .EXAMPLE C:\PS> ./install.ps1 Installs all the fonts located in the Git repository. .EXAMPLE C:\PS> ./install.ps1...
PowerShellCorpus/Github/matthewhatch_Knife/knife.Tests.ps1
knife.Tests.ps1
Import-Module ./knife.psm1 -Force Describe 'Get-ChefNode'{ Mock -CommandName _knifenodeshow -ModuleName Knife { $return = @" Node Name: node1 Environment: mockprod FQDN: johndscx04.corp.fmglobal.com IP: 22.2.1.233 Run List: role[webserver] Roles: webserver Recipes: d...
PowerShellCorpus/Github/ozmn90_eTicaretKitap/eticaret/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/ozmn90_eTicaretKitap/eticaret/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/jplane_Node-Ch9/Service Fabric/Application1/Scripts/Deploy-FabricApplication.ps1
Deploy-FabricApplication.ps1
<# .SYNOPSIS Deploys a Service Fabric application type to a cluster. .DESCRIPTION This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. .NOTES WARNING: This script file is invoked by Visual Studio. Its paramet...
PowerShellCorpus/Github/proxa_Molly/molly.ps1
molly.ps1
# Molly's Laptop Setup Checklist # Version 0.0.2 # Blake Bartenbach $version = '0.0.3' function init { write-host "[Molly's Laptop Setup Checklist $version]" -foregroundcolor "yellow" write-host "" } function apply-Power-Settings { write-host "[Setting High Performance Power Scheme]" -foregroundcolor...
PowerShellCorpus/Github/serhatakinci_Test-FirstRepo/Test-FirstRepo.ps1
Test-FirstRepo.ps1
# # Serhat AKINCI # gwmi Win32_OperatingSystem
PowerShellCorpus/Github/Jeffroiscool_AnimeLinkGrabber/GetAnimeLinks/_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/Jeffroiscool_AnimeLinkGrabber/GetAnimeLinks/_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/Jeffroiscool_AnimeLinkGrabber/GetAnimeLinks/_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/Jeffroiscool_AnimeLinkGrabber/GetAnimeLinks/_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/cheeleongzz_multipathchanger/Datastore_MPP_Changer.ps1
Datastore_MPP_Changer.ps1
#requires -Modules VMware.VimAutomation.Core write-host "Modules VMware.VimAutomation.Core Loaded!!" # Style of the Report in Css $css=”<style> body { font-family: Verdana, sans-serif; font-size: 14px; color: #666666; background: #FEFEFE; border-width: 1px; border-style: solid; border-color: black; } #ti...
PowerShellCorpus/Github/rilana_Test/EPiServerSite4/packages/EPiServer.Packaging.3.2.2/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) $global:EPiServerPackagingScripts = Join-Path $toolsPath "Modules" $projectPath = Split-Path -Parent $project.FullName Import-Module (Join-Path $toolsPath "Modules\Install.psm1") Update-EPiServerSite $installPath $toolsPath $projectPath Remove-Module...
PowerShellCorpus/Github/rilana_Test/EPiServerSite4/packages/EPiServer.Packaging.3.2.2/tools/Init.ps1
Init.ps1
param($installPath, $toolsPath, $package) $global:EPiServerPackagingScripts = Join-Path $toolsPath "Modules" # expose the Move-EPiServerProtectedModules cmdlet Import-Module (Join-Path $toolsPath "Modules\Init.psm1") VerifyProtectedModulePath # SIG # Begin signature block # MIIZBwYJKoZIhvcNAQcCoIIY+DC...
PowerShellCorpus/Github/rilana_Test/EPiServerSite4/packages/EPiServer.CMS.8.8.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) #import Module Import-Module (Join-Path (join-path $installPath "tools") EPiServer.Cms.psm1) $projectFilePath = Get-ChildItem $project.Fullname $sitePath = $projectFilePath.Directory.FullName $WebConfigFile = GetWebConfigPath $sitePath $epiConnection...
PowerShellCorpus/Github/rilana_Test/EPiServerSite4/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/rilana_Test/EPiServerSite4/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/rilana_Test/EPiServerSite4/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/rilana_Test/EPiServerSite4/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/rilana_Test/EPiServerSite4/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/rilana_Test/EPiServerSite4/packages/EPiServer.CMS.Core.8.8.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) $fxPackage = Get-package | where-object { $_.id -eq "EPiServer.Framework"} | Sort-Object -Property Version -Descending | select-object -first 1 $cmsPackage = Get-package | where-object { $_.id -eq "EPiServer.Core"} | Sort-Object -Property Version -Descending| sele...
PowerShellCorpus/Github/rilana_Test/EPiServerSite4/packages/EPiServer.CMS.Core.8.8.0/tools/AssemblyRedirects.ps1
AssemblyRedirects.ps1
param($installPath, $toolsPath, $package, $project) ## ## Inserts a new or updates an existing dependentAssembly element for a specified assembly ## Function AddOrUpdateBindingRedirect([System.IO.FileInfo] $file, [System.Xml.XmlElement[]] $assemblyConfigs, [System.Xml.XmlDocument] $config) { $name = [System...
PowerShellCorpus/Github/rilana_Test/EPiServerSite4/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/rilana_Test/EPiServerSite4/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/rilana_Test/EPiServerSite4/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/rilana_Test/EPiServerSite4/packages/Newtonsoft.Json.5.0.8/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/rilana_Test/EPiServerSite4/packages/EPiServer.Logging.Log4Net.1.0.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) ## ## Inserts a new or updates an existing dependentAssembly element for a specified assembly ## Function AddOrUpdateBindingRedirect([System.IO.FileInfo] $file, [System.Xml.XmlElement[]] $assemblyConfigs, [System.Xml.XmlDocument] $config) { $name = [System...
PowerShellCorpus/Github/rilana_Test/EPiServerSite4/packages/EPiServer.CMS.UI.Core.8.2.2/tools/Install.ps1
Install.ps1
param ($installPath, $toolsPath, $package, $project) Import-Module (Join-Path $toolsPath "Get-ProtectedModulesPath.psm1") Import-Module (Join-Path $toolsPath "Get-WebConfig.psm1") Import-Module (Join-Path $toolsPath "Remove-Assembly.psm1") Import-Module (Join-Path $toolsPath "Update-PackagesConfig.psm1") Import-...
PowerShellCorpus/Github/rilana_Test/EPiServerSite4/packages/EPiServer.Framework.8.8.0/tools/init.ps1
init.ps1
param($installPath, $toolsPath, $package, $project) Import-Module (join-path $toolsPath "upgrade.psm1") -ArgumentList $installPath # SIG # Begin signature block # MIIZDwYJKoZIhvcNAQcCoIIZADCCGPwCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR # AgEAAgEAAgEAAgEAAg...
PowerShellCorpus/Github/rilana_Test/EPiServerSite4/packages/EPiServer.Framework.8.8.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) ## ## Inserts a new or updates an existing dependentAssembly element for a specified assembly ## Function AddOrUpdateBindingRedirect([System.IO.FileInfo] $file, [System.Xml.XmlElement[]] $assemblyConfigs, [System.Xml.XmlDocument] $config) { $name = [System...
PowerShellCorpus/Github/rilana_Test/EPiServerSite4/packages/EPiServer.Search.7.7.1/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Write-Host 'Importing Search.psm1' import-Module (join-path $toolsPath "Search.psm1") Add-EPiBindingRedirect $installPath $project Set-EPiBaseUri $project # SIG # Begin signature block # MIIZDwYJKoZIhvcNAQcCoIIZADCCGPwCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB...
PowerShellCorpus/Github/rilana_Test/EPiServerSite3/packages/EPiServer.Packaging.3.2.2/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) $global:EPiServerPackagingScripts = Join-Path $toolsPath "Modules" $projectPath = Split-Path -Parent $project.FullName Import-Module (Join-Path $toolsPath "Modules\Install.psm1") Update-EPiServerSite $installPath $toolsPath $projectPath Remove-Module...
PowerShellCorpus/Github/rilana_Test/EPiServerSite3/packages/EPiServer.Packaging.3.2.2/tools/Init.ps1
Init.ps1
param($installPath, $toolsPath, $package) $global:EPiServerPackagingScripts = Join-Path $toolsPath "Modules" # expose the Move-EPiServerProtectedModules cmdlet Import-Module (Join-Path $toolsPath "Modules\Init.psm1") VerifyProtectedModulePath # SIG # Begin signature block # MIIZBwYJKoZIhvcNAQcCoIIY+DC...
PowerShellCorpus/Github/rilana_Test/EPiServerSite3/packages/EPiServer.CMS.8.8.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) #import Module Import-Module (Join-Path (join-path $installPath "tools") EPiServer.Cms.psm1) $projectFilePath = Get-ChildItem $project.Fullname $sitePath = $projectFilePath.Directory.FullName $WebConfigFile = GetWebConfigPath $sitePath $epiConnection...
PowerShellCorpus/Github/rilana_Test/EPiServerSite3/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/rilana_Test/EPiServerSite3/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/rilana_Test/EPiServerSite3/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/rilana_Test/EPiServerSite3/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/rilana_Test/EPiServerSite3/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/rilana_Test/EPiServerSite3/packages/EPiServer.CMS.Core.8.8.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) $fxPackage = Get-package | where-object { $_.id -eq "EPiServer.Framework"} | Sort-Object -Property Version -Descending | select-object -first 1 $cmsPackage = Get-package | where-object { $_.id -eq "EPiServer.Core"} | Sort-Object -Property Version -Descending| sele...
PowerShellCorpus/Github/rilana_Test/EPiServerSite3/packages/EPiServer.CMS.Core.8.8.0/tools/AssemblyRedirects.ps1
AssemblyRedirects.ps1
param($installPath, $toolsPath, $package, $project) ## ## Inserts a new or updates an existing dependentAssembly element for a specified assembly ## Function AddOrUpdateBindingRedirect([System.IO.FileInfo] $file, [System.Xml.XmlElement[]] $assemblyConfigs, [System.Xml.XmlDocument] $config) { $name = [System...
PowerShellCorpus/Github/rilana_Test/EPiServerSite3/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/rilana_Test/EPiServerSite3/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/rilana_Test/EPiServerSite3/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/rilana_Test/EPiServerSite3/packages/Newtonsoft.Json.5.0.8/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/rilana_Test/EPiServerSite3/packages/EPiServer.Logging.Log4Net.1.0.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) ## ## Inserts a new or updates an existing dependentAssembly element for a specified assembly ## Function AddOrUpdateBindingRedirect([System.IO.FileInfo] $file, [System.Xml.XmlElement[]] $assemblyConfigs, [System.Xml.XmlDocument] $config) { $name = [System...
PowerShellCorpus/Github/rilana_Test/EPiServerSite3/packages/EPiServer.CMS.UI.Core.8.2.2/tools/Install.ps1
Install.ps1
param ($installPath, $toolsPath, $package, $project) Import-Module (Join-Path $toolsPath "Get-ProtectedModulesPath.psm1") Import-Module (Join-Path $toolsPath "Get-WebConfig.psm1") Import-Module (Join-Path $toolsPath "Remove-Assembly.psm1") Import-Module (Join-Path $toolsPath "Update-PackagesConfig.psm1") Import-...
PowerShellCorpus/Github/rilana_Test/EPiServerSite3/packages/EPiServer.Framework.8.8.0/tools/init.ps1
init.ps1
param($installPath, $toolsPath, $package, $project) Import-Module (join-path $toolsPath "upgrade.psm1") -ArgumentList $installPath # SIG # Begin signature block # MIIZDwYJKoZIhvcNAQcCoIIZADCCGPwCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR # AgEAAgEAAgEAAgEAAg...
PowerShellCorpus/Github/rilana_Test/EPiServerSite3/packages/EPiServer.Framework.8.8.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) ## ## Inserts a new or updates an existing dependentAssembly element for a specified assembly ## Function AddOrUpdateBindingRedirect([System.IO.FileInfo] $file, [System.Xml.XmlElement[]] $assemblyConfigs, [System.Xml.XmlDocument] $config) { $name = [System...
PowerShellCorpus/Github/rilana_Test/EPiServerSite3/packages/EPiServer.Search.7.7.1/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Write-Host 'Importing Search.psm1' import-Module (join-path $toolsPath "Search.psm1") Add-EPiBindingRedirect $installPath $project Set-EPiBaseUri $project # SIG # Begin signature block # MIIZDwYJKoZIhvcNAQcCoIIZADCCGPwCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB...
PowerShellCorpus/Github/BadriNarayananKR_TestRepo/WebApplication1/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/BadriNarayananKR_TestRepo/WebApplication1/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/adnancartwright_SourceControl/ApacheInstallLinux.ps1
ApacheInstallLinux.ps1
<# .SYNOPSIS This runbook provides an example of how to run a command on a Linux machine from Azure Automation. The command parameter defaults to 'sudo apt-get update ; sudo apt-get -y install apache2' to retrieve and install of the available web server on the machine. NOTE: if you have many updates upgrad...