full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/atribeiro_WCFService/ClientServiceCsv/packages/jQuery.1.8.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/nonprofittechy_disconnect-wsession/disconnect-all-sessions.ps1
disconnect-all-sessions.ps1
<# Disconnect all logged-in sessions for the given username, for all servers in the OU provided in the variable $baseOU Will prompt for username but default to the current user. Also will default to OU of current PC unless the OU to run script against is specified. Quinten Steenhuis, 9/20/2016 #> # uncomm...
PowerShellCorpus/Github/dicconb_awscourse/Lab5W/Lab5W.ps1
Lab5W.ps1
Start-Transcript -Path C:\Users\Administrator\gitrepos\awscourse\Lab5W\Lab5W.transcript #================================================================================================================== #1.2 Find Development Instances for Project #================================================================...
PowerShellCorpus/Github/dicconb_awscourse/Lab6W/Lab6W.ps1
Lab6W.ps1
Start-Transcript -Path C:\Users\Administrator\gitrepos\awscourse\Lab6W\Lab6W.transcript get-content C:\temp\UserData.txt $amiid = "ami-c1740ab6" $subnetid = "subnet-d7c6a2a0" $kp = "qwikLABS-L405-10674" $sgid = "sg-a0c5c8c5" #==================================================================================...
PowerShellCorpus/Github/dicconb_awscourse/Lab3W/Lab3W.ps1
Lab3W.ps1
##2.2.2 Obtain a full description of the Processor instance aws ec2 describe-instances --filter 'Name=tag:Name,Values=Processor' #2.#2.3 Refine description to include only VolumeId of Amazon EBS volume aws ec2 describe-instances --filter 'Name=tag:Name,Values=Processor' --query 'Reservations[0].Instances[0].Bl...
PowerShellCorpus/Github/OPSTest_E2E_Provision_1485932743729/.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/ahl3h6_CS451RProject/KPIMetricsSystem/packages/jQuery.2.0.3/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/ahl3h6_CS451RProject/KPIMetricsSystem/packages/jQuery.2.0.3/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/ahl3h6_CS451RProject/KPIMetricsSystem/packages/jQuery.2.0.3/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/ahl3h6_CS451RProject/KPIMetricsSystem/packages/Microsoft.SqlServer.Compact.4.0.8854.1/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) Import-Module (Join-Path $toolsPath VS.psd1) $nativeBinDirectory = Join-Path $installPath "NativeBinaries" if ($project.Type -eq 'Web Site') { $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $binDirectory = Jo...
PowerShellCorpus/Github/ahl3h6_CS451RProject/KPIMetricsSystem/packages/Microsoft.SqlServer.Compact.4.0.8854.1/tools/Uninstall.ps1
Uninstall.ps1
param($installPath, $toolsPath, $package, $project) Import-Module (Join-Path $toolsPath VS.psd1) if ($project.Type -eq 'Web Site') { $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $binDirectory = Join-Path $projectRoot "bin" $libDirectory = Join-Path $inst...
PowerShellCorpus/Github/ahl3h6_CS451RProject/KPIMetricsSystem/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/ahl3h6_CS451RProject/KPIMetricsSystem/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/ahl3h6_CS451RProject/KPIMetricsSystem/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/ahl3h6_CS451RProject/KPIMetricsSystem/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/ahl3h6_CS451RProject/KPIMetricsSystem/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/ahl3h6_CS451RProject/KPIMetricsSystem/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/ahl3h6_CS451RProject/KPIMetricsSystem/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/ahl3h6_CS451RProject/KPIMetricsSystem/packages/EntityFramework.6.1.0-alpha1/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/ahl3h6_CS451RProject/KPIMetricsSystem/packages/EntityFramework.6.1.0-alpha1/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/ahl3h6_CS451RProject/KPIMetricsSystem/packages/EntityFramework.SqlServerCompact.6.1.0/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Add-EFDefaultConnectionFactory $project 'System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework' -ConstructorArguments 'System.Data.SqlServerCe.4.0' Add-EFProvider $project 'System.Data.SqlServerCe.4.0' 'System.Data.Entity.SqlServerCompact.SqlCe...
PowerShellCorpus/Github/estenrye_microsoft-iis-helloworld/build-Index.ps1
build-Index.ps1
param( [string]$title = $env:pageText, [switch]$useCustomPath = [bool]::Parse($env:useCustomPath), [string]$customPath = $env:customPath ) $html = "<html> <head><title>$title</title></head> <body> <h1>$title</h1> <a href='/'>Home</a><br> <a href='/hello'>Hello</a><b...
PowerShellCorpus/Github/john-medeiros_PowerShell/Get-UserName-Domain.ps1
Get-UserName-Domain.ps1
function Get-UserName-Domain ($userName) { $strUserName=$userName $strDomainDNS = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().Name $domain = New-Object DirectoryServices.DirectoryEntry $search = [System.DirectoryServices.DirectorySearcher]$strDomainDNS $search.Filter ...
PowerShellCorpus/Github/john-medeiros_PowerShell/DBA_Log_System_Monitor.ps1
DBA_Log_System_Monitor.ps1
<# .SYNOPSIS Verifica se existem erros no log System do Windows. .DESCRIPTION Verifica se existem erros no log System do Windows, e reporta por email caso existam. É um programa para facilitar a administração do ambiente de banco de dados. .NOTES Author: John Medeiro...
PowerShellCorpus/Github/john-medeiros_PowerShell/Get-MSSQLLinkPasswords.ps1
Get-MSSQLLinkPasswords.ps1
#### Enter-PSSession -ComputerName ?????; function Get-MSSQLLinkPasswords{ <# .SYNOPSIS Extract and decrypt MSSQL linked server passwords. Author: Antti Rantasaari 2014, NetSPI License: BSD 3-Clause .DESCRIPTION Get-MSSQLLinkPasswords extracts and decrypts the connection cred...
PowerShellCorpus/Github/john-medeiros_PowerShell/wps_list_foursquare_venue.ps1
wps_list_foursquare_venue.ps1
$CLIENT_ID="?"; $CLIENT_SECRET="?"; function BuscaLocais([float]$latitude, [float]$longitude, [int]$metros) { $proxy = [System.Net.WebRequest]::GetSystemWebProxy().GetProxy("http://www.google.com") $url = "https://api.foursquare.com/v2/venues/search?ll="+$latitude+","+$longitude+"&intent=browse&limit=100...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_NewRepo_2017_4_21_18_58_22/.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/kenelite_VMware-Powercli-Scripts/GetVMHostOverAllocation.ps1
GetVMHostOverAllocation.ps1
<# .SYNOPSIS Return VMHost Resource over allocation details for all the VMHost. .DESCRIPTION .INPUTS System.String .EXAMPLE .\GetVMHostOverAllocation.ps1 .LINK .NOTES 20150316 Guoyu Wang [+] Created 20150318 Guoyu Wang [+] Updated the VMhost Cluster #> $Report = @() $VMhosts = Get-VMhost...
PowerShellCorpus/Github/kenelite_VMware-Powercli-Scripts/InstallPatch.ps1
InstallPatch.ps1
#This is script for Install Windows Pacth on Windows Server 2003/R2 #Prerequest: #Must run on Windows PowerShell #Must have access to ESXi host or vCenter Server TCP 902 Port #Must vCenter Server/ESXi 5.0 and later #Need VirtualMachine.Interact.ConsoleInteract privilege #Need VirtualMachine.Interact.GuestControl ...
PowerShellCorpus/Github/kenelite_VMware-Powercli-Scripts/CloneVMwith2nic.ps1
CloneVMwith2nic.ps1
########################################################## # CloneVM using vmware powercli. # Update the script from Jase McCarty # ######################################################## # The example of CSV file as follow: # basevm,datastore,vmhost,custspec,vmname,ipaddress,subnet,gateway,vlan,pdns,sdns,ipaddre...
PowerShellCorpus/Github/kenelite_VMware-Powercli-Scripts/AddESXiTovCenter.ps1
AddESXiTovCenter.ps1
########################################################## # Add_ESXi_To_vCenter.ps1 # Micheal Ken 23/7/2014 # Add ESxi Hosts to the vCenter ########################################################## #Name,Location,User,Password #vmware1,MyDatacenter1,root,abcdefg ##############################################...
PowerShellCorpus/Github/kenelite_VMware-Powercli-Scripts/AdvancedDeployeLinuxVM/CloneRHEL6.ps1
CloneRHEL6.ps1
<# .SYNOPSIS Clone VM with VMware vCenter 5.x , Setup the VM's IP Address , Startup VM. .DESCRIPTION .PARAMETER ComputerName .INPUTS System.String .OUTPUTS .EXAMPLE .\CloneRHEL6 .EXAMPLE .NOTES #> $Guestuser = Read-Host "Please input username of guest OS:" $Guestpassword = Read-Host -As...
PowerShellCorpus/Github/jrg-za_CentralDB/EPM_EnterpriseEvaluation_3.0.0.ps1
EPM_EnterpriseEvaluation_3.0.0.ps1
# Evaluate specific Policies against a Server List # Uses the Invoke-PolicyEvaluation Cmdlet param([string]$ConfigurationGroup=$(Throw ` "Paramater missing: -ConfigurationGroup ConfigGroup"),` [string]$PolicyCategoryFilter=$(Throw "Parameter missing: ` -PolicyCategoryFilter Category"), ` [string]$EvalMode=$(Thr...
PowerShellCorpus/Github/jrg-za_CentralDB/CentralInventory.ps1
CentralInventory.ps1
################################################################################################################################### <# Based on Allen White, Colleen Morrow and Erin Stellato's Scripts for SQL Inventory and Baselining https://www.simple-talk.com/sql/database-administration/let-powershell-do-an-inventor...
PowerShellCorpus/Github/jrg-za_CentralDB/SQLMirrorEvent.ps1
SQLMirrorEvent.ps1
$query = "select * from DATABASE_MIRRORING_STATE_CHANGE where state = 6 or state = 7 or state = 8 or state =9" Register-WMIEvent -Namespace 'root\Microsoft\SqlServer\ServerEvents\MSSQLSERVER' -Query $query
PowerShellCorpus/Github/jrg-za_CentralDB/WaitStats.ps1
WaitStats.ps1
################################################################################################################################### <# Based on Allen White, Collen Morrow, Erin Stellato's and Jonathan Kehayias Scripts for SQL Inventory and Baselining https://www.simple-talk.com/sql/database-administration/let-powersh...
PowerShellCorpus/Github/jrg-za_CentralDB/BaselineStats.ps1
BaselineStats.ps1
############################################################################################################################################################ <# CrazyDBA.COM (CentralDB) - Based on Allen White, Colleen Morrow, Erin Stellato, Jonathan Kehayias and Ed Wilsons Scripts for SQL Inventory and Baselining http...
PowerShellCorpus/Github/jrg-za_CentralDB/SQLPing.ps1
SQLPing.ps1
param( [string]$SQLInst="ASPRODDB-BUR01\MoDBA", [string]$Centraldb="CentralDB" ) [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMO') | out-null [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.ConnectionInfo') | out-null [System.Reflection.Assembly]::LoadWithParti...
PowerShellCorpus/Github/jrg-za_CentralDB/CodePlex 3.0/1Down Version Evaluation PS/EPM_EnterpriseEvaluation_3.0.0.ps1
EPM_EnterpriseEvaluation_3.0.0.ps1
# Evaluate specific Policies against a Server List # Uses the Invoke-PolicyEvaluation Cmdlet param([string]$ConfigurationGroup=$(Throw ` "Paramater missing: -ConfigurationGroup ConfigGroup"),` [string]$PolicyCategoryFilter=$(Throw "Parameter missing: ` -PolicyCategoryFilter Category"), ` [string]$EvalMode=$(Thr...
PowerShellCorpus/Github/jrg-za_CentralDB/WindowsPowerShell/CopyBackupToControl_UserDB_CT_SBV_FULL.ps1
CopyBackupToControl_UserDB_CT_SBV_FULL.ps1
Function Copy-ItemUNC($SourcePath, $TargetPath, $FileName) { New-PSDrive -Name source -PSProvider FileSystem -Root $SourcePath | Out-Null New-PSDrive -Name target -PSProvider FileSystem -Root $TargetPath | Out-Null Try { Copy-item -Path source:$FileName -Destination target: } Catch {...
PowerShellCorpus/Github/jrg-za_CentralDB/WindowsPowerShell/CopyBackupToControl_UserDB_WS_G4S_FULL.ps1
CopyBackupToControl_UserDB_WS_G4S_FULL.ps1
Function Copy-ItemUNC($SourcePath, $TargetPath, $FileName) { New-PSDrive -Name source -PSProvider FileSystem -Root $SourcePath | Out-Null New-PSDrive -Name target -PSProvider FileSystem -Root $TargetPath | Out-Null Try { Copy-item -Path source:$FileName -Destination target: } Catch {...
PowerShellCorpus/Github/jrg-za_CentralDB/WindowsPowerShell/Get-WindowsInventoryToClixml.ps1
Get-WindowsInventoryToClixml.ps1
<# .SYNOPSIS Collects comprehensive information about hosts running Microsoft Windows and saves the result to a file. .DESCRIPTION This script leverages the NetworkScan and WindowsInventory modules along with Windows Management Instrumentation (WMI) to scan for and collect comprehensive information about ho...
PowerShellCorpus/Github/jrg-za_CentralDB/WindowsPowerShell/CopyBackupToControl_UserDB_WS_SBV_FULL.ps1
CopyBackupToControl_UserDB_WS_SBV_FULL.ps1
Function Copy-ItemUNC($SourcePath, $TargetPath, $FileName) { New-PSDrive -Name source -PSProvider FileSystem -Root $SourcePath | Out-Null New-PSDrive -Name target -PSProvider FileSystem -Root $TargetPath | Out-Null Try { Copy-item -Path source:$FileName -Destination target: } Catch {...
PowerShellCorpus/Github/jrg-za_CentralDB/WindowsPowerShell/Convert-WindowsInventoryClixmlToExcel.ps1
Convert-WindowsInventoryClixmlToExcel.ps1
<# .SYNOPSIS Writes an Excel file containing the Database Engine information in a SQL Server Inventory file created by Get-WindowsInventoryToClixml.ps1. .DESCRIPTION This script loads a Windows Inventory file created by Get-WindowsInventoryToClixml.ps1 and calls the Export-WindowsInventoryToExcel function i...
PowerShellCorpus/Github/jrg-za_CentralDB/WindowsPowerShell/CopyBackupToControl_SystemDB_FULL.ps1
CopyBackupToControl_SystemDB_FULL.ps1
Function Copy-ItemUNC($SourcePath, $TargetPath, $FileName) { New-PSDrive -Name source -PSProvider FileSystem -Root $SourcePath | Out-Null New-PSDrive -Name target -PSProvider FileSystem -Root $TargetPath | Out-Null Try { Copy-item -Path source:$FileName -Destination target: } Catch {...
PowerShellCorpus/Github/jrg-za_CentralDB/WindowsPowerShell/CopyBackupToControl_UserDB_CT_G4S_FULL.ps1
CopyBackupToControl_UserDB_CT_G4S_FULL.ps1
Function Copy-ItemUNC($SourcePath, $TargetPath, $FileName) { New-PSDrive -Name source -PSProvider FileSystem -Root $SourcePath | Out-Null New-PSDrive -Name target -PSProvider FileSystem -Root $TargetPath | Out-Null Try { Copy-item -Path source:$FileName -Destination target: } Catch {...
PowerShellCorpus/Github/jrg-za_CentralDB/WindowsPowerShell/CopyBackupToControl_UserDB_CV_G4S_FULL.ps1
CopyBackupToControl_UserDB_CV_G4S_FULL.ps1
Function Copy-ItemUNC($SourcePath, $TargetPath, $FileName) { New-PSDrive -Name source -PSProvider FileSystem -Root $SourcePath | Out-Null New-PSDrive -Name target -PSProvider FileSystem -Root $TargetPath | Out-Null Try { Copy-item -Path source:$FileName -Destination target: } Catch {...
PowerShellCorpus/Github/jrg-za_CentralDB/WindowsPowerShell/CopyBackupToControl_UserDB_DIFF.ps1
CopyBackupToControl_UserDB_DIFF.ps1
Function Copy-ItemUNC($SourcePath, $TargetPath, $FileName) { New-PSDrive -Name source -PSProvider FileSystem -Root $SourcePath | Out-Null New-PSDrive -Name target -PSProvider FileSystem -Root $TargetPath | Out-Null Try { Copy-item -Path source:$FileName -Destination target: } Catch {...
PowerShellCorpus/Github/jrg-za_CentralDB/WindowsPowerShell/Get-SqlServerInventoryToClixml.ps1
Get-SqlServerInventoryToClixml.ps1
<# .SYNOPSIS Collects comprehensive information about SQL Server instances and their underlying Windows Operating System and saves the result to a file. .DESCRIPTION This script leverages the NetworkScan, SqlServerInventory, and WindowsInventory modules to scan for and collect comprehensive information abou...
PowerShellCorpus/Github/jrg-za_CentralDB/WindowsPowerShell/CopyBackupToControl_UserDB_CV_SBV_FULL.ps1
CopyBackupToControl_UserDB_CV_SBV_FULL.ps1
Function Copy-ItemUNC($SourcePath, $TargetPath, $FileName) { New-PSDrive -Name source -PSProvider FileSystem -Root $SourcePath | Out-Null New-PSDrive -Name target -PSProvider FileSystem -Root $TargetPath | Out-Null Try { Copy-item -Path source:$FileName -Destination target: } Catch {...
PowerShellCorpus/Github/jrg-za_CentralDB/WindowsPowerShell/Convert-SqlServerInventoryClixmlToExcel.ps1
Convert-SqlServerInventoryClixmlToExcel.ps1
<# .SYNOPSIS Writes Excel files containing the Database Engine and Windows Operating System information from a SQL Server Inventory file created by Get-SqlServerInventoryToClixml.ps1. .DESCRIPTION This script loads a SQL Server Inventory file created by Get-SqlServerInventoryToClixml.ps1 and calls the Expor...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_Provision_2017_5_23_16_58_31/.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/AzureCAT-GSI_SAP-Hana-Deploy/SAP-Hana-IaaC/SAP-Hana-IaaC/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 = 'SAP-Hana-IaaC', [string] $StorageAccountName, [string] $StorageContainerName = $ResourceGroupName.ToLowe...
PowerShellCorpus/Github/zhenjiao-ms_optest717.kk-kz/.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/SquirrelAssassin_Azure-EA-Cost/ea.ps1
ea.ps1
# Base Info Param ( [Parameter(Mandatory=$false)] [int32]$DaysToGoBack=0, [Parameter(Mandatory=$true)] [int32]$EnrollmentNumber="short number", [Parameter(Mandatory=$true)] [string]$AccessKey="very long access key", [Parameter(Mandatory=$false)] ...
PowerShellCorpus/Github/Spinksy_Powershell/filesForQuery.ps1
filesForQuery.ps1
#Refresh objects $files = $null; $outfile = $null; #Grab filenames without extensions $files = Get-ChildItem -File | Select-Object basename #Build up string foreach($file in $files){ $outfile += $file.BaseName + ', '; } #Bazinga '(' + $outfile.Substring(0, $outfile.Length-2) + ')' | Out-File -Fil...
PowerShellCorpus/Github/devnought_docker-test/docker-load.ps1
docker-load.ps1
$ArchiveName = "nodetest.tar" # Load in a previously save image docker load -i $ArchiveName
PowerShellCorpus/Github/devnought_docker-test/docker-build-image.ps1
docker-build-image.ps1
$ImageTag = "nodetest:v1" $ArchiveName = "nodetest.tar" # Compile the service npm install tsc # Build the image docker build --tag $ImageTag . # Save the image out to a .tar docker save -o $ArchiveName $ImageTag
PowerShellCorpus/Github/devnought_docker-test/docker-run.ps1
docker-run.ps1
$ContainerName = "node_testy" $ImageTag = "nodetest:v1" $ContainerPort = 8000 $HostPort = 9000 # Compile the service npm install tsc # Remove container if it already exists (--force will stop containers running this image before removal) docker rm $ContainerName --force # Build the image docker build --...
PowerShellCorpus/Github/devnought_docker-test/docker-save.ps1
docker-save.ps1
$ImageTag = "nodetest:v1" $ArchiveName = "nodetest.tar" # Saves out the built standalone image as a .tar docker save $ImageTag -o $ArchiveName
PowerShellCorpus/Github/devnought_docker-test/docker-clean.ps1
docker-clean.ps1
$ContainerName = "node_testy" $ImageTag = "nodetest:v1" $ArchiveName = "nodetest.tar" docker rm $ContainerName --force # Clean up any dangling docker images docker rmi $(docker images --filter "dangling=true" --quiet) --force # Remove build image docker rmi $ImageTag --force # Clean project rm -Force -...
PowerShellCorpus/Github/McJeremy_MEFTest/MEFMVCDemo/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/McJeremy_MEFTest/MEFMVCDemo/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/McJeremy_MEFTest/MEFMVCDemo/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/McJeremy_MEFTest/MEFMVCDemo/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/McJeremy_MEFTest/MEFMVCDemo/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/McJeremy_MEFTest/MEFMVCDemo/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/McJeremy_MEFTest/MEFMVCDemo/packages/jQuery.UI.Combined.1.8.24/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Update the _references.js file Remove-Reference $scriptsFolderProjectItem $juiFileNameRegEx
PowerShellCorpus/Github/McJeremy_MEFTest/MEFMVCDemo/packages/jQuery.UI.Combined.1.8.24/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 $juiFileNameRegEx ...
PowerShellCorpus/Github/McJeremy_MEFTest/MEFMVCDemo/packages/jQuery.UI.Combined.1.8.24/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/McJeremy_MEFTest/MEFMVCDemo/packages/jQuery.1.8.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/McJeremy_MEFTest/MEFMVCDemo/packages/jQuery.1.8.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/McJeremy_MEFTest/MEFMVCDemo/packages/jQuery.1.8.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/david-driscoll_TypeScript.MSBuild.CI/copy-typescript.ps1
copy-typescript.ps1
if (Test-Path 'C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0') { Copy-Item 'C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0' '.\Microsoft SDKs\TypeScript\1.0' -Recurse -Force } if (Test-Path 'C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript') { Copy-Item 'C:\Program Files (x86...
PowerShellCorpus/Github/Lilochen_DeGalgnveglWebsite/WebSite_Galgnvegl/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/Lilochen_DeGalgnveglWebsite/WebSite_Galgnvegl/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/Lilochen_DeGalgnveglWebsite/WebSite_Galgnvegl/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/Lilochen_DeGalgnveglWebsite/WebSite_Galgnvegl/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/Lilochen_DeGalgnveglWebsite/WebSite_Galgnvegl/packages/Captcha.3.0.18.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) # bd nuget help page start 'http://captcha.com/doc/aspnet/captcha-getting-started-nuget.html?utm_source=nuget&utm_medium=nuget&utm_campaign=3.0.18.0' # get asp.net mvc version used by the project, if any try { $mvcRef = $project.Object.References | wher...
PowerShellCorpus/Github/Lilochen_DeGalgnveglWebsite/WebSite_Galgnvegl/packages/NuGet.Core.1.6.2/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) if ($project.Type -eq 'Web Site') { Import-Module (Join-Path $toolsPath VS.psd1) $srcFiles = Join-Path $installPath "lib\net40\*.dll" $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $destDirec...
PowerShellCorpus/Github/Lilochen_DeGalgnveglWebsite/WebSite_Galgnvegl/packages/NuGet.Core.1.6.2/tools/Uninstall.ps1
Uninstall.ps1
param($installPath, $toolsPath, $package, $project) if ($project.Type -eq 'Web Site') { Import-Module (Join-Path $toolsPath VS.psd1) $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $binDirectory = Join-Path $projectRoot "bin" $srcDirectory = Join-Path $...
PowerShellCorpus/Github/Lilochen_DeGalgnveglWebsite/WebSite_Galgnvegl/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/Lilochen_DeGalgnveglWebsite/WebSite_Galgnvegl/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/Lilochen_DeGalgnveglWebsite/WebSite_Galgnvegl/packages/jQuery.UI.Combined.1.8.24/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Update the _references.js file Remove-Reference $scriptsFolderProjectItem $juiFileNameRegEx
PowerShellCorpus/Github/Lilochen_DeGalgnveglWebsite/WebSite_Galgnvegl/packages/jQuery.UI.Combined.1.8.24/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 $juiFileNameRegEx ...
PowerShellCorpus/Github/Lilochen_DeGalgnveglWebsite/WebSite_Galgnvegl/packages/jQuery.UI.Combined.1.8.24/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/Lilochen_DeGalgnveglWebsite/WebSite_Galgnvegl/packages/jQuery.1.8.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/Lilochen_DeGalgnveglWebsite/WebSite_Galgnvegl/packages/jQuery.1.8.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/Lilochen_DeGalgnveglWebsite/WebSite_Galgnvegl/packages/jQuery.1.8.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/UltraSQL_MongoDBDailyReport/MTools.ps1
MTools.ps1
#----------------------------------------------------------------# # MTools.PS1 # Author: UltraSQL, 09/09/2015 # # Comment: 1. Use Mtools Analyze MongoDB Performance # 2. Send MongoDB Daily Report E-mail #----------------------------------------------------------------# $path = "D:\DBA\MTools\" $l...
PowerShellCorpus/Github/ckayfish_PoSH-AlwaysOnJobs.Engine/Job Files/testCounter1.ps1
testCounter1.ps1
param( [int]$countby = 10, [int]$pause = 3, [string]$outputStr = "Hi", [string]$logPath="" ) $dateStr = Get-Date -Format yyyyMMddHHss $logFile = "TstCount-$countby-$pause-$dateStr.log" $logFilePath=Join-Path $logPath $logFile "Countby : $countby" | Add-Content $logFilePath "Pause :...
PowerShellCorpus/Github/ckayfish_PoSH-AlwaysOnJobs.Engine/Job Files/syncDirectory.ps1
syncDirectory.ps1
param( [string]$sourceDir = "..\Sync Test\Source", [string]$destDirsCsv = "..\Sync Test\Dest1,..\Sync Test\Dest2", [int]$pause = 2, [string]$logPath="" ) write-host "logPath : $logPath" $dateStr = Get-Date -Format yyyyMMddHHss $logFile = "SyncDir-$dateStr.log" $logFilePath=Join-Path $logPath $log...
PowerShellCorpus/Github/ckayfish_PoSH-AlwaysOnJobs.Engine/App Root/AOJobs.Engine.Library.ps1
AOJobs.Engine.Library.ps1
#################################################################################### ############################### Function Start-AOJobs ############################# ##### ### Takes an Job XmlNode from the pipeline and starts the Job Function Start-AOJobs { [cmdletbinding()] Param ([parameter(ValueFromPi...
PowerShellCorpus/Github/ckayfish_PoSH-AlwaysOnJobs.Engine/App Root/AOJobs.Engine.Main.ps1
AOJobs.Engine.Main.ps1
############################################## ####### Entry point for AOJobs.Engine ######## ############################################## $svcName="AOJobs.Engine" $dateStart = Get-Date Set-Location $PSScriptRoot Write-Host "Starting : $svcName" Write-Host "Date/Time : $dateStart" Write-Host "Run...
PowerShellCorpus/Github/alexChuky_MusicStoreMVC/MVCMusicStore/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/alexChuky_MusicStoreMVC/MVCMusicStore/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/alexChuky_MusicStoreMVC/MVCMusicStore/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/alexChuky_MusicStoreMVC/MVCMusicStore/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/alexChuky_MusicStoreMVC/MVCMusicStore/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/alexChuky_MusicStoreMVC/MVCMusicStore/packages/jQuery.UI.Combined.1.8.24/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Update the _references.js file Remove-Reference $scriptsFolderProjectItem $juiFileNameRegEx