full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/mikhailtarrasov_Companero/EFClient/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/mikhailtarrasov_Companero/EFClient/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/tweeks024_VMware-Scripts/vmware-Change-Network.ps1
vmware-Change-Network.ps1
# # Script Name: vmware-change-network.ps1 # # Author: Tom Weeks # Email: tom.m.weeks@gmail.com # Date: 7.21.2014 ##### MAIN ##### # Switch VMs from one portgroup to another. Run a ping test to ensure change was successful. If fails, changes are rolled back. Designed to move from standard virtual swi...
PowerShellCorpus/Github/tweeks024_VMware-Scripts/vmware-CreateVMs.ps1
vmware-CreateVMs.ps1
# # Script Name: vmware-CreateVMs.ps1 # # Author: Tom Weeks # Email: tom.m.weeks@gmail.com # Date: 11.18.2013 ##### MAIN ##### # Take a csv and use values to provision new VMs. Set-IP on VM and change network portgroup label. $HostCred = $Host.UI.PromptForCredential(“Please enter credentials”, “En...
PowerShellCorpus/Github/tweeks024_VMware-Scripts/vmware-DatastoreStatistics.ps1
vmware-DatastoreStatistics.ps1
# Script Name: vmware-DatastoreStatistics.ps1 # # Author: Tom Weeks # Email: tom.m.weeks@gmail.com # Date: 8.26.2015 ##### MAIN ##### # Uses Microsoft Technet Function for Write-Log from https://gallery.technet.microsoft.com/scriptcenter/Write-Log-PowerShell-999c32d0 . c:\scripts\Function-Write-Log.ps1 ...
PowerShellCorpus/Github/tweeks024_VMware-Scripts/vmware-MigrateVMs.ps1
vmware-MigrateVMs.ps1
# # Script Name: vmware-MigrateVMs.ps1 # # Author: Tom Weeks # Email: tom.m.weeks@gmail.com # Date: 4.14.2014 ##### MAIN ##### # Migrate VMs to new hosts with different CPU family. Update VM tools at after powered up on new hosts. $items = Import-CSV C:\scripts\MigrateVMs.csv foreach ($item in $i...
PowerShellCorpus/Github/tweeks024_VMware-Scripts/vmware-CreateVLANsOnVDSSwitch.ps1
vmware-CreateVLANsOnVDSSwitch.ps1
# # Script Name: vmware-CreateVLANsOnVDSSwitch.ps1 # # Author: Tom Weeks # Email: tom.m.weeks@gmail.com # Date: 8.21.2014 ##### MAIN ##### # Take a list of vlans and create them on a VDS switch. $VLanList = (Import-csv c:\scripts\vlans.csv) foreach ($VLan in $VLanList) { $VlanName = $VLan.N...
PowerShellCorpus/Github/tweeks024_VMware-Scripts/vmware-ConsolidateDisks.ps1
vmware-ConsolidateDisks.ps1
# # Script Name: vmware-ConsolidateDisks.ps1 # # Author: Tom Weeks # Email: tom.m.weeks@gmail.com # Date: 11.14.2014 ##### MAIN ##### # Find all VMs where disks need consolidation and consolidate. Log to file. Used to work around bug in Commvault Simpana 9 where not all VM disks were correctly consoli...
PowerShellCorpus/Github/tweeks024_VMware-Scripts/vmware-VM-reIP.ps1
vmware-VM-reIP.ps1
# # Script Name: vmware--VM-reIP.ps1 # # Author: Tom Weeks # Email: tom.m.weeks@gmail.com # Date: 11.18.2013 ##### MAIN ##### # Re-IP VMs using VM tools guest agent and then change portgroup. Connect-VIServer vcenter $HostCred = $Host.UI.PromptForCredential(“Please enter credentials”, “Enter E...
PowerShellCorpus/Github/tanieboy4u_hello-world/MVCTutorial/MVCMusic/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/tanieboy4u_hello-world/MVCTutorial/MVCMusic/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/tanieboy4u_hello-world/MVCTutorial/MVCMusic/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/tanieboy4u_hello-world/MVCTutorial/MVCMusic/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/tanieboy4u_hello-world/MVCTutorial/MVCMusic/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/tanieboy4u_hello-world/MVCTutorial/MVCMusic/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/tanieboy4u_hello-world/MVCTutorial/MVCMusic/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/tanieboy4u_hello-world/MVCTutorial/MVCMusic/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/tanieboy4u_hello-world/MVCTutorial/MVCMusic/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/yukimemi_anaperf/cmd/excelgraph.ps1
excelgraph.ps1
<# .SYNOPSYS csvグラフ化ツール .DESCRIPTION csvをグラフ化する .INPUTS - [n]csv : csv - [o]out : Excel保存先 - [o]max : Y軸MAX値 - [o]min : Y軸MIN値 .OUTPUTS - グラフ化エクセル .Last Change : 2017/04/17 15:12:02. #> param( [string]$csv = (Read-Host "Enter csv path"),...
PowerShellCorpus/Github/sherwinpsanchez_PS-Scripts/HyperVSetup.ps1
HyperVSetup.ps1
#--------------------- # Title: HyperVSetup.ps1 # Author: Sherwin Sanchez # # Description: Install Hyper-V Role and add Admin account # to Hyper-V Administrators group. Restarts # the Server. # # Version 1.0 # #--------------------- $group = [A...
PowerShellCorpus/Github/sherwinpsanchez_PS-Scripts/CreateLA.ps1
CreateLA.ps1
#--------------------- # Title: CreateLA.ps1 # Author: Sherwin Sanchez # # Description: Create a Local Admin User on a new Local/Hyper-V Server and # add it to: Administrators, Remote Desktop Users, # Remote Management Users # # Version 1.0 # #---...
PowerShellCorpus/Github/sherwinpsanchez_PS-Scripts/FSMO Roles Status.ps1
FSMO Roles Status.ps1
Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster Get-ADDomainController -Filter * | Select-Object Name, Domain, Forest, OperationMasterRoles | Where-Object {$_.OperationMasterRoles} | Format-Table -AutoSize
PowerShellCorpus/Github/sherwinpsanchez_PS-Scripts/MoveFSMO.ps1
MoveFSMO.ps1
Move-ADDirectoryServerOperationMasterRole -Identity "SERVERNAME" -OperationMasterRole RIDMaster,PDCEmulator, InfrastructureMaster, SchemaMaster, DomainNamingMaster
PowerShellCorpus/Github/sherwinpsanchez_PS-Scripts/Create-ADUser.ps1
Create-ADUser.ps1
Import-Module ActiveDirectory New-ADUser ` -Name "TestUser" ` -Path "OU=TestOU,DC=TestDomain,DC=Local" ` -SamAccountName "TestUser" ` -DisplayName "Test User" ` -AccountPassword (ConvertTo-SecureString "SecretPassword123" -AsPlainText -Force) ` -ChangePasswordAtLogon $true ` -Enabled $true Add-ADGrou...
PowerShellCorpus/Github/sherwinpsanchez_PS-Scripts/RunOOBE.ps1
RunOOBE.ps1
Start-Process -FilePath C:\Windows\System32\Sysprep\Sysprep.exe -ArgumentList '/generalize /oobe /shutdown /quiet'
PowerShellCorpus/Github/Crosse_windotfiles/powershell/PrimalScript Template/PowerShell.ps1
PowerShell.ps1
################################################################################ # # NAME : $CARET # AUTHOR: $NAME , $COMPANY # DATE : $DATE # # Copyright (c) 2009 $NAME # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that ...
PowerShellCorpus/Github/Crosse_windotfiles/powershell/WindowsPowerShell/Microsoft.PowerShell_profile.ps1
Microsoft.PowerShell_profile.ps1
################################################################################ # # Copyright (c) 2009-2016 Seth Wright (wrightst@jmu.edu) # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this...
PowerShellCorpus/Github/uptimesoftware_Custom-WMI-object-monitor/pkg/files/plugins/scripts/Custom-WMI-object-monitor/Custom-WMI-object-monitor.ps1
Custom-WMI-object-monitor.ps1
$UPT_USERNAME = Get-ChildItem Env:UPTIME_USERNAME | select -expand value; $UPT_PASSWORD = Get-ChildItem Env:UPTIME_PASSWORD | select -expand value; $UPT_HOSTNAME = Get-ChildItem Env:UPTIME_HOSTNAME | select -expand value; $UPT_AUTHENTICATE = Get-ChildItem Env:UPTIME_AUTHENTICATE | select -expand value; $UPT_WQL = G...
PowerShellCorpus/Github/boyomarinov_phind/PhindProject/AppPackages/PhindProject_1.0.0.3_x86_Test/Add-AppDevPackage.ps1
Add-AppDevPackage.ps1
# # Add-AppxDevPackage.ps1 is a PowerShell script designed to install app # packages created by Visual Studio for developers. To run this script from # Explorer, right-click on its icon and choose "Run with PowerShell". # # Visual Studio supplies this script in the folder generated with its # "Prepare Package" c...
PowerShellCorpus/Github/boyomarinov_phind/PhindProject/AppPackages/PhindProject_1.0.0.5_x86_Test/Add-AppDevPackage.ps1
Add-AppDevPackage.ps1
# # Add-AppxDevPackage.ps1 is a PowerShell script designed to install app # packages created by Visual Studio for developers. To run this script from # Explorer, right-click on its icon and choose "Run with PowerShell". # # Visual Studio supplies this script in the folder generated with its # "Prepare Package" c...
PowerShellCorpus/Github/boyomarinov_phind/PhindProject/AppPackages/PhindProject_1.0.0.2_x86_Test/Add-AppDevPackage.ps1
Add-AppDevPackage.ps1
# # Add-AppxDevPackage.ps1 is a PowerShell script designed to install app # packages created by Visual Studio for developers. To run this script from # Explorer, right-click on its icon and choose "Run with PowerShell". # # Visual Studio supplies this script in the folder generated with its # "Prepare Package" c...
PowerShellCorpus/Github/boyomarinov_phind/PhindProject/AppPackages/PhindProject_1.0.0.4_x86_Test/Add-AppDevPackage.ps1
Add-AppDevPackage.ps1
# # Add-AppxDevPackage.ps1 is a PowerShell script designed to install app # packages created by Visual Studio for developers. To run this script from # Explorer, right-click on its icon and choose "Run with PowerShell". # # Visual Studio supplies this script in the folder generated with its # "Prepare Package" c...
PowerShellCorpus/Github/jldeen_Azure/PS/azure_cli_linux_clone.ps1
azure_cli_linux_clone.ps1
#-----fill in these variables $rgName = "LVMTest" $template = "C:\Templates\Template1.json" # local file path specified $vmName = ”LVMTestVM” $vhdName = "JDVHDTest" #-----stop the vm azure vm deallocate -g $rgName -n $vmName #-----generalize the image azure vm generalize $rgName -n $vmName #...
PowerShellCorpus/Github/mbadali25_DotnetCore-Sample/src/AgendaTest/Properties/PublishProfiles/local-publish.ps1
local-publish.ps1
[cmdletbinding(SupportsShouldProcess=$true)] param($publishProperties=@{}, $packOutput, $pubProfilePath) # to learn more about this file visit https://go.microsoft.com/fwlink/?LinkId=524327 try{ if ($publishProperties['ProjectGuid'] -eq $null){ $publishProperties['ProjectGuid'] = '5c187047-0681-460...
PowerShellCorpus/Github/pramireddy_Game.LargestWinningStreak/Lab.Game.WinningStreak/packages/jQuery.1.9.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/pramireddy_Game.LargestWinningStreak/Lab.Game.WinningStreak/packages/jQuery.1.9.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/pramireddy_Game.LargestWinningStreak/Lab.Game.WinningStreak/packages/jQuery.1.9.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/pramireddy_Game.LargestWinningStreak/Lab.Game.WinningStreak/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/pramireddy_Game.LargestWinningStreak/Lab.Game.WinningStreak/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/pramireddy_Game.LargestWinningStreak/Lab.Game.WinningStreak/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/HLDAzure_Powershell/CreateHDInsightCluster-Linux-RM-ScriptAction (Template).ps1
CreateHDInsightCluster-Linux-RM-ScriptAction (Template).ps1
################################################################### # Providision a Linux HDInsight cluster in Resource Manager mode. # # Includes a script action to install Hue. # # Replace the items between "<>" before executing. # ###########################################...
PowerShellCorpus/Github/j2clerck_goingup-packer/converttotemplate.ps1
converttotemplate.ps1
<# .NOTES Author: Joseh de Clerck Created: 06/05/2017 .SYNOPSIS This script converts a VirtualMachine to a template .DESCRIPTION Loads the VMware PowerCLI core snapin and opens a VMware PowerCLI connection to the specified vCenter, using the specified credentials. Start a VM so vCent...
PowerShellCorpus/Github/j2clerck_goingup-packer/scripts/windows/win-updates.ps1
win-updates.ps1
param($global:RestartRequired=0, $global:MoreUpdates=0, $global:MaxCycles=5, $MaxUpdatesPerCycle=500) $Logfile = "C:\Windows\Temp\win-updates.log" function LogWrite { Param ([string]$logstring) $now = Get-Date -format s Add-Content $Logfile -value "$now $logstring" Write...
PowerShellCorpus/Github/j2clerck_goingup-packer/scripts/windows/openssh.ps1
openssh.ps1
param ( [switch]$AutoStart = $false ) Write-Output "AutoStart: $AutoStart" $is_64bit = [IntPtr]::size -eq 8 # setup openssh $ssh_download_url = "http://www.mls-software.com/files/setupssh-7.1p1-1.exe" if (!(Test-Path "C:\Program Files\OpenSSH\bin\ssh.exe")) { Write-Output "Downloading $ssh_download_...
PowerShellCorpus/Github/TsuyoshiUshio_ServiceFabricScripts/SignedCertWithKeyVault.ps1
SignedCertWithKeyVault.ps1
# PowerShell command for ServiceFabric Test Cluster. # please edit the "parameter.json" # Before staring this script, please Login-AzureRmAccount first. # 1. Parsing ParameterJSON param ( [string]$ParameterFile = "./parameter.json" ) $ParameterJSON = Get-Content -Raw -Path $ParameterFile | ConvertFrom...
PowerShellCorpus/Github/rucka_JoinTheExpert-WebDay-2016/demo/1-BeforeTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/1-BeforeTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/1-BeforeTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/1-BeforeTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/1-BeforeTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/1-BeforeTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/1-BeforeTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/1-BeforeTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/1-BeforeTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/1-BeforeTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/1-BeforeTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/3-FunctionalTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/3-FunctionalTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/3-FunctionalTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/3-FunctionalTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/3-FunctionalTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/3-FunctionalTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/3-FunctionalTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/3-FunctionalTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/3-FunctionalTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/3-FunctionalTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/3-FunctionalTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/2-GettingStartedWithTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/2-GettingStartedWithTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/2-GettingStartedWithTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/2-GettingStartedWithTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/2-GettingStartedWithTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/2-GettingStartedWithTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/2-GettingStartedWithTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/2-GettingStartedWithTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/2-GettingStartedWithTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/2-GettingStartedWithTypescript/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/rucka_JoinTheExpert-WebDay-2016/demo/2-GettingStartedWithTypescript/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/anilvaltech_GitDeploy-SysScripts/gitdeploy-ec2-fetchdeploymentlistbykey.ps1
gitdeploy-ec2-fetchdeploymentlistbykey.ps1
#attempt to fetch git-deploy key from instance user-data $wc = new-object System.Net.WebClient; try { $gitDeployKey = $wc.DownloadString("http://instance-data/latest/user-data") } catch { } if ([system.string]::IsNullOrEmpty($gitDeployKey)) { $gitDeployKey = 'gdr2-github' #default } #local locations $...
PowerShellCorpus/Github/anilvaltech_GitDeploy-SysScripts/fetch-updates.ps1
fetch-updates.ps1
# Fetch updates script# version 1.3 # Before running this script the repository should have a default remote (since we are not specifying one by name) # This happens by default if the repository is cloned. # Perform fetch on all git repositories immediately beneath the current directory # This script should the...
PowerShellCorpus/Github/anilvaltech_GitDeploy-SysScripts/gitdeploy-locallist.ps1
gitdeploy-locallist.ps1
push-location #local locations $gitScriptGitPath = 'e:\git-deploy-get-scripts' #the following path should exclusively have git folders in it which will be updated as part of the fetch-updates script call below $gitDeployLocation = 'e:\git-deploy-repos' $gits = "[your comma-separated list of remote git urls her...
PowerShellCorpus/Github/anilvaltech_GitDeploy-SysScripts/fetch-updates-windows-services.ps1
fetch-updates-windows-services.ps1
# Fetch updates script# version 2.0 # Before running this script the repository should have a default remote (since we are not specifying one by name) # This happens by default if the repository is cloned. # Perform fetch on all git repositories immediately beneath the current directory # This script should the...
PowerShellCorpus/Github/juneb_ThinkingInEvents/Get-Service.WPF.ps1
Get-Service.WPF.ps1
Add-Type -AssemblyName PresentationFramework [xml]$XAMLWindow = ' <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="Auto" SizeToContent="WidthAndHeight" Title="Get-Service"> <ScrollViewer Padding="...
PowerShellCorpus/Github/juneb_ThinkingInEvents/OutputTester5.Export.ps1
OutputTester5.Export.ps1
#------------------------------------------------------------------------ # Source File Information (DO NOT MODIFY) # Source ID: 5db30cb0-3e6d-4e2e-b599-b6f55916316a # Source File: OutputTester5.psf #------------------------------------------------------------------------ #region File Recovery Data (DO NOT MODIFY)...
PowerShellCorpus/Github/juneb_ThinkingInEvents/Test-Errors.Export.ps1
Test-Errors.Export.ps1
#------------------------------------------------------------------------ # Source File Information (DO NOT MODIFY) # Source ID: b04a6ee3-bf74-43ce-9723-1c9e77d8f374 # Source File: ..\..\Users\JuneBlender\Documents\SAPIEN\ThinkingInEvents\GUIs\Test-Errors.psf #-------------------------------------------------------...
PowerShellCorpus/Github/juneb_ThinkingInEvents/Get-Service.Export.ps1
Get-Service.Export.ps1
#------------------------------------------------------------------------ # Source File Information (DO NOT MODIFY) # Source ID: 8ba5697b-bb25-492e-8027-43e04348ace8 # Source File: Get-Service.psf #------------------------------------------------------------------------ #region File Recovery Data (DO NOT MODIFY) ...
PowerShellCorpus/Github/juneb_ThinkingInEvents/GetTextFromChildForm/Globals.ps1
Globals.ps1
#-------------------------------------------- # Declare Global Variables and Functions here #-------------------------------------------- #Sample function that provides the location of the script function Get-ScriptDirectory { <# .SYNOPSIS Get-ScriptDirectory returns the proper location of the script. ...
PowerShellCorpus/Github/juneb_ThinkingInEvents/GetTextFromChildForm/GetTextFromChildForm.Export.ps1
GetTextFromChildForm.Export.ps1
#------------------------------------------------------------------------ # Source File Information (DO NOT MODIFY) # Source ID: dad88f79-d5a1-4a6d-a261-0f2f9e55c89c # Source File: GetTextFromChildForm.psproj #------------------------------------------------------------------------ #region Project Recovery Data (D...
PowerShellCorpus/Github/Tilesentik_power_connect/server.ps1
server.ps1
#Server Function Send-TCPMessage { Param ( [Parameter(Mandatory=$true, Position=0)] [ValidateNotNullOrEmpty()] [string] $EndPoint , [Parameter(Mandatory=$true, Position=1)] [string] $Port , ...
PowerShellCorpus/Github/Tilesentik_power_connect/Create-EXEFrom.ps1
Create-EXEFrom.ps1
<# .SYNOPSIS Convert a PowerShell script into a deployable exe using iexpress. .DESCRIPTION Takes one PowerShell script and any number of supplementary files and create an exe using Windows's built in iexpress program. If you use one of the parameters that allows you to provide a folder, the script w...
PowerShellCorpus/Github/Tilesentik_power_connect/main.ps1
main.ps1
# Load the Winforms assembly [reflection.assembly]::LoadWithPartialName( "System.Windows.Forms") [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") #server Function Send-TCPMessage { Param ( ...
PowerShellCorpus/Github/neilpeterson_azure-cli-scripts/windows-powershell/create-docker-host/create-docker-host.ps1
create-docker-host.ps1
# Create a resource group. New-AzureRmResourceGroup -Name myResourceGroup -Location westeurope # Create a subnet configuration. $subnetconfig = New-AzureRmVirtualNetworkSubnetConfig -Name mySubnet -AddressPrefix 192.168.1.0/24 # Create a virtual network. $vnet = New-AzureRmVirtualNetwork -ResourceGroupName myR...
PowerShellCorpus/Github/neilpeterson_azure-cli-scripts/windows-powershell/create-vm-monitor-oms/create-vm-monitor-oms.ps1
create-vm-monitor-oms.ps1
# OMS Id and OMS key. $omsid = "<replace with OMS Id>" $omskey = "<replace with OMS key" #Admin user name and password to configure on VM. $creds = Get-Credential # Create a resource group. New-AzureRmResourceGroup -Name myResourceGroup -Location westeurope # Create a subnet configuration. $subnetconfig =...
PowerShellCorpus/Github/neilpeterson_azure-cli-scripts/windows-powershell/create-vm-detailed/create-vm-detailed.ps1
create-vm-detailed.ps1
$creds = Get-Credential # Create a resource group. New-AzureRmResourceGroup -Name myResourceGroup -Location westeurope # Create a subnet configuration. $subnetconfig = New-AzureRmVirtualNetworkSubnetConfig -Name mySubnet -AddressPrefix 192.168.1.0/24 # Create a virtual network. $vnet = New-AzureRmVirtualNet...
PowerShellCorpus/Github/neilpeterson_azure-cli-scripts/cli-powershell/create-docker-host/create-docker-host.ps1
create-docker-host.ps1
# Variables $publicdns = Get-Random # Create a resource group. az group create --name myResourceGroup --location westeurope # Create a virtual network. az network vnet create --resource-group myResourceGroup --location westeurope --name myVnet ` --address-prefix 192.168.0.0/16 --subnet-name mySubnet --subne...
PowerShellCorpus/Github/neilpeterson_azure-cli-scripts/cli-powershell/create-vm-monitor-oms/create-vm-monitor-oms.ps1
create-vm-monitor-oms.ps1
# Update with OMS Id and OMS key. $omsid = <Replace with your OMS Id> $omskey = <Replace with your OMS key> # Variables $publicdns = Get-Random # Create a resource group. az group create --name myResourceGroup --location westeurope # Create a storage account. az storage account create --resource-group myR...
PowerShellCorpus/Github/neilpeterson_azure-cli-scripts/cli-powershell/create-vm-quick/create-vm-quick.ps1
create-vm-quick.ps1
# Create a resource group. az group create --name myResourceGroup --location westeurope # Create a virtual machine. az vm create ` --image UbuntuLTS ` --admin-username azureuser ` --ssh-key-value ~/.ssh/id_rsa.pub ` --resource-group myResourceGroup ` --location westeurope ` --name myVM ` --no...
PowerShellCorpus/Github/neilpeterson_azure-cli-scripts/cli-powershell/create-vm-nsg/create-vm-nsg.ps1
create-vm-nsg.ps1
# Variables publicdns=mypublicdns$RANDOM # Create a resource group. az group create --name myResourceGroup --location westeurope # Create a virtual network and subnet (front end). az network vnet create --resource-group myResourceGroup --location westeurope --name myVnet \ --address-prefix 192.168.0.0/16 --...
PowerShellCorpus/Github/neilpeterson_azure-cli-scripts/cli-powershell/create-vm-nlb/create-vm-nlb.ps1
create-vm-nlb.ps1
# Variables $publicdns = Get-Random # Create a resource group. az group create --name myResourceGroup --location westeurope # Create a virtual network. az network vnet create --resource-group myResourceGroup --location westeurope --name myVnet ` --address-prefix 192.168.0.0/16 --subnet-name mySubnet --subne...
PowerShellCorpus/Github/neilpeterson_azure-cli-scripts/cli-powershell/mount-os-disk/mount-os-disk.ps1
mount-os-disk.ps1
# Variables $sourcevm = "virtual-machine%" # Get the URI for the source VM operating system disk. $uri = (az vm show -g myResourceGroup -n $sourcevm --query [storageProfile.osDisk.vhd.uri] -o tsv) # Delete the source virtual machine, this will not delete the disk. az vm delete -g myResourceGroup -n $sourcevm ...