full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/silverioatosjr_My-Project/Sample/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/silverioatosjr_My-Project/Sample/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/silverioatosjr_My-Project/Sample/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/silverioatosjr_My-Project/Sample/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/silverioatosjr_My-Project/Sample/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/silverioatosjr_My-Project/Sample/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/silverioatosjr_My-Project/Sample/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/silverioatosjr_My-Project/Sample/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/silverioatosjr_My-Project/Sample/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/silverioatosjr_My-Project/Sample/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/silverioatosjr_My-Project/Sample/packages/Newtonsoft.Json.6.0.4/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # open json.net splash page on package install # don't open if json.net is installed as a dependency try { $url = "http://james.newtonking.com/json" $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) if ($dte2.ActiveWindow.Caption -eq "Package Manager Con...
PowerShellCorpus/Github/BrendanSturges_cleanAD/cleanAD.ps1
cleanAD.ps1
Import-Module ActiveDirectory $LogTime = Get-Date -Format "MM-dd-yyyy_hh-mm" $disableTime = (Get-Date).Adddays(-75) $deleteTime = (Get-Date).Adddays(-90) $serverList = Get-ADComputer -Filter * | Select -Expand Name #Check if FilePath exists, if not - create $doesItExist = Test-Path C:\Automation\ADCompu...
PowerShellCorpus/Github/OPSTest_E2E_Provision_1486508742580/.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/DarqueWarrior_team/src/common.ps1
common.ps1
Set-StrictMode -Version Latest $here = Split-Path -Parent $MyInvocation.MyCommand.Path function _handleException { param( [Parameter(Position=1)] $ex ) if ($ex.Exception.PSObject.Properties.Match('Response').count -gt 0 -and $ex.Exception.Response.StatusCode -ne "BadRequest") { $m...
PowerShellCorpus/Github/DarqueWarrior_team/test/mockProjectNameDynamicParamNoPSet.ps1
mockProjectNameDynamicParamNoPSet.ps1
Mock _buildProjectNameDynamicParam { # Set the dynamic parameters' name $ParameterName = 'ProjectName' # Create the dictionary $RuntimeParameterDictionary = New-Object System.Management.Automation.RuntimeDefinedParameterDictionary # Create the collection of attributes $AttributeCollection = New...
PowerShellCorpus/Github/DarqueWarrior_team/test/cloudSubscriptions.Tests.ps1
cloudSubscriptions.Tests.ps1
Set-StrictMode -Version Latest Get-Module team | Remove-Module -Force Import-Module $PSScriptRoot\..\src\cloudSubscriptions.psm1 -Force InModuleScope cloudSubscriptions { $env:TEAM_ACCT = 'https://test.visualstudio.com' Describe 'CloudSubscriptionns' { Context 'Get-CloudSubscription' { ...
PowerShellCorpus/Github/DarqueWarrior_team/test/mockProjectDynamicParam.ps1
mockProjectDynamicParam.ps1
Mock _buildProjectNameDynamicParam { # Set the dynamic parameters' name $ParameterName = 'Project' # Create the dictionary $RuntimeParameterDictionary = New-Object System.Management.Automation.RuntimeDefinedParameterDictionary # Create the collection of attributes $AttributeCollection = New-Obj...
PowerShellCorpus/Github/DarqueWarrior_team/test/common.Tests.ps1
common.Tests.ps1
#Set-StrictMode -Version Latest . "$PSScriptRoot\..\src\common.ps1" Describe 'Common' { Context '_buildProjectNameDynamicParam' { Mock _getProjects { return ConvertFrom-Json '["Demo", "Universal"]' } It 'should return dynamic parameter' { _buildProjectNameDynamicParam | Should ...
PowerShellCorpus/Github/DarqueWarrior_team/test/projects.Tests.ps1
projects.Tests.ps1
Set-StrictMode -Version Latest Get-Module team | Remove-Module -Force Import-Module $PSScriptRoot\..\src\projects.psm1 -Force InModuleScope projects { $env:TEAM_ACCT = 'https://test.visualstudio.com' Describe 'Project' { . "$PSScriptRoot\mockProjectNameDynamicParam.ps1" Context 'Get-Pro...
PowerShellCorpus/Github/DarqueWarrior_team/test/team.Tests.ps1
team.Tests.ps1
Set-StrictMode -Version Latest Get-Module team | Remove-Module -Force Import-Module $PSScriptRoot\..\src\team.psm1 -Force InModuleScope team { Describe 'Team' { . "$PSScriptRoot\mockProjectDynamicParam.ps1" Context 'Get-TeamInfo' { It 'should return account and default project' { ...
PowerShellCorpus/Github/DarqueWarrior_team/test/mockProjectNameDynamicParam.ps1
mockProjectNameDynamicParam.ps1
Mock _buildProjectNameDynamicParam { param( # Set the dynamic parameters' name $ParameterName = 'ProjectName', $ParameterSetName ) # Create the dictionary $RuntimeParameterDictionary = New-Object System.Management.Automation.RuntimeDefinedParameterDictionary # Create the colle...
PowerShellCorpus/Github/DarqueWarrior_team/test/Approvals.Tests.ps1
Approvals.Tests.ps1
Set-StrictMode -Version Latest Get-Module team | Remove-Module -Force # Required for the dynamic parameter Import-Module $PSScriptRoot\..\src\Approvals.psm1 -Force InModuleScope Approvals { $env:TEAM_ACCT = 'https://test.visualstudio.com' Describe 'Approvals' { . "$PSScriptRoot\mockProjectNameD...
PowerShellCorpus/Github/DarqueWarrior_team/test/queues.Tests.ps1
queues.Tests.ps1
Set-StrictMode -Version Latest Get-Module team | Remove-Module -Force Import-Module $PSScriptRoot\..\src\queues.psm1 -Force InModuleScope queues { $env:TEAM_ACCT = 'https://test.visualstudio.com' Describe 'Queues' { . "$PSScriptRoot\mockProjectNameDynamicParamNoPSet.ps1" Context 'Get-Qu...
PowerShellCorpus/Github/DarqueWarrior_team/test/debug.ps1
debug.ps1
Import-Module ..\team.psd1 -Force -Verbose Add-TeamAccount -Account http://10.0.0.5:8080/tfs/DefaultCollection -PersonalAccessToken vuhtbaixci3me7dag364fgp2hccdgzh6zznrvhvfgjzkxrrtmwpa -Verbose Set-DefaultProject nodeDemo -Verbose Remove-Release -id 1 -Verbose -Force
PowerShellCorpus/Github/DarqueWarrior_team/test/serviceendpoints.Tests.ps1
serviceendpoints.Tests.ps1
Set-StrictMode -Version Latest Get-Module team | Remove-Module -Force Import-Module $PSScriptRoot\..\src\serviceendpoints.psm1 -Force InModuleScope serviceendpoints { $env:TEAM_ACCT = 'https://test.visualstudio.com' Describe 'ServiceEndpoints' { . "$PSScriptRoot\mockProjectNameDynamicParamNoPSet...
PowerShellCorpus/Github/DarqueWarrior_team/test/buildDefinitions.Tests.ps1
buildDefinitions.Tests.ps1
Set-StrictMode -Version Latest Get-Module team | Remove-Module -Force # Required for the dynamic parameter Import-Module $PSScriptRoot\..\src\buildDefinitions.psm1 -Force InModuleScope buildDefinitions { $env:TEAM_ACCT = 'https://test.visualstudio.com' Describe 'BuildDefinitions' { . "$PSScript...
PowerShellCorpus/Github/DarqueWarrior_team/test/builds.Tests.ps1
builds.Tests.ps1
Set-StrictMode -Version Latest Get-Module team | Remove-Module -Force Import-Module $PSScriptRoot\..\src\queues.psm1 -Force Import-Module $PSScriptRoot\..\src\builds.psm1 -Force InModuleScope builds { $env:TEAM_ACCT = 'https://test.visualstudio.com' # Just a shell for the nest dynamic parameters #...
PowerShellCorpus/Github/CodyAntcliffe_Powershell-Scripts/RemovePrinters.ps1
RemovePrinters.ps1
$PRINTERS = (get-wmiobject -q "select * from win32_printer") foreach($printerName in $PRINTERS) {$printerName.psbase.delete()}
PowerShellCorpus/Github/CodyAntcliffe_Powershell-Scripts/getmissingmachine.ps1
getmissingmachine.ps1
#Remove previous lists Remove-Item C:\scripts\GetMissingMachines\exceptionList.txt Remove-Item C:\scripts\GetMissingMachines\wsus.txt Remove-Item C:\scripts\GetMissingMachines\net.txt #Gets the elements we need from netview net view > C:\scripts\GetMissingMachines\netviewdump.txt foreach($string in Get-Conten...
PowerShellCorpus/Github/OPSTest_E2E_Provision_1485709542326/.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/levj1_Entity-Framework-Prac/TestMVC/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/levj1_Entity-Framework-Prac/TestMVC/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/levj1_Entity-Framework-Prac/TestMVC/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/levj1_Entity-Framework-Prac/TestMVC/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/levj1_Entity-Framework-Prac/TestMVC/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/levj1_Entity-Framework-Prac/TestMVC/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/levj1_Entity-Framework-Prac/TestMVC/packages/Microsoft.ApplicationInsights.WindowsServer.2.1.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/levj1_Entity-Framework-Prac/TestMVC/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/levj1_Entity-Framework-Prac/TestMVC/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/levj1_Entity-Framework-Prac/TestMVC/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/levj1_Entity-Framework-Prac/TestMVC/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/levj1_Entity-Framework-Prac/TestMVC/packages/Newtonsoft.Json.6.0.4/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # open json.net splash page on package install # don't open if json.net is installed as a dependency try { $url = "http://james.newtonking.com/json" $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) if ($dte2.ActiveWindow.Caption -eq "Package Manager Con...
PowerShellCorpus/Github/levj1_Entity-Framework-Prac/EF-Practise/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/levj1_Entity-Framework-Prac/EF-Practise/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/levj1_Entity-Framework-Prac/NinjaEF/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/levj1_Entity-Framework-Prac/NinjaEF/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/levj1_Entity-Framework-Prac/NinjaEF/packages/EntityFramework.6.1.2/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 # MIIa2AYJKoZIhvcNAQcCoIIayTCCGsUCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQ...
PowerShellCorpus/Github/levj1_Entity-Framework-Prac/NinjaEF/packages/EntityFramework.6.1.2/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/shanwork_Projects-and-Platforms/Disaster Recovery/Componentized/Data Entities/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/shanwork_Projects-and-Platforms/Disaster Recovery/Componentized/Data Entities/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/shanwork_Projects-and-Platforms/Disaster Recovery/Componentized/Data Entities/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/shanwork_Projects-and-Platforms/Disaster Recovery/Componentized/Data Entities/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/shanwork_Projects-and-Platforms/Disaster Recovery/Componentized/Data Entities/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/shanwork_Projects-and-Platforms/Disaster Recovery/Componentized/Data Entities/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/shanwork_Projects-and-Platforms/Disaster Recovery/Componentized/Data Entities/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/shanwork_Projects-and-Platforms/Disaster Recovery/Componentized/Data Entities/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/shanwork_Projects-and-Platforms/Disaster Recovery/Componentized/Data Entities/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/shanwork_Projects-and-Platforms/Disaster Recovery/Componentized/Data Entities/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/shanwork_Projects-and-Platforms/Disaster Recovery/Componentized/Data Entities/packages/Newtonsoft.Json.6.0.4/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # open json.net splash page on package install # don't open if json.net is installed as a dependency try { $url = "http://james.newtonking.com/json" $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) if ($dte2.ActiveWindow.Caption -eq "Package Manager Con...
PowerShellCorpus/Github/LastMisadventure_Overcraft/CraftTheWorld.ps1
CraftTheWorld.ps1
[CmdletBinding()] param( [System.IO.DirectoryInfo]$BaseModificationDirectory = "C:\Users\alexc\OneDrive\Documents\Games\CraftTheWorld\Script", [System.IO.DirectoryInfo]$BaseUpdateCacheDirectory = "G:\SteamLibrary\steamapps\common\CraftTheWorld\UpdateCache", [switch]$FinalizeVersion ) # dot-source fu...
PowerShellCorpus/Github/LastMisadventure_Overcraft/Private/AddDirectoryToZipArchive.ps1
AddDirectoryToZipArchive.ps1
function AddDirectoryToZipArchive { [CmdletBinding()] param ( [ValidateScript( {Test-Path -Path $_ -PathType Container})] [System.IO.DirectoryInfo]$Directory, [ValidateScript( {Test-Path -Path $_ -PathType Leaf})] [System.IO.FileInfo]$DestinationArchive ) try { ...
PowerShellCorpus/Github/LastMisadventure_Overcraft/Private/FinalizeVersion.ps1
FinalizeVersion.ps1
# generate SHA256 hash and upload file to OneDrive function FinalizeVersion { [CmdletBinding()] param ( [System.IO.FileInfo]$ArchiveFile, [System.IO.DirectoryInfo]$UploadLocation ) $hash = Get-FileHash -Path $ArchiveFile -Algorithm SHA256 Copy-Item -Path $ArchiveFile -Destina...
PowerShellCorpus/Github/LastMisadventure_Overcraft/Private/SetCTWCharLevel.ps1
SetCTWCharLevel.ps1
PowerShellCorpus/Github/LastMisadventure_Overcraft/Private/SetCTWXMLFromCSV.ps1
SetCTWXMLFromCSV.ps1
[CmdletBinding()] param ( [Parameter( ValueFromPipelineByPropertyName = $True, Mandatory = $True)] [ValidateNotNullOrEmpty()] [ValidateSet('creatures', 'blocks', 'items', 'recipe', 'resource_bind', 'craft_resources')] [String]$Type ) function ImportData { [CmdletBindi...
PowerShellCorpus/Github/LastMisadventure_Overcraft/Private/CopyXMLToCache.ps1
CopyXMLToCache.ps1
function CopyXMLToCache { [CmdletBinding()] param( [Parameter( ValueFromPipeline = $true)] [System.IO.FileInfo]$File ) Write-Verbose "Copying $($file.Name) to $($BaseUpdateCacheDirectory)." Copy-Item -Force -Path $File.FullName -Destination $BaseUpdateCacheDirecto...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_NewRepo_2017_4_15_12_5_19/.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/TellHell_NewTechTask/NewTechTask/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/TellHell_NewTechTask/NewTechTask/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/TellHell_NewTechTask/NewTechTask/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/TellHell_NewTechTask/NewTechTask/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/TellHell_NewTechTask/NewTechTask/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/TellHell_NewTechTask/NewTechTask/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/TellHell_NewTechTask/NewTechTask/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/TellHell_NewTechTask/NewTechTask/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/TellHell_NewTechTask/NewTechTask/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/TellHell_NewTechTask/NewTechTask/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/TellHell_NewTechTask/NewTechTask/packages/Newtonsoft.Json.6.0.4/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # open json.net splash page on package install # don't open if json.net is installed as a dependency try { $url = "http://james.newtonking.com/json" $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) if ($dte2.ActiveWindow.Caption -eq "Package Manager Con...
PowerShellCorpus/Github/vebaspect_powershell-scripts/Zarządzanie archiwami ZIP.ps1
Zarządzanie archiwami ZIP.ps1
# Utworzenie archiwum ZIP (Sample.zip), które zawiera wszystkie pliki z rozszerzeniem PDB znajdujące się w bieżącym folderze. Compress-Archive *.pdb -DestinationPath Sample.zip # Wyciągnięcie wszystkich plików ze wskazanego archiwum ZIP (Sample.zip). Expand-Archive -Path Sample.zip
PowerShellCorpus/Github/vebaspect_powershell-scripts/Usuwanie plikвw.ps1
Usuwanie plikвw.ps1
# Usunięcie wszystkich plików z rozszerzeniem PDB z bieżącego folderu. Remove-Item *.pdb -Force # Usunięcie wszystkich plików z rozszerzeniem PDB z bieżącego folderu i wszystkich jego podfolderów. Get-ChildItem *.pdb -Recurse | Remove-Item -Force
PowerShellCorpus/Github/ericpennachini_UADER_FCYT_Plataforma_.NET/PNet/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/ericpennachini_UADER_FCYT_Plataforma_.NET/PNet/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/ericpennachini_UADER_FCYT_Plataforma_.NET/PNet/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/ericpennachini_UADER_FCYT_Plataforma_.NET/PNet/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/ericpennachini_UADER_FCYT_Plataforma_.NET/PNet/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/ericpennachini_UADER_FCYT_Plataforma_.NET/PNet/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/ericpennachini_UADER_FCYT_Plataforma_.NET/PNet/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/ericpennachini_UADER_FCYT_Plataforma_.NET/PNet/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/ericpennachini_UADER_FCYT_Plataforma_.NET/PNet/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/ericpennachini_UADER_FCYT_Plataforma_.NET/PNet/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/ericpennachini_UADER_FCYT_Plataforma_.NET/PNet/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/jdhitsolutions_MyPSTool/file4.ps1
file4.ps1
#this is a sample file [cmdletbinding()] Param([string]$Computername = $env:computername) Write-Verbose "Getting classic eventlog list from $Computername that have entries" Get-eventlog -list -computername $computername | where {$_.Entries.count -gt 0}
PowerShellCorpus/Github/jdhitsolutions_MyPSTool/file2.ps1
file2.ps1
function Get-LogList { Param() Get-Eventlog -list} #demo
PowerShellCorpus/Github/jdhitsolutions_MyPSTool/file1.ps1
file1.ps1
#this is a sample script file Get-Process | sort-object -property VM -descending | select-object -first 10
PowerShellCorpus/Github/jdhitsolutions_MyPSTool/file3.ps1
file3.ps1
#this is a new file
PowerShellCorpus/Github/NerdCats_AzureTools/ResizeDataDisk.ps1
ResizeDataDisk.ps1
# Authenticate to Azure Account Add-AzureAccount # Select Azure Subscription $subscription = (Get-AzureSubscription).SubscriptionName ` | Out-GridView ` -Title "Select Azure Subscription" ` -PassThru Select-AzureSubscription ` -SubscriptionName $subscription ` -Current # Select Azure Storage Account ...
PowerShellCorpus/Github/NerdCats_AzureTools/GenerateMachineKey.ps1
GenerateMachineKey.ps1
# Generates a <machineKey> element that can be copied + pasted into a Web.config file. function Generate-MachineKey { [CmdletBinding()] param ( [ValidateSet("AES", "DES", "3DES")] [string]$decryptionAlgorithm = 'AES', [ValidateSet("MD5", "SHA1", "HMACSHA256", "HMACSHA384", "HMACSHA512")] [str...
PowerShellCorpus/Github/Hajan39_VIA_API/API_VIA_Code/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/Hajan39_VIA_API/API_VIA_Code/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/Hajan39_VIA_API/API_VIA_Code/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/Hajan39_VIA_API/API_VIA_Code/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...