full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/MirzaBasic_eCosmetics/MVC_API/packages/Microsoft.ApplicationInsights.WindowsServer.2.2.0/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) if ([System.IO.File]::Exists($project.FullName)) { function MarkItemASCopyToOutput($item) { Try { #mark it to copy if newer $item.Properties.Item("CopyToOutputDirectory").Value = 2 } Catch { write-host $_.Exception.ToString() }...
PowerShellCorpus/Github/MirzaBasic_eCosmetics/MVC_API/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/MirzaBasic_eCosmetics/MVC_API/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/MirzaBasic_eCosmetics/MVC_API/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/MirzaBasic_eCosmetics/MVC_API/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/aarodynamics_CreateDeviceColletions.ps1/CreateDeviceCollections.ps1
CreateDeviceCollections.ps1
<# # # This script: # Creates collections for OSD and Windows 10 Servicing, # also creates membership queries and use include and excludes. # Check the variables (and adjust if necessary) before running # # Niall Brady 2016/5/13 # #> Clear Function Create-Collection($CollectionName) {...
PowerShellCorpus/Github/By2048_ASP.NET-MVC/ImageSite/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/By2048_ASP.NET-MVC/ImageSite/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/By2048_ASP.NET-MVC/ImageSite/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/By2048_ASP.NET-MVC/ImageSite/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/By2048_ASP.NET-MVC/ImageSite/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/By2048_ASP.NET-MVC/ImageSite/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/By2048_ASP.NET-MVC/ImageSite/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/By2048_ASP.NET-MVC/ImageSite/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/By2048_ASP.NET-MVC/ImageSite/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/By2048_ASP.NET-MVC/ImageSite/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/By2048_ASP.NET-MVC/SSLS/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/By2048_ASP.NET-MVC/SSLS/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/By2048_ASP.NET-MVC/SSLS/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/By2048_ASP.NET-MVC/SSLS/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/By2048_ASP.NET-MVC/SSLS/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/By2048_ASP.NET-MVC/SSLS/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/By2048_ASP.NET-MVC/SSLS/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/By2048_ASP.NET-MVC/SSLS/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/By2048_ASP.NET-MVC/SSLS/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/By2048_ASP.NET-MVC/SSLS/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/By2048_ASP.NET-MVC/MyStore/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/By2048_ASP.NET-MVC/MyStore/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/By2048_ASP.NET-MVC/MyStore/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/By2048_ASP.NET-MVC/MyStore/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/By2048_ASP.NET-MVC/MyStore/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/By2048_ASP.NET-MVC/MyStore/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/By2048_ASP.NET-MVC/MyStore/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/By2048_ASP.NET-MVC/MyStore/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/SO-2C-2016_resources/ps_header.ps1
ps_header.ps1
# Nombre Del Script: # Trabajo Práctico Nro.: # Ejercicio Nro.: # Entrega: # Integrantes: APELLIDOS, nombres, DNI # @integrante1 # @integrante2 # Descripción:
PowerShellCorpus/Github/gmarana_TestOnly/NodejsWebApp1/NodejsWebApp1/bin/ChangeConfig.ps1
ChangeConfig.ps1
$configFile = $args[0] Write-Host "Adding iisnode section to config file '$configFile'" $config = New-Object System.Xml.XmlDocument $config.load($configFile) $xpath = $config.CreateNavigator() $parentElement = $xpath.SelectSingleNode("//configuration/configSections/sectionGroup[@name='system.webServer']") $iisn...
PowerShellCorpus/Github/gmarana_TestOnly/NodejsWebApp1/NodejsWebApp1/bin/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient function downloadWithRetry { param([string]$url, [string]$dest, [int]$retry) Write-Host Write-Host "Attempt: $retry" Write-Host trap { Write-Hos...
PowerShellCorpus/Github/nickward13_NotificationServiceResourceGroup/NotificationResourceGroup/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 = 'NotificationResourceGroup', [switch] $UploadArtifacts, [string] $StorageAccountName, [string] $Stor...
PowerShellCorpus/Github/nickward13_NotificationServiceResourceGroup/NotificationResourceGroup/bin/Debug/staging/NotificationResourceGroup/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 = 'NotificationResourceGroup', [switch] $UploadArtifacts, [string] $StorageAccountName, [string] $Stor...
PowerShellCorpus/Github/samefing_newfile/new-file.ps1
new-file.ps1
# Creator: JCruickshank # Created: 17/04/2017 # Amended: 18/04/2017 new-item -type file -path c:\downloads\test.txt
PowerShellCorpus/Github/fenilpatel35_hello-world/Parse-ConfigFiles.ps1
Parse-ConfigFiles.ps1
class Database { [string] $Key; [string] $Server; [string] $Database; Database(){} Database([string]$key, [string] $server, [string] $database){ $this.Key = $key; $this.Server = $server; $this.Database = $database; } } class AppConnection { [string] ...
PowerShellCorpus/Github/fenilpatel35_hello-world/Parse-Configs.ps1
Parse-Configs.ps1
class Inventory2 { [string] $Server; [string] $FileName; [string[]] $Connections; Inventory2([string]$server, [string]$fileName){ $this.Server = $server; $this.FileName = $fileName; $this.Connections = @() } Inventory2([string]$server, [string]$fileName...
PowerShellCorpus/Github/isjwuk_test-cas/test-CAS.ps1
test-CAS.ps1
#Powershell Function to Validate a CAS #What is a CAS? - See http://www.cas.org/content/chemical-substances/faqs Function Test-CAS { [cmdletbinding()] Param ( [string]$CASNumber ) Process { Try { $CASNumber = $CASNumber.Trim() #A CAS Registry Number includes up to 10 digits...
PowerShellCorpus/Github/sergey-s-betke_ITG.Outlook/test.ps1
test.ps1
[CmdletBinding( SupportsShouldProcess=$true, ConfirmImpact="Medium" )] param ( [Parameter( Mandatory=$false, Position=0, ValueFromPipeline=$false, HelpMessage="Полный путь к файлу, из которого будем импортировать." )] [System.IO.FileInfo] $csvFile = ` ...
PowerShellCorpus/Github/sergey-s-betke_ITG.Outlook/ITG.PrepareModulesEnv.ps1
ITG.PrepareModulesEnv.ps1
<# .Synopsis Скрипт, вызываемый при загрузке модулей ITG. Выполняет подготовку для загрузки модулей ITG. .Description Скрипт, вызываемый при загрузке модулей ITG. Выполняет подготовку для загрузки модулей ITG. На данном этапе: - добавляет в $env:PSModulePath каталог загружаемого модуля, чтобы все ...
PowerShellCorpus/Github/CraigI_DeprovisionDisabledUsers/DeprovisionDisabledUsers.ps1
DeprovisionDisabledUsers.ps1
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://exchange.domain.local/PowerShell/ -Authentication Kerberos Import-PSSession $Session $DeleteAfterDays = 7 $CurrentTime = Get-Date $StrDateTime = get-date -uformat "%m%d%Y-%I%M%S%p" #08112010-83805PM = 08/11/2010 8:38:05 PM $Sc...
PowerShellCorpus/Github/CraigI_DeprovisionDisabledUsers/DeprovisionDisabledUsers_v2.ps1
DeprovisionDisabledUsers_v2.ps1
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://exchange.domain.local/PowerShell/ -Authentication Kerberos Import-PSSession $Session $DeleteAfterDays = 7 $CurrentTime = Get-Date $StrDateTime = get-date -uformat "%m%d%Y-%I%M%S%p" #08112010-83805PM = 08/11/2010 8:38:05 PM $Sc...
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/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/arturmichalski_TeamPlanner/TeamPlanner/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/arturmichalski_TeamPlanner/TeamPlanner/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/arturmichalski_TeamPlanner/TeamPlanner/packages/Bootstrapper.2.0.3.13/tools/init.ps1
init.ps1
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/packages/Bootstrapper.2.0.3.13/tools/uninstall.ps1
uninstall.ps1
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/packages/Bootstrapper.2.0.3.13/tools/install.ps1
install.ps1
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/packages/MvcSiteMapProvider.Web.4.6.1/tools/uninstall.ps1
uninstall.ps1
# uninstall.ps1 param($installPath, $toolsPath, $package, $project) function Remove-AppSettings() { $xml = New-Object xml # find the Web.config file $config = $project.ProjectItems | where {$_.Name -eq "Web.config"} # find its path on the file system $localPath = $config.Properties | where {$_.Name -e...
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/packages/MvcSiteMapProvider.Web.4.6.1/tools/install.ps1
install.ps1
# install.ps1 param($rootPath, $toolsPath, $package, $project) function CountSolutionFilesByExtension($extension) { $path = [System.IO.Path]::GetDirectoryName($project.FullName) $totalfiles = [System.IO.Directory]::EnumerateFiles("$path", "*." + $extension, [System.IO.SearchOption]::AllDirectories) [int]$tota...
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/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/arturmichalski_TeamPlanner/TeamPlanner/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/arturmichalski_TeamPlanner/TeamPlanner/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/arturmichalski_TeamPlanner/TeamPlanner/packages/MvcSiteMapProvider.MVC4.4.6.18/tools/install.ps1
install.ps1
# install.ps1 param($rootPath, $toolsPath, $package, $project) $DTE.ItemOperations.Navigate("http://maartenba.github.io/MvcSiteMapProvider/getting-started.html", $DTE.vsNavigateOptions.vsNavigateOptionsNewWindow)
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/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/arturmichalski_TeamPlanner/TeamPlanner/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/arturmichalski_TeamPlanner/TeamPlanner/packages/AutoMapper.3.3.1/tools/wp8/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) # This is the MSBuild targets file to add $targetsFile = [System.IO.Path]::Combine($toolsPath, '..\' + $package.Id + '.targets') # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Cu...
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/packages/AutoMapper.3.3.1/tools/wp8/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' # Grab the loaded MSBuild project for the project $msbuild = [Microsoft.Build.Evaluatio...
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/packages/AutoMapper.3.3.1/tools/sl5/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) # This is the MSBuild targets file to add $targetsFile = [System.IO.Path]::Combine($toolsPath, '..\' + $package.Id + '.targets') # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Cu...
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/packages/AutoMapper.3.3.1/tools/sl5/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' # Grab the loaded MSBuild project for the project $msbuild = [Microsoft.Build.Evaluatio...
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/packages/AutoMapper.3.3.1/tools/windows8/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) # This is the MSBuild targets file to add $targetsFile = [System.IO.Path]::Combine($toolsPath, '..\' + $package.Id + '.targets') # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Cu...
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/packages/AutoMapper.3.3.1/tools/windows8/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' # Grab the loaded MSBuild project for the project $msbuild = [Microsoft.Build.Evaluatio...
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/packages/AutoMapper.3.3.1/tools/MonoTouch/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) # This is the MSBuild targets file to add $targetsFile = [System.IO.Path]::Combine($toolsPath, '..\' + $package.Id + '.targets') # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Cu...
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/packages/AutoMapper.3.3.1/tools/MonoTouch/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' # Grab the loaded MSBuild project for the project $msbuild = [Microsoft.Build.Evaluatio...
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/packages/AutoMapper.3.3.1/tools/MonoAndroid/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) # This is the MSBuild targets file to add $targetsFile = [System.IO.Path]::Combine($toolsPath, '..\' + $package.Id + '.targets') # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Cu...
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/packages/AutoMapper.3.3.1/tools/MonoAndroid/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' # Grab the loaded MSBuild project for the project $msbuild = [Microsoft.Build.Evaluatio...
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/packages/AutoMapper.3.3.1/tools/wpa81/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) # This is the MSBuild targets file to add $targetsFile = [System.IO.Path]::Combine($toolsPath, '..\' + $package.Id + '.targets') # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Cu...
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/packages/AutoMapper.3.3.1/tools/wpa81/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' # Grab the loaded MSBuild project for the project $msbuild = [Microsoft.Build.Evaluatio...
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/packages/AutoMapper.3.3.1/tools/net40/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) # This is the MSBuild targets file to add $targetsFile = [System.IO.Path]::Combine($toolsPath, '..\' + $package.Id + '.targets') # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Cu...
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/packages/AutoMapper.3.3.1/tools/net40/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' # Grab the loaded MSBuild project for the project $msbuild = [Microsoft.Build.Evaluatio...
PowerShellCorpus/Github/arturmichalski_TeamPlanner/TeamPlanner/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/arturmichalski_TeamPlanner/TeamPlanner/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/arturmichalski_TeamPlanner/TeamPlanner/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/cboroson_ThycoticToggl/ImportTogglClientsAsFolders.ps1
ImportTogglClientsAsFolders.ps1
####################################################### ### ### ### Filename: ImportTogglClientsAsFolders.ps1 ### ### Author: Craig Boroson ### ### Version: 1.0 ### ### Date: May 1, 2017 ...
PowerShellCorpus/Github/desdic_exportveeamtocvs/exportveeamtocsv.ps1
exportveeamtocsv.ps1
asnp "VeeamPSSnapIn" -ErrorAction SilentlyContinue $veeamExePath = "C:\Program Files\Veeam\Backup and Replication\Backup\Veeam.Backup.Shell.exe" $veeamDllPath = "C:\Program Files\Veeam\Backup and Replication\Backup\Veeam.Backup.Common.dll" $csvfile = "C:\temp\veeamexport.csv" $ftppath = "ftp://veeam:xxxxxxxxxxxC@...
PowerShellCorpus/Github/SqlSandwiches_SQLSandwiches/version.ps1
version.ps1
#Let's see what version is running get-host| Select-Object version, name #That's not enough info!! GIVE ME MORE! get-host| Select-Object * #Or we can use a powershell variable $psversiontable
PowerShellCorpus/Github/SqlSandwiches_SQLSandwiches/Top_10_largest_Files.ps1
Top_10_largest_Files.ps1
Get-ChildItem "C:\musics" -recurse ` | Sort-Object length -descending ` | select-object -first 10
PowerShellCorpus/Github/SqlSandwiches_SQLSandwiches/find_drive_space_2.ps1
find_drive_space_2.ps1
#if you just want to run this on the computer you are on use this: #$CompName = get-content env:computername #of if you want to check a list of computers, make a txt file with the comp names in it $CompName = Get-Content c:\devwork\servers.txt Get-WMIObject Win32_LogicalDisk -filter "DriveType=3" -computer $Com...
PowerShellCorpus/Github/SqlSandwiches_SQLSandwiches/Policy.ps1
Policy.ps1
#let's try out a script C:\DevWork\PS\error_balloon.ps1 #OH NO! let's see how what our policy is set to Get-ExecutionPolicy #Let's change that dude Set-ExecutionPolicy Unrestricted #Let's try that again C:\DevWork\PS\error_balloon.ps1 Set-ExecutionPolicy Restricted
PowerShellCorpus/Github/SqlSandwiches_SQLSandwiches/error_balloon.ps1
error_balloon.ps1
[system.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms') | Out-Null $balloon = New-Object System.Windows.Forms.NotifyIcon $path = Get-Process -id $pid | Select-Object -ExpandProperty Path $icon = [System.Drawing.Icon]::ExtractAssociatedIcon($path) $balloon.Icon = $icon $balloon.BalloonTipIcon = 'E...
PowerShellCorpus/Github/OPS-E2E-Prod_E2E_P_NewRepo_2017_4_26_23_17_23/.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/anyangmaxin_MVCImageManager/MVCImageManager/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/anyangmaxin_MVCImageManager/MVCImageManager/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/anyangmaxin_MVCImageManager/MVCImageManager/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/anyangmaxin_MVCImageManager/MVCImageManager/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/anyangmaxin_MVCImageManager/MVCImageManager/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/anyangmaxin_MVCImageManager/MVCImageManager/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/anyangmaxin_MVCImageManager/MVCImageManager/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/anyangmaxin_MVCImageManager/MVCImageManager/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/anyangmaxin_MVCImageManager/MVCImageManager/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/anyangmaxin_MVCImageManager/MVCImageManager/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/glasnt_wail2ban/wail2ban_htmlgen.ps1
wail2ban_htmlgen.ps1
#wail2ban statistics $wail2banInstall = ""+(Get-Location)+"\" $BannedIPLog = $wail2banInstall+"bannedIPLog.ini" $logFile = $wail2banInstall+"wail2ban_log.log" $HTMLFile = $wail2banInstall+"public_html/index.html" function html ($a) { $a | out-file $HTMLFile -append } ""|out-file $HTMLFile; clear-cont...
PowerShellCorpus/Github/glasnt_wail2ban/wail2ban.ps1
wail2ban.ps1
################################################################################ # _ _ ____ _ # __ ____ _(_) |___ \| |__ __ _ _ __ # \ \ /\ / / _` | | | __) | '_ \ / _` | '_ \ # \ V V / (_| | | |/ __/| |_) | (_| | | | | # \_/\_/...
PowerShellCorpus/Github/olegeroshenko_my/ws_deploy.ps1
ws_deploy.ps1
powershell Set-ExecutionPolicy RemoteSigned if ((Get-PSSnapin -Name VMWare.VimAutomation.Core -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin VMWare.VimAutomation.Core } $EsxServer="ctd-vc01.cisco.com" $EsxUser="cisco\oyeroshe" $EsxPass="MJ23JORd" $GuestUser="qadmin" $GuestPassword="Cisco123" ...
PowerShellCorpus/Github/momcms_MoM.Dev/usersecret.ps1
usersecret.ps1