full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/jkagnes_SpecialProjects/EcommerceWebsite/packages/jQuery.2.2.0/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/jkagnes_SpecialProjects/EcommerceWebsite/packages/jQuery.2.2.0/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/jkagnes_SpecialProjects/EcommerceWebsite/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/jkagnes_SpecialProjects/EcommerceWebsite/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/diegombeltran_scripts/DeployVM.ps1
DeployVM.ps1
# Script para PowerCLI 5.5 para crear varias máquinas virtuales en un host. # Cada creación de una VM es una tarea que será visible en el cliente web del vCenter. # Versión: 0.1 # Autor: Diego M. Beltrán # ### URL del vCenter $vCenter="vCenter.home.local" ### Usuario administrador con permisos para crear VMs en ...
PowerShellCorpus/Github/ismailnguyen_MathsFacileApi/src/MathsFacileApi/Properties/PublishProfiles/MathsFacileApi20161107121521 - Web Deploy-publish.ps1
MathsFacileApi20161107121521 - 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'] = 'ba27175b-f606-481...
PowerShellCorpus/Github/andreasBerre_randomPrint/randomPrint.ps1
randomPrint.ps1
Function Shuffle { param([Array]$gnArr) $len = $gnArr.Length; while($len) { $i = Get-Random ($len --); $tmp = $gnArr[$len]; $gnArr[$len] = $gnArr[$i]; $gnArr[$i] = $tmp; } return $gnArr } $documents = @() do { $docPath = Read-Host 'Ent...
PowerShellCorpus/Github/pkothree_SP/ActivateAlternateLanguages.ps1
ActivateAlternateLanguages.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 07/10/15 # Modified: 07/17/15 # Description: Activate all alternate languages on all root site collections ### if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null ) { Add-PS...
PowerShellCorpus/Github/pkothree_SP/GetADUserByEMail.ps1
GetADUserByEMail.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 07/23/15 # Modified: 07/23/15 # Description: Get AD User by e-Mail address ### $domainserver = get-addomaincontroller -discover -service ADWS -domainname DOMAIN $ds = new-object Microsoft.ActiveDirectory.Management.ADPrope...
PowerShellCorpus/Github/pkothree_SP/AddSiteCollectionAdmins.ps1
AddSiteCollectionAdmins.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 07/22/15 # Modified: 07/24/15 # Description: Add site collection admins to all sites ### if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null ) { Add-PSSnapin Microsoft.Sha...
PowerShellCorpus/Github/pkothree_SP/GetSiteCollectionAdmins.ps1
GetSiteCollectionAdmins.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 07/22/15 # Modified: 07/22/15 # Description: Get all site collection admins from all sites ### if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null ) { Add-PSSnapin Microsoft...
PowerShellCorpus/Github/pkothree_SP/ActivateSelectedAlternateLanguages.ps1
ActivateSelectedAlternateLanguages.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 07/17/15 # Modified: 07/17/15 # Description: Activate selected alternate languages on all root collections ### if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null ) { Add-PSSn...
PowerShellCorpus/Github/pkothree_SP/RemoveSiteCollectionAdmins.ps1
RemoveSiteCollectionAdmins.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 07/22/15 # Modified: 07/24/15 # Description: Remove site collection admins from all sites ### if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null ) { Add-PSSnapin Microsoft.Sh...
PowerShellCorpus/Github/pkothree_SP/GetAllSiteCollectionsAndLibraries.ps1
GetAllSiteCollectionsAndLibraries.ps1
### # Danny Davis # Get all Site Collection & Libraries # Created: 3/27/15 # Modified: 3/27/15 ### # Vars $webApp = WEBAPP $siteCollNum = 0 $librariesNum = 0 $currentLibNum = 0 $w = Get-SPWebApplication $webApp $webAppName = $w.Name start-transcript -path $webAppName".txt" if ( (Get-PSSnapin -...
PowerShellCorpus/Github/pkothree_SP/ActivateSelectedAlternateLanguagesAllSites.ps1
ActivateSelectedAlternateLanguagesAllSites.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 07/17/15 # Modified: 07/17/15 # Description: Activate selected alternate languages on all sites ### if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null ) { Add-PSSnapin Micros...
PowerShellCorpus/Github/pkothree_SP/powershell_commands.ps1
powershell_commands.ps1
#Just some PowerShell Commands I'm always forgetting #Get environment variables Get-ChildItem Env: #Get certificates Get-ChildItem -Recurse cert: #Get events from a certain Type Get-SPLogEvent | ?{$_.Area -eq "Excel Services Application" -And $_.Category -eq "Data Model" } | Format-List
PowerShellCorpus/Github/pkothree_SP/RenameADDisplaynameInSharePoint.ps1
RenameADDisplaynameInSharePoint.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 08/10/14 # Modified: 07/10/15 ### if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null ) { Add-PSSnapin Microsoft.SharePoint.PowerShell } # Set site $site = Get-SPSite SPSI...
PowerShellCorpus/Github/pkothree_SP/RenameSharePointGroups.ps1
RenameSharePointGroups.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 08/10/14 # Modified: 07/10/15 ### if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null ) { Add-PSSnapin Microsoft.SharePoint.PowerShell } $site = Get-SPSite http://yourservern...
PowerShellCorpus/Github/pkothree_SP/ActivateAlternateLanguagesAllSites.ps1
ActivateAlternateLanguagesAllSites.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 07/10/15 # Modified: 07/15/15 # Description: Activate all alternate languages on all sites ### if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null ) { Add-PSSnapin Microsoft...
PowerShellCorpus/Github/pkothree_SP/GetExpiringCertificates.ps1
GetExpiringCertificates.ps1
# Get Certificates which will expire within 90 days Get-ChildItem -Path cert: -Recurse | where { $_.notafter -le (get-date).AddDays(90) -AND $_.notafter -gt (get-date)} | select subject, notafter, thumbprint
PowerShellCorpus/Github/pkothree_SP/Start_Stop_Services/StartServices.ps1
StartServices.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 03/04/16 # Modified: 03/04/16 # Description: Start Windows Services ### $services= "Service1", "Service2", "..." foreach($serviceName in $services) { Set-Service -Name $serviceName -startuptype "automatic" Start-S...
PowerShellCorpus/Github/pkothree_SP/Start_Stop_Services/StopServices.ps1
StopServices.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 03/04/16 # Modified: 03/04/16 # Description: Stop Windows Services ### $services= "Service1", "Service2", "..." foreach($serviceName in $services) { Stop-Service -Name $serviceName Set-Service -Name $serviceName -...
PowerShellCorpus/Github/pkothree_SP/SplitSPSiteCollection/SplitSPSC.ps1
SplitSPSC.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 08/19/12 # Modified: 08/19/12 # Description: Export Site Collections and move to different database ### # Set Owner $owner = "DOMAIN\USER" # Source Web $web_source = "http://contoso.com/TESTSITE" # Target Web $web_targ...
PowerShellCorpus/Github/pkothree_SP/GetSCWithInfoPath/GetSiteCollectionsWithInfoPath.ps1
GetSiteCollectionsWithInfoPath.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 4/25/17 # Modified: 4/25/17 # Description: Get all Site Collections that are using InfoPath Form in any form ### # Vars $webApp = "WEBAPP" if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyCo...
PowerShellCorpus/Github/pkothree_SP/GetQuota/GetQuota.ps1
GetQuota.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 02/17/16 # Modified: 02/17/16 # Description: Get Quotas of Site Collections ### Import-Module ".\GetQuotaModule.ps1" $siteCollections = ("SC1", "SC2") get-scquota $siteCollections Write-Host "Done."
PowerShellCorpus/Github/pkothree_SP/GetQuota/GetQuotaModule.ps1
GetQuotaModule.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 02/17/16 # Modified: 02/17/16 # Description: Get Quotas of Site Collections (Module) # Do Not Edit This File ### #[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") if ( (Get-PSSnapin -Name Microsof...
PowerShellCorpus/Github/pkothree_SP/GetSCByContentDB/GetSCByContentDB.ps1
GetSCByContentDB.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 06/09/16 # Modified: 06/09/16 # Description: Get Site Collections from a specific ContentDB ### Get-SPSite -Limit All -ContentDatabase CONTENTDB | select url, @{label="Size";Expression={$_.usage.storage}}
PowerShellCorpus/Github/pkothree_SP/GetSCWithType/GetCommunitySites.ps1
GetCommunitySites.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 3/23/17 # Modified: 3/23/17 # Description: Get all Community Sites # TemplateID: # Community Site(COMMUNITY#0, 62) # Community Portal(COMMUNITYPORTAL#0, 63) # Community Area Template (SPSCOMMU#0, 36) ### # Var...
PowerShellCorpus/Github/pkothree_SP/GetSCWithNintex/GetSCwithNintex.ps1
GetSCwithNintex.ps1
### # Danny Davis # twitter: twitter.com/pko3 # github: github.com/pkothree # Created: 3/23/17 # Modified: 4/25/17 # Description: Get all Site Collection from one Web Application with Nintex Workflow ### # Vars $webApp = "WEBAPP" #"0561d315-d5db-4736-929e-26da142812c5" #Nintex Workflow, Scope: Site #"2fb...
PowerShellCorpus/Github/RichHewlett_PowerShellScripts/LR_ZipTuck_V2.ps1
LR_ZipTuck_V2.ps1
#========================================================================================================== # Renames Adobe Lightroom catalogue backups with date, flattens folder structure, copy to remote location, # retaining some zip files locally. Also housekeeps the server location (maintains X number of zip fil...
PowerShellCorpus/Github/RichHewlett_PowerShellScripts/LR_ZipTuck_V1.ps1
LR_ZipTuck_V1.ps1
#========================================================================================================== # Zip up Lightroom catalogue backup folders (deleting old non-zipped version), copy to remote location, # retaining some zip files locally. Also housekeeps the server location (maintains X number of zip files)...
PowerShellCorpus/Github/RichHewlett_PowerShellScripts/BackupDataIfUSBDriveConnected.ps1
BackupDataIfUSBDriveConnected.ps1
#========================================================================================================== # Checks for presence of offsite backup USB drive by filepath, then backs up relevant data to drive if # present, exits gracefully if not present. Schedule script to run everynight and it only backs up data ...
PowerShellCorpus/Github/RichHewlett_PowerShellScripts/BackupSiteWithHTTrack.ps1
BackupSiteWithHTTrack.ps1
#========================================================================================== # Backup a site or blog to disk using HTTRACK tool # (Created by Rich Hewlett, see blog at RichHewlett.com) # (Post is https://richhewlett.com/2014/05/20/backing-up-your-blog-content-using-httrack/) # write-eventlog comma...
PowerShellCorpus/Github/HarunChowdhury_Multiple-Page-Handling/Multiple Page Linking Handling in One page/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/HarunChowdhury_Multiple-Page-Handling/Multiple Page Linking Handling in One page/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/HarunChowdhury_Multiple-Page-Handling/Multiple Page Linking Handling in One page/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/HarunChowdhury_Multiple-Page-Handling/Multiple Page Linking Handling in One page/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/HarunChowdhury_Multiple-Page-Handling/Multiple Page Linking Handling in One page/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/HarunChowdhury_Multiple-Page-Handling/Multiple Page Linking Handling in One page/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/HarunChowdhury_Multiple-Page-Handling/Multiple Page Linking Handling in One page/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/HarunChowdhury_Multiple-Page-Handling/Multiple Page Linking Handling in One page/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/HarunChowdhury_Multiple-Page-Handling/Multiple Page Linking Handling in One page/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/Tigrane_TestBase/WebApi/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/Tigrane_TestBase/WebApi/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/yafeya_IOLSWikiSiteProject/Sources/IOLSWikiSite/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/yafeya_IOLSWikiSiteProject/Sources/IOLSWikiSite/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/yafeya_IOLSWikiSiteProject/Sources/IOLSWikiSite/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/yafeya_IOLSWikiSiteProject/Sources/IOLSWikiSite/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/yafeya_IOLSWikiSiteProject/Sources/IOLSWikiSite/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/yafeya_IOLSWikiSiteProject/Sources/IOLSWikiSite/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/yafeya_IOLSWikiSiteProject/Sources/IOLSWikiSite/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/yafeya_IOLSWikiSiteProject/Sources/IOLSWikiSite/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/yafeya_IOLSWikiSiteProject/Sources/IOLSWikiSite/packages/Newtonsoft.Json.6.0.8/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/install?version=" + $package.Version $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) if ($dte2.ActiveWin...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_Provision_2017_4_6_26_5_18/.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/jonasf_windows-machine-setups/01-dotnet-development-machine.ps1
01-dotnet-development-machine.ps1
#Initial windows configuration Update-ExecutionPolicy Unrestricted Enable-MicrosoftUpdate Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions #Runtimes and frameworks cinst DotNet4.0 cinst DotNet4.5 cinst DotNet4.5.1 cinst javaruntime cinst nodejs.install cinst ruby ...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/Default.ps1
Default.ps1
## Default PSake build script [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingWriteHost', '')] param() #requires -Version 5; #requires -Modules VirtualEngine.Build; $psake.use_exit_on_error = $true; Properties { $moduleName = (Get-Item $PSScriptRoot\*.psd1)[0].BaseName; $baseP...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/Src/Get-ROAEnvironmentGuid.ps1
Get-ROAEnvironmentGuid.ps1
function Get-ROAEnvironmentGuid { <# .SYNOPSIS Retrieves a RES ONE Automation environment GUID from the database. .EXAMPLE Get-ROAEnvironmentGuid -Server CONTROLLER -Database RESONEAutomation -Credential (Get-Credential 'sa') Returns the RES ONE Automation environment GUID from t...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/Src/Get-ROASiteLicense.ps1
Get-ROASiteLicense.ps1
function Get-ROASiteLicense { <# .SYNOPSIS Retrieves a RES ONE Automation site license directory from the database. .EXAMPLE Get-ROASiteLicense -Server CONTROLLER -Database RESONEAutomation -Credential (Get-Credential 'sa') Returns the RES ONE Automation site license from the RES...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/Src/Import-ROABuildingBlock.ps1
Import-ROABuildingBlock.ps1
function Import-ROABuildingBlock { <# .SYNOPSIS Imports a RES ONE Automation building block. .EXAMPLE Import-ROABuildingBlock -Path .\RESAM.xml Imports the 'RESAM.xml' building block into the RES ONE Automation database using the current Windows user credentials. .E...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/Src/New-ROAManagementPortalConfiguration.ps1
New-ROAManagementPortalConfiguration.ps1
function New-ROAManagementPortalConfiguration { <# .SYNOPSIS Creates a RES ONE Automation Management Portal web configuration file. #> [CmdletBinding(SupportsShouldProcess, DefaultParameterSetName = 'WindowsAuthentication')] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldPr...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/DSCResources/ROACommon/Src/Get-ROALicense.ps1
Get-ROALicense.ps1
function Get-ROALicense { <# .SYNOPSIS Retrieves a RES ONE Automation site license from the database. .NOTES This cmdlet currently only support Microsoft SQL servers. #> [CmdletBinding(DefaultParameterSetName = 'SQLAuth')] [OutputType([System.String])] param ( # Dat...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/DSCResources/ROACommon/Src/Get-ROAComponentInstallPath.ps1
Get-ROAComponentInstallPath.ps1
function Get-ROAComponentInstallPath { <# .SYNOPSIS Resolves the installation directory of the specified RES ONE Automation component. #> [CmdletBinding()] [OutputType([System.String])] param ( [Parameter(Mandatory)] [ValidateSet('Agent','Console','Dispatcher')] ...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/DSCResources/ROACommon/Src/Get-ROAEnvironment.ps1
Get-ROAEnvironment.ps1
function Get-ROAEnvironment { <# .SYNOPSIS Retrieves a RES ONE Automation environment GUID from the database. .NOTES This cmdlet currently only support Microsoft SQL servers. #> [CmdletBinding(DefaultParameterSetName = 'SQLAuth')] [OutputType([System.Guid])] param ( ...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/DSCResources/ROACommon/Src/Resolve-ROAPackagePath.ps1
Resolve-ROAPackagePath.ps1
function Resolve-ROAPackagePath { <# .SYNOPSIS Resolves the latest RES ONE Automation/Automation Manager installation package. #> [CmdletBinding()] param ( ## The literal file path or root search path [Parameter(Mandatory)] [System.String] $Path, ## Requir...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/DSCResources/ROACommon/Src/Import-ROABuildingBlockFile.ps1
Import-ROABuildingBlockFile.ps1
function Import-ROABuildingBlockFile { <# .SYNOPSIS Imports RES ONE Automation building blocks. #> [CmdletBinding(DefaultParameterSetName = 'Path')] [OutputType([System.Management.Automation.PSCustomObject])] param ( # Specifies a path to one or more locations. Wildcards are perm...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/DSCResources/ROACommon/Src/Get-ROAConsolePath.ps1
Get-ROAConsolePath.ps1
function Get-ROAConsolePath { <# .SYNOPSIS Returns the RES ONE Automation console path. #> [CmdletBinding()] [OutputType([System.String])] param ( ) begin { Assert-ROAComponent -Component 'Console'; } process { $wmcRootPath = Get-ROAComponentInstallPath ...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/DSCResources/ROACommon/Src/Get-WindowsInstallerPackageProperty.ps1
Get-WindowsInstallerPackageProperty.ps1
function Get-WindowsInstallerPackageProperty { <# .SYNOPSIS This cmdlet retrieves product name from a Windows Installer MSI database. .DESCRIPTION This function uses the WindowInstaller COM object to pull all values from the Property table from a MSI package. .NOTES Adapted fr...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/DSCResources/ROACommon/Src/Start-WaitProcess.ps1
Start-WaitProcess.ps1
function Start-WaitProcess { <# .SYNOPSIS Starts and waits for a process to exit. .NOTES This is an internal function and shouldn't be called from outside. #> [CmdletBinding(SupportsShouldProcess)] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '')] ...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/DSCResources/ROACommon/Src/Register-PInvoke.ps1
Register-PInvoke.ps1
function Register-PInvoke { <# .NOTES Kindly donated by Micorsoft from: https://github.com/PowerShell/xPSDesiredStateConfiguration/blob/564bfba5bb0114623a334e1c7a8842b4996e05a6/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.psm1 #> [CmdletBinding()] param ( ) process { ...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/DSCResources/ROACommon/Src/Get-InstalledProductEntry.ps1
Get-InstalledProductEntry.ps1
function Get-InstalledProductEntry { <# .NOTES https://github.com/PowerShell/xPSDesiredStateConfiguration/blob/dev/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.psm1 #> [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param ( [Parameter()] [Valid...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/DSCResources/ROACommon/Src/Assert-ROAComponent.ps1
Assert-ROAComponent.ps1
function Assert-ROAComponent { <# .SYNOPSIS Ensures that the RES ONE Automation console is installed. #> [CmdletBinding()] param ( [Parameter(Mandatory)] [ValidateSet('Agent','Console','Dispatcher')] [System.String] $Component ) process { if (-no...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/DSCResources/ROACommon/Src/Get-RegistryValueIgnoreError.ps1
Get-RegistryValueIgnoreError.ps1
function Get-RegistryValueIgnoreError { <# .NOTES https://github.com/PowerShell/xPSDesiredStateConfiguration/blob/dev/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.psm1 #> [CmdletBinding()] param ( [Parameter(Mandatory)] [Microsoft.Win32.RegistryHive] $RegistryHive...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/DSCResources/ROACommon/Src/Get-LocalizableRegistryKeyValue.ps1
Get-LocalizableRegistryKeyValue.ps1
function Get-LocalizableRegistryKeyValue { <# .NOTES https://github.com/PowerShell/xPSDesiredStateConfiguration/blob/dev/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.psm1 #> [CmdletBinding()] param ( [Parameter()] [System.Object] $RegistryKey, [Paramete...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/DSCResources/ROACommon/Src/Save-ROAManagementPortalConfiguration.ps1
Save-ROAManagementPortalConfiguration.ps1
function Save-ROAManagementPortalConfiguration { <# .SYNOPSIS Writes a RES ONE Automation Management Portal web configuration file. #> [CmdletBinding(SupportsShouldProcess, DefaultParameterSetName = 'WindowsAuthentication')] param ( ## Path to RES ONE Automation Management Portal web ...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/Examples/RESONEAutomationLabExample.ps1
RESONEAutomationLabExample.ps1
$config = @{ AllNodes = @( @{ NodeName = 'localhost'; PSDSCAllowPlainTextPassword = $true; ROADatabaseServer = 'controller.lab.local'; ROADatabaseName = 'RESONEAutomation'; ROABinaryPath = 'C:\SharedData\Software\RES\ONE Automation 2...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/Tests/Unit/DSCResources/ROACommon/Src/Resolve-ROAPackagePath.Tests.ps1
Resolve-ROAPackagePath.Tests.ps1
## Import the ROACommon module $moduleRoot = (Resolve-Path "$PSScriptRoot\..\..\..\..\..\DSCResources\ROACommon\ROACommon.psd1").Path; Import-Module $moduleRoot -Force; Describe 'RESONEAutomation\ROACommon\Resolve-ROAPackagePath' { It 'Should resolve v7.5 installer' { $v75InstallerMsi = '...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/Tests/Integration/VE_ROAManagementPortal.Integration.Tests.ps1
VE_ROAManagementPortal.Integration.Tests.ps1
$script:DSCModuleName = Split-Path -Path "$PSScriptRoot\..\.." -Resolve -Leaf; $script:DSCResourceName = (Get-Item -Path $MyInvocation.MyCommand.Path).BaseName -replace '\.Integration\.Tests',''; #region HEADER # Integration Test Template Version: 1.1.1 [System.String] $script:moduleRoot = Split-Path -Parent (Spl...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/Tests/Integration/RESONEAutomation.Integration.Tests.ps1
RESONEAutomation.Integration.Tests.ps1
Describe 'Integration\RESONEAutomation' { It 'Should load module without throwing' { $repoRoot = (Resolve-Path "$PSScriptRoot\..\..").Path; $moduleName = (Get-Item -Path $repoRoot).Name; { Import-Module (Join-Path -Path $RepoRoot -ChildPath "$moduleName.psd1") -Force } | Should Not...
PowerShellCorpus/Github/VirtualEngine_RESONEAutomation/Tests/Integration/VE_ROAManagementPortal.Config.ps1
VE_ROAManagementPortal.Config.ps1
configuration VE_ROAManagementPortal_Config { param ( ## IIS website host header/name, i.e. res.lab.local. [Parameter(Mandatory)] [System.String] $HostHeader, ## File path containing the RES ONE Automation MSIs or the literal path to the management portal MSI. ...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_NewRepo_2017_4_13_17_15_20/.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/JEAN98_QR-Code/QRcode/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/JEAN98_QR-Code/QRcode/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/JEAN98_QR-Code/QRcode/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/JEAN98_QR-Code/QRcode/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/JEAN98_QR-Code/QRcode/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/JEAN98_QR-Code/QRcode/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/JEAN98_QR-Code/QRcode/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/JEAN98_QR-Code/QRcode/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/JEAN98_QR-Code/QRcode/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/JEAN98_QR-Code/QRcode/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/JEAN98_QR-Code/QRcode/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/karangitbub_MVC/MVCApp_Model_Entity/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/karangitbub_MVC/MVCApp_Model_Entity/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/karangitbub_MVC/ExplorerMVC/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/karangitbub_MVC/ExplorerMVC/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/karangitbub_MVC/MVCExplorer_VS2015/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/karangitbub_MVC/MVCExplorer_VS2015/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/karangitbub_MVC/MVCExplorer_VS2015/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/karangitbub_MVC/MVCExplorer_VS2015/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/karangitbub_MVC/MVCExplorer_VS2015/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...