full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Labfiles/Lab02/Starter/CreateVirtualMachines1.ps1
CreateVirtualMachines1.ps1
# Set variables: $stName = "adatumsa" $locName = "Central US" $rgName = "AdatumRG" # Store the start time $starttime = Get-Date # Get the default subscription name $subname = "" foreach ($sub in Get-AzureSubscription) { if ($sub.IsDefault -eq "True") { $subname = $sub.SubscriptionName ...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Labfiles/Lab02/Starter/ConfigureGatewayClassicVnet.ps1
ConfigureGatewayClassicVnet.ps1
# Sign in to your Azure subscription Login-AzureRmAccount # Retrieve the IP address used for the gateway in the ARM VNet and write down the address $GWARM= Get-AzureRMPublicIpAddress | ?{$_.Name -eq "PIP"} Write-Host "Write down the public IP Address for ARM VNet "$GWARM.IpAddress -ForegroundColor Green ...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Labfiles/Lab02/Starter/ConfigureARMGateway.ps1
ConfigureARMGateway.ps1
Login-AzureRmAccount Add-AzureAccount Show-SubscriptionARM Show-Subscription $rgNameARM = 'AdatumLabRG' $armVNet = 'HQ' $asmVNet = 'ADATUM-BRANCH-VNET' $gatewayASMName = 'gatewayASM' $gatewayARMName = 'gatewayARM' $prefixVNetASM = '192.168.0.0/16' $prefixVNetARM = '10.0.0.0/16' $sharedKey = '12345' $gat...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Labfiles/Lab02/Starter/CreateARMVM.ps1
CreateARMVM.ps1
# Set variables: $stName = "adatumsa" $locName = "Central US" $rgName = "AdatumRG" # Store the start time $starttime = Get-Date # Get the default subscription name $subname = "" foreach ($sub in Get-AzureSubscription) { if ($sub.IsDefault -eq "True") { $subname = $sub.SubscriptionName ...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Labfiles/Lab02/Starter/ExampleCommands.ps1
ExampleCommands.ps1
#Record your subscription name here: #Record your "Location 1" Azure region here: #Record your "Location 2" Azure region here: # SIG # Begin signature block # MIIavQYJKoZIhvcNAQcCoIIarjCCGqoCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR # AgEAAgEAA...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Labfiles/Lab02/Starter/ConfigureGatewayARM.ps1
ConfigureGatewayARM.ps1
$vnet01gateway = Get-AzureRMLocalNetworkGateway -Name LocalGW -ResourceGroupName VnetResourceGroup $vnet02gateway = Get-AzureRMVirtualNetworkGateway -Name ARMGW -ResourceGroupName VnetResourceGroup New-AzureRMVirtualNetworkGatewayConnection -Name arm-asm-s2s-connection ` -ResourceGroupName VnetResourceGroup ...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Labfiles/Lab02/Starter/ConfigureClassicGateway.ps1
ConfigureClassicGateway.ps1
# Sign in to your Azure subscription Login-AzureRmAccount Show-SubscriptionARM # Retrieve the IP address used for the gateway in the ARM VNet and write down the address $GWARM= Get-AzureRMPublicIpAddress | ?{$_.ResourceGroupName -eq "AdatumLabRG" -and $_.Name -like "20533lab02pip*"} Write-Host "Write down ...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Labfiles/Lab02/Starter/CreateVirtualMachine.ps1
CreateVirtualMachine.ps1
# Set variables: $rgName = "AdatumLabRG" $vnetName = "HQ" $vmName = "ARMSrv2" # Store the start time $starttime = Get-Date Login-AzureRmAccount Add-AzureAccount Show-SubscriptionARM Show-Subscription $vnet = Get-AzureRmVirtualNetwork -Name $vnetName -ResourceGroupName $rgName $location = $vnet.Loca...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Labfiles/Lab06/Starter/ExampleCommands.ps1
ExampleCommands.ps1
#Record your Storage account name here: #Record your primary access key here: #This code uses AzCopy to copy .png files to the asset-images container in your storage account AzCopy /Dest:https://<your storage account>.blob.core.windows.net/asset-images /destkey:<your primary access key> /Source:asset-ima...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Labfiles/Lab06/Starter/FileShare.ps1
FileShare.ps1
$storageAccountName = "<your_storage_account_name>" $shareName = "assets" $folderName = "invoices" # Get the storage account key and context $storageAccountKey = (Get-AzureStorageKey -StorageAccountName $storageAccountName).Primary $ctx = New-AzureStorageContext -StorageAccountName $storageAccountName -StorageAc...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Labfiles/Lab03/Solution/CreateRmVM.ps1
CreateRmVM.ps1
#This script creates a new IaaS v2 VM in the NewAppRG resource group #connected to the DATABASE subnet of the HQ-VNET virtual network #Sign in to Azure Write-Host "Signing in to Azure..." -ForegroundColor Green Login-AzureRmAccount #Set Azure location $locName = Read-Host "Enter location as string (eg: East U...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Labfiles/Lab03/Starter/CreateRmVM.ps1
CreateRmVM.ps1
# This script creates a new IaaS v2 VM # Sign in to Azure Write-Host "Signing in to Azure..." -ForegroundColor Green Login-AzureRmAccount Show-SubscriptionARM # Assign variables $rgName = "ResDevRG" $vnetName = "HQ-VNET" $subnetName = "Database" $vmName = "ResDevDB2" $vmSize = "Standard_A...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Labfiles/Lab03/Starter/ResDev/ResDevWindowsDeploy.ps1
ResDevWindowsDeploy.ps1
$deploymentName = "WebTierDeployment" $templateFile = "D:\Labfiles\Lab03\Starter\ResDev\ResDevWindowsDeployTemplate.json" $rgName = "ResDevRG" New-AzureRmResourceGroupDeployment -Name $deploymentName -ResourceGroupName $rgName -TemplateFile $templateFile
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Labfiles/Lab03/Starter/ResDev/ResDevLinuxDeploy/ResDevLinuxDeploy/bin/Debug/staging/ResDevLinuxDeploy/Scripts/Deploy-AzureResourceGroup.ps1
Deploy-AzureResourceGroup.ps1
#Requires -Version 3.0 #Requires -Module AzureRM.Resources #Requires -Module Azure.Storage Param( [string] [Parameter(Mandatory=$true)] $ResourceGroupLocation, [string] $ResourceGroupName = 'ResDevLinuxDeploy', [switch] $UploadArtifacts, [string] $StorageAccountName, [string] $StorageAccou...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Labfiles/Lab03/Starter/ResDev/ResDevLinuxDeploy/ResDevLinuxDeploy/Scripts/Deploy-AzureResourceGroup.ps1
Deploy-AzureResourceGroup.ps1
#Requires -Version 3.0 #Requires -Module AzureRM.Resources #Requires -Module Azure.Storage Param( [string] [Parameter(Mandatory=$true)] $ResourceGroupLocation, [string] $ResourceGroupName = 'ResDevLinuxDeploy', [switch] $UploadArtifacts, [string] $StorageAccountName, [string] $StorageAccou...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Labfiles/Lab11/Solution/New-StorageAndVMs.ps1
New-StorageAndVMs.ps1
workflow New-StorageAndVMs { $Credential = Get-AutomationPSCredential -Name 'PSCredential' $SubscriptionName = Get-AutomationVariable -Name 'SubscriptionName' $AdminName = Get-AutomationVariable -Name 'AdminName' $AdminPassword = Get-AutomationVariable -Name 'AdminPassword' $Location = Get-Au...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Labfiles/Lab04/Starter/DeployAzureDSC.ps1
DeployAzureDSC.ps1
Login-AzureRmAccount Show-SubscriptionARM $resourceGroupName = 'ResDevWebRG' $location = 'west europe' # you need to change this parameter for your deployment $storageAccount = (Get-AzureRmStorageAccount | Where-Object {($_.Location -eq $location) -and ($_.ResourceGroupName -eq $resourceGroupName) -and ($_.St...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Labfiles/Lab04/Starter/IISInstall.ps1
IISInstall.ps1
Configuration IISInstall { Node localhost { WindowsFeature IIS { Name = "Web-Server" Ensure = "Present" } } }
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Demofiles/Mod01/UsingAzurePowerShell.ps1
UsingAzurePowerShell.ps1
#Mod 01 Demo script - Using Azure PowerShell #Update the following variables to reflect your choices. #You must change the value for $saName $locName = "East US" #Azure datacenter location $rgName = "TestRG1" #resource group name $saName = "<enter unique name here>" #storage account name. This must be all lower...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Demofiles/Mod04/DeployAzureDSC.ps1
DeployAzureDSC.ps1
Login-AzureRmAccount Show-SubscriptionARM $resourceGroupName = 'Demo4RG' $storageAccount = Get-AzureRmStorageAccount -ResourceGroupName $resourceGroupName $storageAccountKey = (Get-AzureRmStorageAccountKey -ResourceGroupName $resourceGroupName -Name $storageAccount.StorageAccountName).Key1 # we are using d...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Demofiles/Mod04/IISInstall.ps1
IISInstall.ps1
Configuration IISInstall { Node localhost { WindowsFeature IIS { Name = "Web-Server" Ensure = "Present" } } }
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Demofiles/Mod08/SmallCloudService/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/creationcurvecoach_azureclassfiles/Demofiles/Mod08/SmallCloudService/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/creationcurvecoach_azureclassfiles/Demofiles/Mod08/SmallCloudService/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/creationcurvecoach_azureclassfiles/Demofiles/Mod08/SmallCloudService/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 # SIG # Begin signature block # MIIavQYJKoZIhvcNAQcCoIIarjCCGqoCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQ...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Demofiles/Mod08/SmallCloudService/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/creationcurvecoach_azureclassfiles/Demofiles/Mod08/SmallCloudService/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/creationcurvecoach_azureclassfiles/Demofiles/Mod08/SmallCloudService/packages/Newtonsoft.Json.6.0.3/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/creationcurvecoach_azureclassfiles/Demofiles/Mod06/UploadBlobs.ps1
UploadBlobs.ps1
$storageAccountName = "<your_storage_account_name>" $containerName = "demo-container" # Find the folder where this script is saved $thisfolder = Split-Path -parent $MyInvocation.MyCommand.Definition # The local source subfolder $sourcefolder = "$thisfolder\data" # Get storage account key and context $stora...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Demofiles/Mod05/AdatumWebsite/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/creationcurvecoach_azureclassfiles/Demofiles/Mod05/AdatumWebsite/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/creationcurvecoach_azureclassfiles/Demofiles/Mod05/AdatumWebsite/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/creationcurvecoach_azureclassfiles/Demofiles/Mod05/AdatumWebsite/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 # SIG # Begin signature block # MIIavQYJKoZIhvcNAQcCoIIarjCCGqoCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQ...
PowerShellCorpus/Github/creationcurvecoach_azureclassfiles/Demofiles/Mod05/AdatumWebsite/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/creationcurvecoach_azureclassfiles/Demofiles/Mod05/AdatumWebsite/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/creationcurvecoach_azureclassfiles/Modules/Azure-Template/ConfigureWinRM.ps1
ConfigureWinRM.ps1
################################################################################################################################# # Name : Configure-WinRM.ps1 # # ...
PowerShellCorpus/Github/SlashDeveloper_VMTipping/VMTippekonkurranse/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/SlashDeveloper_VMTipping/VMTippekonkurranse/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/SlashDeveloper_VMTipping/VMTippekonkurranse/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/SlashDeveloper_VMTipping/VMTippekonkurranse/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/SlashDeveloper_VMTipping/VMTippekonkurranse/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/SlashDeveloper_VMTipping/VMTippekonkurranse/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/SlashDeveloper_VMTipping/VMTippekonkurranse/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/SlashDeveloper_VMTipping/VMTippekonkurranse/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/SlashDeveloper_VMTipping/VMTippingClient/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/SlashDeveloper_VMTipping/VMTippingClient/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/SlashDeveloper_VMTipping/VMTippingClient/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/SlashDeveloper_VMTipping/VMTippingClient/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/SlashDeveloper_VMTipping/VMTippingClient/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/SlashDeveloper_VMTipping/VMTippingClient/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/SlashDeveloper_VMTipping/VMTippingClient/packages/WebGrease.1.5.2/tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Visual Studio execution done via NuGet Package Manager Function VSExecution($toolsPath, $project) { $project.DTE.ExecuteCommand("File.SaveAll", [system.string]::Empty) # Get the msbuild version of the project and add the import $msbuild = [Microsof...
PowerShellCorpus/Github/SlashDeveloper_VMTipping/VMTippingClient/packages/WebGrease.1.5.2/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # Return a relative path with reference to root as Uri object # $rootPath - root path # $relativePath - relative path # $appendToRelativePath - Optional parameter. If provided will be appended to relative Path using Path.Combine() Function GetRelativeUri($root...
PowerShellCorpus/Github/SlashDeveloper_VMTipping/VMTippingClient/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/SlashDeveloper_VMTipping/VMTippingClient/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/SlashDeveloper_VMTipping/VMTippingClient/packages/Newtonsoft.Json.6.0.3/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/OPS-E2E-PPE_E2E_Provision_2017_4_23_26_5_16/.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/marhod_Office365LicensingAutomation/o365LicenseAutomationRunbook.ps1
o365LicenseAutomationRunbook.ps1
$domainName = "mrhodes.net" $azureCredentialName = "mod272526" $cred = Get-AutomationPSCredential -Name $azureCredentialName Connect-MsolService -Credential $cred $Location = "AU" Get-MsolUser -DomainName $domainName | Where-Object -FilterScript {$_.UsageLocation -ne $location} | Set-MsolUser -UsageLocatio...
PowerShellCorpus/Github/GONZALORUIZ_servicefabricvmss/Ping.ps1
Ping.ps1
add-type @" using System.Net; using System.Security.Cryptography.X509Certificates; public class TrustAllCertsPolicy : ICertificatePolicy { public bool CheckValidationResult( ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProbl...
PowerShellCorpus/Github/GONZALORUIZ_servicefabricvmss/CreateSvcFabCluster.ps1
CreateSvcFabCluster.ps1
############################################################################## # Author : Gonzalo Ruiz - Cloud Architect # For more info : www.gonzowins.com # Date : 25/02/2015 # # This script creates a Service Fabric Cluster in Azure and the related objects # like : # Certificates # KeyV...
PowerShellCorpus/Github/michaelluo0818_BaisenStorage/Project/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/michaelluo0818_BaisenStorage/Project/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/GONZALORUIZ_azureservicefabric-withsecurity/CreateSvcFabCluster.ps1
CreateSvcFabCluster.ps1
############################################################################## # Author : Gonzalo Ruiz - Cloud Architect # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AN...
PowerShellCorpus/Github/NickPonikiewski_Test2/Budget2.0/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/NickPonikiewski_Test2/Budget2.0/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/terrytrent_DownloadXBoxGameClips/SaveGameClips.ps1
SaveGameClips.ps1
################################################################ # # # This script works in conjunction with a XBOXAPI.COM account. # # You must create a XBOXAPI.COM account in order to use it. # # ...
PowerShellCorpus/Github/dingjing_OneSql/DbDictionary.ps1
DbDictionary.ps1
$DbDictionary = @{ MyOracleDB = @{ Assembly = "Oracle.ManagedDataAccess.dll"; ConnectionClass = "Oracle.ManagedDataAccess.Client.OracleConnection"; DataSourceKey = "DATA SOURCE"; DataSourceValue = "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=ora.mycompany.com)(PORT=1521)))(CONNECT_DAT...
PowerShellCorpus/Github/v-peliao_TestForFeature.nl-nl/.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/baseif_azureproject/Script-env.ps1
Script-env.ps1
param ( [string]$storageAccesskeys, [string]$Storageaccount, [string]$path ) Set-ExecutionPolicy unrestricted diskpart /s C:\SourcesInstallVM\SourceDSCprerequisites\DiskPartScript.txt > C:\SourcesInstallVM\SourceDSCprerequisites\Log_DiskPart.log New-ItemProperty 'HKLM:\SYSTEM\CurrentCon...
PowerShellCorpus/Github/baseif_azureproject/Script-env2.ps1
Script-env2.ps1
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
PowerShellCorpus/Github/jsakamoto_nupkg-selenium-webdriver-chromedriver/buildTools/download-driver.ps1
download-driver.ps1
# constants $version = "2.30" $downloadUrlBase = "https://chromedriver.storage.googleapis.com" $drivers = @( [ordered]@{ platform = "win32"; fileName = "chromedriver.exe"; } , [ordered]@{ platform = "mac64"; fileName = "chromedriver"; } , [orde...
PowerShellCorpus/Github/sanderstad_PSSQLLib/GetPSSQLLib.ps1
GetPSSQLLib.ps1
# Original file from https://github.com/psget/psget/ # # Adjusted to import the PSSQLLib module param ( [string[]]$url = ("https://raw.githubusercontent.com/sanderstad/PSSQLLib/master/PSSQLLib.psm1", "https://raw.githubusercontent.com/sanderstad/PSSQLLib/master/PSSQLLib.psd1") ) function Find-Proxy() { ...
PowerShellCorpus/Github/erichexter_DrumScore/www/packages/Bower.1.3.5.2/tools/bin_tools.ps1
bin_tools.ps1
Function Update-BinPaths($cmd) { $cmd_name = [IO.Path]::GetFileName($cmd) $bin_name = [IO.Path]::GetDirectoryName($cmd) $repo_rel_path = '..\..\packages' $repo_rel_regex = $repo_rel_path.Replace('\', '\\').Replace('.', '\.') $bin_dir = Join-Path (gi $project.FullName).Directory.FullName $bin_...
PowerShellCorpus/Github/erichexter_DrumScore/www/packages/Bower.1.3.5.2/tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath 'bin_tools.ps1') $cmd = '.bin\bower.cmd' Delete-Bin $cmd
PowerShellCorpus/Github/erichexter_DrumScore/www/packages/Bower.1.3.5.2/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath 'bin_tools.ps1') $cmd = '.bin\bower.cmd' Set-BuildAction $cmd 'None' Update-BinPaths $cmd Add-BinToPath $cmd
PowerShellCorpus/Github/erichexter_DrumScore/www/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/erichexter_DrumScore/www/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/erichexter_DrumScore/www/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/erichexter_DrumScore/www/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/erichexter_DrumScore/www/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/erichexter_DrumScore/www/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/erichexter_DrumScore/www/packages/Node.js.0.10.26.1/tools/bin_tools.ps1
bin_tools.ps1
Function Update-BinPaths($cmd) { $cmd_name = [IO.Path]::GetFileName($cmd) $bin_name = [IO.Path]::GetDirectoryName($cmd) $repo_rel_path = '..\..\packages' $repo_rel_regex = $repo_rel_path.Replace('\', '\\').Replace('.', '\.') $bin_dir = Join-Path (gi $project.FullName).Directory.FullName $bin_...
PowerShellCorpus/Github/erichexter_DrumScore/www/packages/Node.js.0.10.26.1/tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath 'bin_tools.ps1') $cmd = '.bin\node.cmd' Delete-Bin $cmd
PowerShellCorpus/Github/erichexter_DrumScore/www/packages/Node.js.0.10.26.1/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath 'bin_tools.ps1') $cmd = '.bin\node.cmd' Set-BuildAction $cmd 'None' Update-BinPaths $cmd Add-BinToPath $cmd
PowerShellCorpus/Github/erichexter_DrumScore/www/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/erichexter_DrumScore/www/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/erichexter_DrumScore/www/packages/NoGit.0.0.8/tools/bin_tools.ps1
bin_tools.ps1
Function Update-BinPaths($cmd) { $cmd_name = [IO.Path]::GetFileName($cmd) $bin_name = [IO.Path]::GetDirectoryName($cmd) $repo_rel_path = '..\..\packages' $repo_rel_regex = $repo_rel_path.Replace('\', '\\').Replace('.', '\.') $bin_dir = Join-Path (gi $project.FullName).Directory.FullName $bin_...
PowerShellCorpus/Github/erichexter_DrumScore/www/packages/NoGit.0.0.8/tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath 'bin_tools.ps1') $cmd = '.bin\git.cmd' Delete-Bin $cmd
PowerShellCorpus/Github/erichexter_DrumScore/www/packages/NoGit.0.0.8/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath 'bin_tools.ps1') $cmd = '.bin\git.cmd' Set-BuildAction $cmd 'None' Update-BinPaths $cmd Add-BinToPath $cmd
PowerShellCorpus/Github/erichexter_DrumScore/www/packages/Newtonsoft.Json.6.0.3/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/erichexter_DrumScore/www/PublishScripts/Publish-WebApplicationWebsite.ps1
Publish-WebApplicationWebsite.ps1
#Requires -Version 3.0 <# .SYNOPSIS Creates and deploys a Microsoft 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...
PowerShellCorpus/Github/packetmagic_powershell-storj/storj.ps1
storj.ps1
class storjFile{ #Public Properties [String] $ID [String] $Size [String] $Decrypted [String] $Type [String] $Created [String] $Name [String] $BucketID # Instance Method [String] Remove() { $cmd = storj.exe remove-file $this.BucketID $this.ID ...
PowerShellCorpus/Github/jonathanment_VMBuilder/VMBuilder.ps1
VMBuilder.ps1
param ( $FileName = $PSScriptRoot + "\sample.xlsx", $username = "caas-username-goes-here", $password = "caas-password-goes-here", $adminPass = "virtual-machine-admin-password-goes-here" ) CLEAR $ErrorActionPreference = 'stop' function IsNumeric ($Value) { return $Value -match "^-?[0-9]\d*(\...
PowerShellCorpus/Github/manuaraya_HPChallenge/RPCGamePlay/packages/Microsoft.AspNet.Providers.LocalDB.1.1/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) try { # Set up variables $timestamp = (Get-Date).ToString('yyyyMMddHHmmss') $projectName = [IO.Path]::GetFileName($project.ProjectName.Trim([IO.PATH]::DirectorySeparatorChar, [IO.PATH]::AltDirectorySeparatorChar)) $catalogName = "aspnet-$project...
PowerShellCorpus/Github/manuaraya_HPChallenge/RPCGamePlay/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/manuaraya_HPChallenge/RPCGamePlay/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/manuaraya_HPChallenge/RPCGamePlay/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/manuaraya_HPChallenge/RPCGamePlay/packages/EntityFramework.5.0.0/tools/init.ps1
init.ps1
param($installPath, $toolsPath, $package, $project) $importedModule = Get-Module | ?{ $_.Name -eq 'EntityFramework' } if ($PSVersionTable.PSVersion -ge (New-Object Version @( 3, 0 ))) { $thisModuleManifest = 'EntityFramework.PS3.psd1' } else { $thisModuleManifest = 'EntityFramework.psd1' } $thisModule...
PowerShellCorpus/Github/manuaraya_HPChallenge/RPCGamePlay/packages/EntityFramework.5.0.0/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) function Invoke-ConnectionFactoryConfigurator($assemblyPath, $project) { $appDomain = [AppDomain]::CreateDomain( 'EntityFramework.PowerShell', $null, (New-Object System.AppDomainSetup -Property @{ ShadowCopyFiles = 'true' })) ...
PowerShellCorpus/Github/manuaraya_HPChallenge/RPCGamePlay/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/manuaraya_HPChallenge/RPCGamePlay/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...