full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/Hajan39_VIA_API/API_VIA_Code/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/Hajan39_VIA_API/API_VIA_Code/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/Hajan39_VIA_API/API_VIA_Code/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/Hajan39_VIA_API/API_VIA_Code/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/Hajan39_VIA_API/API_VIA_Code/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/Hajan39_VIA_API/API_VIA_Code/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/Hajan39_VIA_API/API_VIA_Code/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/Hajan39_VIA_API/API_VIA_Code/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/jtcressy_powercli_docker/scripts/set-CD-drives.ps1 | set-CD-drives.ps1 | #Script by Joel Cressy (http://github.com/jtcressy)
if(!(Get-Module PowerCLI*)){
Get-Module -ListAvailable PowerCLI* | Import-Module
}
#If the user does not provide exactly 5 arguments, we'll have to ask them interactively
if (!($args.Count -eq 5)) {
#inform the user of proper syntax
Write-Host "Usag... |
PowerShellCorpus/Github/jtcressy_powercli_docker/scripts/ProcedureNewUser.ps1 | ProcedureNewUser.ps1 | #Script by Joel Cressy (http://github.com/jtcressy)
if(!(Get-Module PowerCLI*)){
#import powercli modules if not already imported
Get-Module -ListAvailable PowerCLI* | Import-Module
}
#Editable Variables
$DefaultRAM = "8192"
$DefaultCPU = "20000"
$ADNetBIOSName = "CRL"
#connect to vcenter, will promp... |
PowerShellCorpus/Github/jtcressy_powercli_docker/scripts/powercli.ps1 | powercli.ps1 | Get-Module -ListAvailable PowerCLI* | Import-Module
Connect-VIServer -Server $args[0] -User $args[1] -Password $args[2] |
PowerShellCorpus/Github/AsishP_SharePointOnPrem/PowerShell/GetAuthenticationSPServer.ps1 | GetAuthenticationSPServer.ps1 | ############################################################################################################################################
# Script that gets the authentication type for each web application in a SharePoint farm
# Required Parameters: N/A
#########################################################... |
PowerShellCorpus/Github/AsishP_SharePointOnPrem/PowerShell/GetAllWebPartsOnPages.ps1 | GetAllWebPartsOnPages.ps1 | # Copied from: https://sharepoint.stackexchange.com/questions/12847/how-do-i-find-in-which-subsites-a-webpart-feature-is-used
# Basis: http://www.glynblogs.com/2011/07/listing-all-web-parts-in-a-site-collection-with-powershell.html
# Modified by http://sharepoint.stackexchange.com/users/2509/tarjeieo
function EnumAl... |
PowerShellCorpus/Github/AsishP_SharePointOnPrem/PowerShell/FindLargeLists.ps1 | FindLargeLists.ps1 | Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue
#Lists with values higher than threshold will be returned
[int]$threshold = 5000
[string]$url = "<SiteCollectionURL>"
$results = @()
function Get-SPListCollection {
PARAM
(
[Parameter(ValueFromPipeline=$true)] [Microsoft.SharePoint.SPWeb... |
PowerShellCorpus/Github/AsishP_SharePointOnPrem/PowerShell/GetExternalContentTypes.ps1 | GetExternalContentTypes.ps1 | Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue
#Find External Lists and their details
[string]$url = "<SiteCollectionURL>"
$results = @()
$count = 0
function Get-SPListCollection {
PARAM
(
[Parameter(ValueFromPipeline=$true)] [Microsoft.SharePoint.SPWeb] $SPWeb
)
BEGIN {
}
END ... |
PowerShellCorpus/Github/AsishP_SharePointOnPrem/PowerShell/GetAllWebsCount.ps1 | GetAllWebsCount.ps1 | $webappUrl = "http://localhost"
$webapp = Get-SPWebApplication $webappUrl
$allWebsCount = 0
$webapp.Sites | % { $allWebsCount += $_.AllWebs.Count; $_.Dispose(); }
Write-Host "There are" $allWebsCount "webs" -ForegroundColor Green |
PowerShellCorpus/Github/AsishP_SharePointOnPrem/PowerShell/ExportSiteFeatures.ps1 | ExportSiteFeatures.ps1 | Get-SPSite <siteCollectionURL> | % {
$results = @()
Get-SPFeature -Site $_ -Limit All | % {
$feature = $_;
$featuresDefn = (Get-SPFarm).FeatureDefinitions[$_.ID];
$cc = [System.Globalization.CultureInfo]::CurrentCulture;
$obj = New-Object PSObject;
$obj | Add... |
PowerShellCorpus/Github/AsishP_SharePointOnPrem/PowerShell/CheckLanguagePacksSP2010.ps1 | CheckLanguagePacksSP2010.ps1 | # PowerShell script to display SharePoint products from the registry.
# location in registry to get info about installed software
$RegLoc = Get-ChildItem HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall
# Get SharePoint Products and language packs
write-host "Products and Language Packs"
write-hos... |
PowerShellCorpus/Github/AsishP_SharePointOnPrem/PowerShell/CheckLanguagePacksSP2013.ps1 | CheckLanguagePacksSP2013.ps1 | # PowerShell script to display SharePoint products from the registry.
Param(
# decide on whether all the sub-components belonging to the product should be shown as well
[switch]$ShowComponents
)
# location in registry to get info about installed software
$RegLoc = Get-ChildItem HKLM:\Software\Microsoft\... |
PowerShellCorpus/Github/AsishP_SharePointOnPrem/PowerShell/GetWebPartsDashboardPages.ps1 | GetWebPartsDashboardPages.ps1 | #Enumerate all webparts in Dashboard Pages
function EnumAllWebPartsOfSiteCollection($Url, $WebRelURL) {
$site = Get-SPSite -Identity $Url
$web = $site.OpenWeb($WebRelURL)
$allFiles = @()
Write-Host "Processing Web:" $web.Url -NoNewLine
$pages = $null
$pages = $web.Lists["Dashboards"]
if ($pages) {... |
PowerShellCorpus/Github/AsishP_SharePointOnPrem/PowerShell/DistributedCacheServiceAccount.ps1 | DistributedCacheServiceAccount.ps1 | $farm = Get-SPFarm
$cacheService = $farm.Services | where {$_.Name -eq "AppFabricCachingService"}
$accnt = Get-SPManagedAccount -Identity "mining\sp_svc_dist_cache"
$cacheService.ProcessIdentity.CurrentIdentityType = "SpecificUser"
$cacheService.ProcessIdentity.ManagedAccount = $accnt
$cacheService.ProcessIdentit... |
PowerShellCorpus/Github/AsishP_SharePointOnPrem/PowerShell/GetWebsitesAndLastModifiedDate.ps1 | GetWebsitesAndLastModifiedDate.ps1 | $results = @()
$gc = Start-SPAssignment
$site= $gc | get-spsite -Identity https://sitecollectionURL
Write-Host "Start processing ...."
foreach($web in $site.AllWebs)
{
$obj = New-Object PSObject;
$obj | Add-Member NoteProperty WebSite $($web.Title);
$obj | Add-Member NoteProperty WebUrl $($web.U... |
PowerShellCorpus/Github/AsishP_SharePointOnPrem/PowerShell/ExportAllWebFeatures.ps1 | ExportAllWebFeatures.ps1 | $results = @()
Get-SPSite <SiteCollectionURL> |
Get-SPWeb -Limit ALL | % {
Write-Host "Start processing of website - " $_.Title
$webTitle = $_.Title
$webURL = $_.Url
Get-SPFeature -Web $_ -Limit All | % {
$feature = $_;
$featuresDefn = (Get-SPFarm).FeatureDefinitions[$_.ID... |
PowerShellCorpus/Github/sh-mortazavi_TeamCityTest/TeamCityAndAzureTest/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/sh-mortazavi_TeamCityTest/TeamCityAndAzureTest/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/sh-mortazavi_TeamCityTest/TeamCityAndAzureTest/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/sh-mortazavi_TeamCityTest/TeamCityAndAzureTest/packages/EntityFramework.6.0.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/sh-mortazavi_TeamCityTest/TeamCityAndAzureTest/packages/EntityFramework.6.0.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/sh-mortazavi_TeamCityTest/TeamCityAndAzureTest/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/sh-mortazavi_TeamCityTest/TeamCityAndAzureTest/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/sh-mortazavi_TeamCityTest/TeamCityAndAzureTest/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/aanguelov_aanguelov.github.io/src/SkinDesign/Properties/PublishProfiles/SkinDesign - Web Deploy-publish.ps1 | SkinDesign - Web Deploy-publish.ps1 | [cmdletbinding(SupportsShouldProcess=$true)]
param($publishProperties=@{}, $packOutput, $pubProfilePath)
# to learn more about this file visit https://go.microsoft.com/fwlink/?LinkId=524327
try{
if ($publishProperties['ProjectGuid'] -eq $null){
$publishProperties['ProjectGuid'] = '4ff78865-a395-49d... |
PowerShellCorpus/Github/aanguelov_aanguelov.github.io/src/SkinDesign/Properties/PublishProfiles/SkinDesign - Web Deploy (2)-publish.ps1 | SkinDesign - Web Deploy (2)-publish.ps1 | [cmdletbinding(SupportsShouldProcess=$true)]
param($publishProperties=@{}, $packOutput, $pubProfilePath)
# to learn more about this file visit https://go.microsoft.com/fwlink/?LinkId=524327
try{
if ($publishProperties['ProjectGuid'] -eq $null){
$publishProperties['ProjectGuid'] = '4ff78865-a395-49d... |
PowerShellCorpus/Github/harinderpal_Publish-home-drive/test.ps1 | test.ps1 | <#
Script to publish home drive.
In order to run this script please install the Active Directories powershell module installed.
Script written by Harinderpal Singh on 18 November 2014.
In case of any queries please send me an email on harinder[at]codezyn.com
#>
#import the active directory module
impo... |
PowerShellCorpus/Github/northben_PowerShell-Parallel-Job-Runner/runner.ps1 | runner.ps1 | $parallelCount = 2
$jobList = New-Object System.Collections.ArrayList
$jobStatus = New-Object System.Collections.ArrayList
# Create 3 jobs
$command = "start-sleep -seconds 10"
1..3 | % { $null = $jobList.Add([ScriptBlock]::Create($command)) }
$eventLogParams = @{
'LogName' = 'Application';
'Source' = "P... |
PowerShellCorpus/Github/appbakers_scripts/install_chrome_firefox.ps1 | install_chrome_firefox.ps1 |
function LogWrite {
Param ([string]$logstring)
$now = Get-Date -format s
Add-Content $Logfile -value "$now $logstring"
Write-Host $logstring
}
function CheckLocation {
Param ([string]$location)
if (!(Test-Path $location)) {
throw [System.IO.FileNotFoundException] "Could no... |
PowerShellCorpus/Github/appbakers_scripts/install_jenkins_swarm_client.ps1 | install_jenkins_swarm_client.ps1 | param (
[string]$master= 'http://localhost:8080/',
[string]$username= 'jenkins',
[string]$password= 'jenkins',
[string]$labels= "master=$master"
)
Write-Output "-labels: $labels"
$url = 'http://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/swarm-client/2.0/swarm-client-2... |
PowerShellCorpus/Github/appbakers_scripts/jdk_inst.ps1 | jdk_inst.ps1 | param (
[string]$major="7",
[string]$minor="79",
[string]$build="15"
)
function LogWrite {
Param ([string]$logstring)
$now = Get-Date -format s
Add-Content $Logfile -value "$now $logstring"
Write-Host $logstring
}
$Logfile = "C:\Windows\Temp\jdk-install.log"
if( [Envi... |
PowerShellCorpus/Github/appbakers_scripts/install_selenium_server.ps1 | install_selenium_server.ps1 | function LogWrite {
Param ([string]$logstring)
$now = Get-Date -format s
Add-Content $Logfile -value "$now $logstring"
Write-Host $logstring
}
$Logfile = "C:\Windows\Temp\selenium-install.log"
$source = "http://selenium-release.storage.googleapis.com/2.46/selenium-server-standalone-2.46.0.jar"
... |
PowerShellCorpus/Github/MicrosoftDocs_test418/.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/pritamstyz4ever_resume-parser/main/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/pritamstyz4ever_resume-parser/main/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/pritamstyz4ever_resume-parser/main/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/pritamstyz4ever_resume-parser/main/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/pritamstyz4ever_resume-parser/main/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/pritamstyz4ever_resume-parser/main/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/pritamstyz4ever_resume-parser/main/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/pritamstyz4ever_resume-parser/main/packages/Newtonsoft.Json.9.0.1/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://www.newtonsoft.com/json/install?version=" + $package.Version
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWindo... |
PowerShellCorpus/Github/pritamstyz4ever_resume-parser/main/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/pritamstyz4ever_resume-parser/main/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/pritamstyz4ever_resume-parser/main/packages/jQuery.1.7.1.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/pritamstyz4ever_resume-parser/main/packages/jQuery.1.7.1.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
$supportsJsIntelliSenseFile = [System.Version]::Parse($dte.Version).Major -ge 11
if (-not $supportsJsIntelliSenseFile) {
Write-Host "IntelliSense JS files are n... |
PowerShellCorpus/Github/pritamstyz4ever_resume-parser/main/packages/jQuery.1.7.1.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/openalm_VSOTasks/Tokenizer/1.0.0/token.ps1 | token.ps1 | [CmdletBinding(DefaultParameterSetName = 'None')]
param
(
[String] [Parameter(Mandatory = $true)] $SourcePath,
[String] [Parameter(Mandatory = $false)] $DestinationPath
)
if($DestinationPath -eq '')
{
$DestinationPath = $SourcePath
}
$patterns = @()
$regex = ‘__[A-Za-z0-9.]*__'
$matches = @(... |
PowerShellCorpus/Github/rohnedwards_cAccessControl/examples/cFileAce.ps1 | cFileAce.ps1 | configuration TestFileAceResource {
Import-DscResource -Module cAccessControl
$FolderPath = "c:\ps_dsc_test"
File DscTestFolder {
DestinationPath = $FolderPath
Type = "Directory"
}
$FilePath = "c:\ps_dsc_test\file.txt"
File DscTestFile {
DestinationPath = $Fi... |
PowerShellCorpus/Github/rohnedwards_cAccessControl/examples/cRegistryAce.ps1 | cRegistryAce.ps1 | configuration TestRegistryAceResource {
Import-DscResource -Module cAccessControl
$RegistryPath = "HKLM:\SOFTWARE\ps_dsc_test"
Registry DscTestKey {
Key = $RegistryPath
ValueName = ""
}
cRegistryAce DscTestKeyAccessAce1 {
Path = $RegistryPath
AceType = "D... |
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_NewRepo_2017_4_26_18_5_17/.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/shwahl_botlabshwahl/setup_and_install/new_bot_cleanup.ps1 | new_bot_cleanup.ps1 | # Retrieving User Information
$GITHUBUSER = Read-Host -Prompt "What is your GitHub Username?"
Write-Output ""
Write-Output "** If you have 2 Factor Auth configured, "
Write-Output " provide a Personal Access Token with repo and delete_repo access."
Write-Output " Tokens can be generated at https://github.com/s... |
PowerShellCorpus/Github/shwahl_botlabshwahl/setup_and_install/bot_install_sandbox.ps1 | bot_install_sandbox.ps1 | # Ignore SSL Certificate Errors
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certificate certificate,
WebRequest ... |
PowerShellCorpus/Github/shwahl_botlabshwahl/setup_and_install/new_bot_setup.ps1 | new_bot_setup.ps1 | # Retrieving User Information
$GITHUBUSER = Read-Host -Prompt "What is your GitHub Username?"
Write-Output ""
Write-Output "** If you have 2 Factor Auth configured, "
Write-Output " provide a Personal Access Token with repo and delete_repo access."
Write-Output " Tokens can be generated at https://github.com/s... |
PowerShellCorpus/Github/shwahl_botlabshwahl/setup_and_install/bot_config.ps1 | bot_config.ps1 | # Ignore SSL Certificate Errors
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certificate certificate,
WebRequest ... |
PowerShellCorpus/Github/shwahl_botlabshwahl/setup_and_install/bot_uninstall_sandbox.ps1 | bot_uninstall_sandbox.ps1 | # Ignore SSL Certificate Errors
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certificate certificate,
WebRequest ... |
PowerShellCorpus/Github/karthikballa_Sample/project1/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/karthikballa_Sample/project1/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/karthikballa_Sample/project1/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/karthikballa_Sample/project1/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/karthikballa_Sample/project1/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/karthikballa_Sample/project1/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/karthikballa_Sample/project1/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/karthikballa_Sample/project1/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/Cight_assignment1-gamecalc/PublishScripts/Publish-WebApplicationWebsite.ps1 | Publish-WebApplicationWebsite.ps1 | #Requires -Version 3.0
<#
.SYNOPSIS
Creates and deploys a Microsoft Azure Web Site for a Visual Studio web project.
For more detailed documentation go to: http://go.microsoft.com/fwlink/?LinkID=394471
.EXAMPLE
PS C:\> .\Publish-WebApplicationWebSite.ps1 `
-Configuration .\Configurations\WebApplication1-WAWS... |
PowerShellCorpus/Github/crackbard_PowerShell/Get-Prefetch.ps1 | Get-Prefetch.ps1 | ################################################################################
# Name: Get-Prefetch.ps1
# Purpose: Queries the local computer for Prefetch Files, and Parses information
# from the Prefetch Data Structure.
# Version: 1.0
# Date: 14Oct2013
# Author: Jared Atkinson (www.invoke-ir.co... |
PowerShellCorpus/Github/trondhindenes_AnsibleTower-PowerShell/AnsibleGroup.ps1 | AnsibleGroup.ps1 | function Get-AnsibleGroup
{
[CmdletBinding()]
Param (
[Parameter(ValueFromPipelineByPropertyName=$true)]
[int]$id,
[String]$Name
)
if ($id)
{
$Return = Invoke-GetAnsibleInternalJsonResult -ItemType "groups" -Id $id
}
Else
{
$Return ... |
PowerShellCorpus/Github/trondhindenes_AnsibleTower-PowerShell/AnsibleInventory.ps1 | AnsibleInventory.ps1 | function Get-AnsibleInventory
{
[CmdletBinding()]
Param (
[Parameter(ValueFromPipelineByPropertyName=$true)]
[int]$id
)
if ($id)
{
$Return = Invoke-GetAnsibleInternalJsonResult -ItemType "inventory" -Id $id
}
Else
{
$Return = Invoke-GetAnsib... |
PowerShellCorpus/Github/trondhindenes_AnsibleTower-PowerShell/AnsibleJob.ps1 | AnsibleJob.ps1 | function Get-AnsibleJob
{
[CmdletBinding()]
param(
[Parameter(ValueFromPipelineByPropertyName=$true)]
[int]$ID
)
if ($ID) {
$result = Invoke-GetAnsibleInternalJsonResult -ItemType "jobs" -Id $ID;
} else {
$result = Invoke-GetAnsibleInternalJsonResult -Item... |
PowerShellCorpus/Github/trondhindenes_AnsibleTower-PowerShell/AnsibleHost.ps1 | AnsibleHost.ps1 | function Get-AnsibleHost
{
[CmdletBinding()]
[OutputType([AnsibleTower.Host])]
Param (
[Parameter(ValueFromPipelineByPropertyName=$true)]
[int]$id,
[string]$Name
)
if ($id)
{
$Return = Invoke-GetAnsibleInternalJsonResult -ItemType "hosts" -Id $id
... |
PowerShellCorpus/Github/trondhindenes_AnsibleTower-PowerShell/AnsibleUser.ps1 | AnsibleUser.ps1 | function Get-AnsibleUser
{
[CmdletBinding()]
Param (
[Parameter(ValueFromPipelineByPropertyName=$true)]
[int]$id
)
if ($id)
{
$Return = Invoke-GetAnsibleInternalJsonResult -ItemType "users" -Id $id
}
Else
{
$Return = Invoke-GetAnsibleInterna... |
PowerShellCorpus/Github/trondhindenes_AnsibleTower-PowerShell/AnsibleOrganization.ps1 | AnsibleOrganization.ps1 | function Get-AnsibleOrganization
{
[CmdletBinding()]
Param (
[String]$Name,
[Parameter(ValueFromPipelineByPropertyName=$true)]
[int]$id
)
if ($id)
{
$Return = Invoke-GetAnsibleInternalJsonResult -ItemType "organizations" -Id $id
}
Else
{
... |
PowerShellCorpus/Github/trondhindenes_AnsibleTower-PowerShell/AnsibleJobTemplate.ps1 | AnsibleJobTemplate.ps1 | function Get-AnsibleJobTemplateID
{
<#
.SYNOPSIS
Gets the job template ID from a job template name.
.EXAMPLE
Get-AnsibleJobTemplateID -Name 'Demo Job Template'
.EXAMPLE
'Demo Job Template' | Get-AnsibleJobTemplateID
.OUTPUTS
The job ID.
#>
[CmdletBinding()... |
PowerShellCorpus/Github/zneuman_psscripts/Get-CertExpire.ps1 | Get-CertExpire.ps1 | Function Get-CertExpire {
<#
.SYNOPSIS
This cmdlet notifies users when a certificate is going to expire.
.DESCRIPTION
This cmdlet checks for certificate expiring within x date and sends an email to end user(s) in question. The cmdlet also automates creating a hashed password which can only ... |
PowerShellCorpus/Github/AlanBessa_Treinamento_AngularJS/ModernWebStore/MWS.Api/wwwroot/store/bower_components/bootstrap/nuget/MyGet.ps1 | MyGet.ps1 | $nuget = $env:NuGet
#parse the version number out of package.json
$bsversion = ((Get-Content $env:SourcesPath\package.json) -join "`n" | ConvertFrom-Json).version
#create packages
& $nuget pack "nuget\bootstrap.nuspec" -Verbosity detailed -NonInteractive -NoPackageAnalysis -BasePath $env:SourcesPath -Version $b... |
PowerShellCorpus/Github/AlanBessa_Treinamento_AngularJS/ModernWebStore/MWS.Api/wwwroot/admin/bower_components/bootstrap/nuget/MyGet.ps1 | MyGet.ps1 | $nuget = $env:NuGet
#parse the version number out of package.json
$bsversion = ((Get-Content $env:SourcesPath\package.json) -join "`n" | ConvertFrom-Json).version
#create packages
& $nuget pack "nuget\bootstrap.nuspec" -Verbosity detailed -NonInteractive -NoPackageAnalysis -BasePath $env:SourcesPath -Version $b... |
PowerShellCorpus/Github/AlanBessa_Treinamento_AngularJS/ModernWebStore/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/AlanBessa_Treinamento_AngularJS/ModernWebStore/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/AlanBessa_Treinamento_AngularJS/ModernWebStore/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/AlanBessa_Treinamento_AngularJS/ModernWebStore/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/AlanBessa_Treinamento_AngularJS/ModernWebStore/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/AlanBessa_Treinamento_AngularJS/ModernWebStore/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/AlanBessa_Treinamento_AngularJS/ModernWebStore/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/AlanBessa_Treinamento_AngularJS/ModernWebStore/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/AlanBessa_Treinamento_AngularJS/ModernWebStore/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/OPSTest_E2E_NewRepo_1488536262478/.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/SerkanDevrim_soruSor/soruSor.servis/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/SerkanDevrim_soruSor/soruSor.servis/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/SerkanDevrim_soruSor/soruSor.servis/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/SerkanDevrim_soruSor/soruSor.servis/packages/EntityFramework.6.0.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/SerkanDevrim_soruSor/soruSor.servis/packages/EntityFramework.6.0.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/SerkanDevrim_soruSor/soruSor.servis/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/SerkanDevrim_soruSor/soruSor.servis/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/SerkanDevrim_soruSor/soruSor.servis/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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.