full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/fintalex_OOP/SandersonFirstApp/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/fintalex_OOP/SandersonFirstApp/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/fintalex_OOP/SandersonFirstApp/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/fintalex_OOP/SandersonFirstApp/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/fintalex_OOP/SandersonFirstApp/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/fintalex_OOP/SandersonFirstApp/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/fintalex_OOP/SandersonFirstApp/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/fintalex_OOP/SandersonFirstApp/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/fintalex_OOP/SandersonFirstApp/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/fintalex_OOP/ProductService/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/fintalex_OOP/ProductService/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/fintalex_OOP/ProductService/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/OPS-E2E-PPE_E2E_NewRepo_2017_4_9_12_5_21/.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/BarryMills_DDDMidlands/DDDMidlands/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/BarryMills_DDDMidlands/DDDMidlands/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/BarryMills_DDDMidlands/DDDMidlands/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/BarryMills_DDDMidlands/DDDMidlands/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/BarryMills_DDDMidlands/DDDMidlands/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/BarryMills_DDDMidlands/DDDMidlands/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/BarryMills_DDDMidlands/DDDMidlands/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/BarryMills_DDDMidlands/DDDMidlands/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/BarryMills_DDDMidlands/DDDMidlands/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/BarryMills_DDDMidlands/DDDMidlands/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/BarryMills_DDDMidlands/DDDMidlands/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/indented-automation_Indented.Data.Sql/build.ps1
build.ps1
#requires -Module psake, Configuration, pester # Self-update Assert (Test-Path "$psscriptroot\..\BuildTools") 'Cannot find build tools' if (-not (Test-Path "$psscriptroot\build")) { $null = New-Item "$psscriptroot\build" -ItemType Directory } Get-ChildItem "$psscriptroot\..\BuildTools" | Where-Obje...
PowerShellCorpus/Github/indented-automation_Indented.Data.Sql/source/public/Invoke-SqlStoredProcedure.ps1
Invoke-SqlStoredProcedure.ps1
function Invoke-SqlStoredProcedure { # .SYNOPSIS # Invoke an SQL stored procedure. # .DESCRIPTION # Invoke the specified stored procedure. If return values are specified a # .INPUTS # Name # .OUTPUTS # System.Object # .NOTES # Author: Chris Dent # #...
PowerShellCorpus/Github/indented-automation_Indented.Data.Sql/source/public/New-SqlConnectionString.ps1
New-SqlConnectionString.ps1
function New-SqlConnectionString { # .SYNOPSIS # Create a new SQL connection string using the SqlConnectionStringBuilder. # .DESCRIPTION # # .INPUTS # Dynamic # .OUTPUTS # System.String # .NOTES # Author: Chris Dent # # Change log: # 06/01/...
PowerShellCorpus/Github/indented-automation_Indented.Data.Sql/source/public/New-SqlConnection.ps1
New-SqlConnection.ps1
function New-SqlConnection { # .SYNOPSIS # Create a new SQL connection. # .DESCRIPTION # Create a new SQL connection. # .INPUTS # System.Management.Automation.PSCredential # System.String # .OUTPUTS # System.Data.SqlClient.SqlConnection # .NOTES # Autho...
PowerShellCorpus/Github/indented-automation_Indented.Data.Sql/source/public/Use-SqlConnection.ps1
Use-SqlConnection.ps1
function Use-SqlConnection { [CmdletBinding(DefaultParameterSetName = 'FromConnectionString')] param( [System.Data.SqlClient.SqlConnection]$Connection ) $Script:UseConnection = $Connection }
PowerShellCorpus/Github/kbeckman_Scripts-Settings/PowerShell/profile-system.ps1
profile-system.ps1
# Friendly PowerShell Execution Policy # Set-ExecutionPolicy Unrestricted # Use this snippet if corporate domain policies hijack your $HOME folder... # Remove-Variable -Force HOME # Set-Variable HOME "C:\Users\Keith Beckman" $scriptsSettingsPath = Join-Path $HOME "Scripts-Settings" $dependenciesPath = ...
PowerShellCorpus/Github/kbeckman_Scripts-Settings/PowerShell/FuncLib/functions-openssl.ps1
functions-openssl.ps1
# Setup process and initial configuration for OpenSSL... function OpenSSL-Setup() { $dir = Join-Path $HOME "\OpenSSL" $caDir = Join-Path $dir "\myCA" # Setup directory structure and required files... mkdir (Join-Path $caDir "\Certificate\private") mkdir (Join-Path $caDir "\Reuests") mkdir (Join-Path...
PowerShellCorpus/Github/kbeckman_Scripts-Settings/PowerShell/FuncLib/functions-utility.ps1
functions-utility.ps1
# <7-Zip Commands> # a: Add files to archive # b: Benchmark # d: Delete files from archive # e: Extract files from archive (without using directory names) # l: List contents of archive # t: Test integrity of archive # u: Update files to archive # x: eXtract files with full paths # <Switches> # -ai[r[...
PowerShellCorpus/Github/kbeckman_Scripts-Settings/PowerShell/FuncLib/functions-git.ps1
functions-git.ps1
# Configures Git global configuration settings... Function Git-Setup([string]$username = "kbeckman", [string]$email = "kbeckman.c4sc@gmail.com") { git config --global user.name $username git config --global user.email $email git config --global diff.tool diffmerge git config --global difftool.diffmerge.cmd...
PowerShellCorpus/Github/kbeckman_Scripts-Settings/PowerShell/FuncLib/functions-system.ps1
functions-system.ps1
# Configures PowerShell UI settings... Function Setup-PowerShell-Console() { $host.ui.rawui.ForegroundColor = "Green" $host.ui.rawui.BackgroundColor = "Black" $host.ui.rawui.CursorSize = 25 $bufferSize = $host.ui.rawui.BufferSize $bufferSize.Width = 140 $bufferSize.Height = 3000 $host.ui.rawui.Buf...
PowerShellCorpus/Github/kbeckman_Scripts-Settings/PowerShell/FuncLib/functions-mongodb.ps1
functions-mongodb.ps1
$mongoBinaries = "C:\Program Files\MongoDB\bin" $mongoStorage = "S:\MongoDB_Data" Function Mongo-Install-Service() { $logPath = $mongoStorage + "\mongo.log" $dataPath = $mongoStorage + "\data" cd $mongoBinaries .\mongod --logpath $logPath --logappend --dbpath $dataPath --directoryperdb --install --s...
PowerShellCorpus/Github/kbeckman_Scripts-Settings/PowerShell/FuncLib/functions-makecert.ps1
functions-makecert.ps1
###----------------MakeCert Options----------------### # -sk <keyName> Subject's key container name; To be created if not present # -pe Mark generated private key as exportable # -ss <store> Subject's certificate store name that stores the output certificate # -sr <location> Subje...
PowerShellCorpus/Github/kbeckman_Scripts-Settings/PowerShell/Scripts/host-vhd-management-cycle.ps1
host-vhd-management-cycle.ps1
Get-Date # Move backups from prior maintenance cycle to the ..\old directory... rm "d:\vhd backups\old\*.7z" mv "d:\vhd backups\*.7z" "d:\vhd backups\old" $scriptPath = Join-Path $sysGitHub "PowerShell\Scripts\comapt-merge-disks.diskpart" diskpart /s $scriptPath Get-Date Seven-Zip "v:\native\developer\20...
PowerShellCorpus/Github/kbeckman_Scripts-Settings/PowerShell/Scripts/machine-maintenance.ps1
machine-maintenance.ps1
# Run this script using the following PowerShell call... # .\machine-maintenance.ps1 VM/Host # define the PowerShell script parameters... param($systemType = $(throw "$systemType parameter (VM, Host) is required.")) Clean-Disk # Add a console-wait because Clean-Disk is a non-shell app and will execute async...
PowerShellCorpus/Github/kbeckman_Scripts-Settings/PowerShell/Scripts/host-set-vhd-boot-locations.ps1
host-set-vhd-boot-locations.ps1
# Windows2008R2 VHD (Developer) # Guid = {b85829b2-fe90-11de-b31b-be9a647009c0} # To add an additional VHD to the boot menu... # bcdedit /copy {identifier} /d "description" # To remove an additional VHD to the boot menu... # bcdedit /delete {identifier} # To set the description property of a boot entry... # bc...
PowerShellCorpus/Github/IntelliTect-Samples_2016.03.09-ManagingAzureWithPowerShell/Azure.Tests.ps1
Azure.Tests.ps1
$here = $PSScriptRoot $sut = $PSCommandPath.Replace('.Tests', '') . $sut
PowerShellCorpus/Github/IntelliTect-Samples_2016.03.09-ManagingAzureWithPowerShell/Azure.ps1
Azure.ps1
Function Setup-AzureConfiguaration { [CmdletBinding(ConfirmImpact="High")] param( [pscredential]$azureCredentials = (Get-Credential -Message "Enter your azure credentials here.") ) if(!$PSCmdlet.ShouldProcess("Install-AzureConfig",“Confirm to execute", "3")) { ret...
PowerShellCorpus/Github/LukaszWasko_Install-NiniteUpdates/Install-NiniteUpdates.ps1
Install-NiniteUpdates.ps1
#requires -Version 2.0 <# .SYNOPSIS The script takes care of the NinitePro application with the scheduler help. .DESCRIPTION The script can update the local copy of the application ninitepro.exe. The script will select the fastest cache location (if many will be delivered) or will use Ninite site i...
PowerShellCorpus/Github/jdhitsolutions_Gen2Tools/New-Gen2VHD.ps1
New-Gen2VHD.ps1
#requires -version 4.0 #requires -modules Hyper-V,Storage #requires -RunAsAdministrator Function New-Gen2Disk { [cmdletbinding(SupportsShouldProcess)] Param( [Parameter(Position=0,Mandatory,HelpMessage="Enter the path for the new VHDX file")] [ValidateNotNullorEmpty()] [ValidatePattern("\.vhdx$")] [Validat...
PowerShellCorpus/Github/jdhitsolutions_Gen2Tools/Set-Gen2Partition.ps1
Set-Gen2Partition.ps1
#requires -version 4.0 #requires -modules DISM,Storage #requires -RunAsAdministrator Function Set-Gen2Partition { [cmdletbinding(ConfirmImpact="High")] Param( [parameter( Position=0, Mandatory, HelpMessage="Enter the path to the VHDX file", ValueFromPipeline=$True, ValueFromPipelineByPropertyName=$True...
PowerShellCorpus/Github/cys3c_PROTEIN/protein.ps1
protein.ps1
# File Monitor for Creation RANSOMWARE # Check if new ransomware is infecting our system, check docx docs. # If detect new ransomware, or one of blacklist, then disable de account of the user to # block any access to our system. # Author : Amador Pérez Trujillo aka @c0p3rn1c0 # 2016 #TO_DO: Disable network a...
PowerShellCorpus/Github/nhodder_testing-azure/TestingAzure/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/nhodder_testing-azure/TestingAzure/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/nhodder_testing-azure/TestingAzure/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/nhodder_testing-azure/TestingAzure/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/nhodder_testing-azure/TestingAzure/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/nhodder_testing-azure/TestingAzure/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/coateds_DevOpsOnWindows/StupidPowerShellTricks.ps1
StupidPowerShellTricks.ps1
(1..10) | Foreach-Object ($_)
PowerShellCorpus/Github/coateds_DevOpsOnWindows/CommitPushDocs.ps1
CommitPushDocs.ps1
# Quick script to commit Docs to master in one command Param ($Branch) git add . git commit -m "Documentation" git push -u origin $Branch
PowerShellCorpus/Github/mattgwagner_Distance-Analyzer/Load.ps1
Load.ps1
$Here = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $Soldiers = Get-Content Roster.csv | ConvertFrom-Csv $Endpoint = "https://distance-analyzer.azurewebsites.net/Nodes/New" foreach($Soldier in $Soldiers) { $Node = @{ Description = $Soldier.Name; Address = "$($Soldier.'Home Address'), $(...
PowerShellCorpus/Github/mattgwagner_Distance-Analyzer/src/Distance-Analyzer/Properties/PublishProfiles/Distance-Analyzer - Web Deploy-publish.ps1
Distance-Analyzer - 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'] = 'ff92fdea-3e64-46a...
PowerShellCorpus/Github/twillin912_PlasterTemplates/NewModule-v2/module.settings.ps1
module.settings.ps1
# # # [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')] $Author = '<%=$PLASTER_PARAM_FullName%>' [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')] $Description = '<%=$PLASTER_PARAM_ModuleDesc%>' [System.Diagnostics...
PowerShellCorpus/Github/twillin912_PlasterTemplates/NewModule-v2/build.ps1
build.ps1
[CmdletBinding()] Param ( [string] $Task = '.' ) $RequiredModules = @('BuildHelpers', 'InvokeBuild', 'Pester', 'PlatyPS', 'PSDeploy', 'PSScriptAnalyzer') Get-PackageProvider -Name NuGet -ForceBootstrap | Out-Null foreach ( $Module in $RequiredModules ) { if ( ! ( Get-Module -Name $Module -ListAvailab...
PowerShellCorpus/Github/twillin912_PlasterTemplates/NewModule-v2/tests/Shared.ps1
Shared.ps1
# Dot source this script in any Pester test script that requires the module to be imported. if (!$SuppressImportModule) { Get-Module -Name $env:BHProjectName | Remove-Module -Force Import-Module "$env:BHPSModuleManifest" -Scope Global }
PowerShellCorpus/Github/twillin912_PlasterTemplates/NewModule-v2/tests/Module/1-Meta.Tests.ps1
1-Meta.Tests.ps1
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '', Scope='*', Target='SuppressImportModule')] $SuppressImportModule = $true . $PSScriptRoot/../Shared.ps1 Describe 'File Formatting' { $Textfiles = Get-ChildItem -Path $env:BHProjectPath -Include '*.ps1', '*.psm1', '*.p...
PowerShellCorpus/Github/twillin912_PlasterTemplates/NewModule-v2/tests/Module/3-ModuleRoot.Tests.ps1
3-ModuleRoot.Tests.ps1
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '', Scope='*', Target='SuppressImportModule')] $SuppressImportModule = $false . $PSScriptRoot/../Shared.ps1 Describe 'Module root' { $PrivateFunctions = Get-ChildItem -Path "$env:BHPSModulePath/Private" -Include '*.ps1' -R...
PowerShellCorpus/Github/twillin912_PlasterTemplates/NewModule-v2/tests/Module/2-Manifest.Tests.ps1
2-Manifest.Tests.ps1
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '', Scope='*', Target='SuppressImportModule')] $SuppressImportModule = $true . $PSScriptRoot/../Shared.ps1 $AppVeyorPath = Join-Path -Path $ProjectRoot -Child "appveyor.yml" $ChangeLogPath = Join-Path -Path $ProjectRoot -Child...
PowerShellCorpus/Github/twillin912_PlasterTemplates/NewModule-v2/build/build.settings.ps1
build.settings.ps1
Param( [Parameter(Mandatory=$true)] [string] $ProjectRoot ) ############################################################################### # Customize these properties and tasks for your module. ############################################################################### [System.Diagnostics.CodeA...
PowerShellCorpus/Github/twillin912_PlasterTemplates/NewModule-v2/build/build.script.ps1
build.script.ps1
#Requires -Modules InvokeBuild ############################################################################### # Dot source the user's customized properties and extension tasks. ############################################################################### . $env:BHProjectPath\Build\build.settings.ps1 -ProjectRo...
PowerShellCorpus/Github/twillin912_PlasterTemplates/NewModule-v2/build/build.psdeploy.ps1
build.psdeploy.ps1
# Publish to gallery with a few restrictions if( $env:BHProjectName -and $env:BHProjectName.Count -eq 1 -and $env:BHBuildSystem -ne 'Unknown' -and $env:BHBranchName -eq 'stable' -and $env:BHCommitMessage -match '!deploy' ) { Deploy Module { By PSGalleryModule { FromSour...
PowerShellCorpus/Github/twillin912_PlasterTemplates/NewModule-v2/build/scriptanalyzer.settings.ps1
scriptanalyzer.settings.ps1
@{ # Use Severity when you want to limit the generated diagnostic records to a # subset of: Error, Warning and Information. # Uncomment the following line if you only want Errors and Warnings but # not Information diagnostic records. #Severity = @('Error','Warning') # Use IncludeRules wh...
PowerShellCorpus/Github/twillin912_PlasterTemplates/NewModule/build.ps1
build.ps1
[CmdletBinding()] Param ( [string[]] $Task = 'default' ) $RequiredModules = @('Pester', 'PlatyPS', 'Psake', 'PSDeploy', 'PSScriptAnalyzer') Get-PackageProvider -Name NuGet -ForceBootstrap | Out-Null foreach ( $Module in $RequiredModules ) { if ( ! ( Get-Module -Name $Module -ListAvailable ) ) { Insta...
PowerShellCorpus/Github/twillin912_PlasterTemplates/NewModule/build/build.settings.ps1
build.settings.ps1
Param ( [Parameter(Mandatory=$true)] [string] $ProjectRoot ) ############################################################################### # Customize these properties and tasks for your module. ############################################################################### Properties { # ----...
PowerShellCorpus/Github/twillin912_PlasterTemplates/NewModule/build/build.psake.ps1
build.psake.ps1
#Requires -Modules psake ############################################################################## # DO NOT MODIFY THIS FILE! Modify build.settings.ps1 instead. ############################################################################## ##################################################################...
PowerShellCorpus/Github/twillin912_PlasterTemplates/NewModule/build/scriptanalyzer.settings.ps1
scriptanalyzer.settings.ps1
@{ # Use Severity when you want to limit the generated diagnostic records to a # subset of: Error, Warning and Information. # Uncomment the following line if you only want Errors and Warnings but # not Information diagnostic records. #Severity = @('Error','Warning') # Use IncludeRules wh...
PowerShellCorpus/Github/twillin912_PlasterTemplates/NewModule/test/Shared.ps1
Shared.ps1
# Dot source this script in any Pester test script that requires the module to be imported. if (!$SuppressImportModule) { # -Scope Global is needed when running tests from inside of psake, otherwise # the module's functions cannot be found in the <%=$PLASTER_PARAM_ModuleName%>\ namespace Get-Module -N...
PowerShellCorpus/Github/twillin912_PlasterTemplates/NewModule/test/1-Meta.Tests.ps1
1-Meta.Tests.ps1
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '', Scope='*', Target='SuppressImportModule')] $SuppressImportModule = $true . $PSScriptRoot\Shared.ps1 Describe 'File Formatting' { $Textfiles = Get-ChildItem -Path $ProjectRoot -Include '*.ps1', '*.psm1', '*.psd1' -Rec...
PowerShellCorpus/Github/twillin912_PlasterTemplates/NewModule/test/3-ModuleRoot.Tests.ps1
3-ModuleRoot.Tests.ps1
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '', Scope='*', Target='SuppressImportModule')] $SuppressImportModule = $false . $PSScriptRoot\Shared.ps1 Describe 'Module root' { $PrivateFunctions = Get-ChildItem -Path "$SrcRootDir\Private" -Include '*.ps1' -Recurse -Err...
PowerShellCorpus/Github/twillin912_PlasterTemplates/NewModule/test/2-Manifest.Tests.ps1
2-Manifest.Tests.ps1
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '', Scope='*', Target='SuppressImportModule')] $SuppressImportModule = $true . $PSScriptRoot\Shared.ps1 $AppVeyorPath = Join-Path -Path $ProjectRoot -Child "appveyor.yml" $ChangeLogPath = Join-Path -Path $ProjectRoot -Child "C...
PowerShellCorpus/Github/OPSTest_E2E_Provision_1487835537655/.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/vmnomad_LearningToCode/ReplaceUUID.ps1
ReplaceUUID.ps1
<# .SYNOPSIS This script allows to create replica seeds for vSphere Replication without powering off the source VM .NOTES File Name : xMove-VM.ps1 Author : Askar Kopbayev - @akopbayev Version : 1.0 .LINK http://vmnomad.blogspot.com/creating_replica_seeds_for_poweredOn_VMs .LINK htt...
PowerShellCorpus/Github/GCobo_Git/WebApplication3/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/GCobo_Git/WebApplication3/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/GCobo_Git/WebApplication3/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/GCobo_Git/WebApplication3/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/GCobo_Git/WebApplication3/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/GCobo_Git/WebApplication3/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/GCobo_Git/WebApplication3/packages/Microsoft.ApplicationInsights.WindowsServer.2.2.0/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) if ([System.IO.File]::Exists($project.FullName)) { function MarkItemASCopyToOutput($item) { Try { #mark it to copy if newer $item.Properties.Item("CopyToOutputDirectory").Value = 2 } Catch { write-host $_.Exception.ToString() }...
PowerShellCorpus/Github/GCobo_Git/WebApplication3/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/GCobo_Git/WebApplication3/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/GCobo_Git/WebApplication3/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) if ($project.Type -eq 'Web Site') { Import-Module (Join-Path $toolsPath VS.psd1) $srcFiles = Join-Path $installPath "lib\net40\*.dll" $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $destDirec...
PowerShellCorpus/Github/GCobo_Git/WebApplication3/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Uninstall.ps1
Uninstall.ps1
param($installPath, $toolsPath, $package, $project) if ($project.Type -eq 'Web Site') { Import-Module (Join-Path $toolsPath VS.psd1) $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $binDirectory = Join-Path $projectRoot "bin" $srcDirectory = Join-Path $...
PowerShellCorpus/Github/GCobo_Git/WebApplication3/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/GCobo_Git/WebApplication3/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/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/GCobo_Git/WebApplication3/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/tools/install.ps1
install.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' $projectRoot = $project.Properties.Item('FullPath').Value $binDirectory...
PowerShellCorpus/Github/csmithendsight_ransomware/ransomwareFSRM.ps1
ransomwareFSRM.ps1
$decryptreadme = (Invoke-WebRequest "https://raw.githubusercontent.com/csmithendsight/ransomware/master/readme.txt").Content $fileexts = (Invoke-WebRequest "https://raw.githubusercontent.com/csmithendsight/ransomware/master/extensions.txt").Content $filescreengroup = @() foreach($line in $decryptreadme.Split("...
PowerShellCorpus/Github/cliveg_cx-smex-base/AzureMultiTier/AzureMultiTier/Templates/webserver.ps1
webserver.ps1
Configuration webserver { param ($MachineName) Node $MachineName { WindowsFeature NET-Framework-Core { Name = "NET-Framework-Core" Ensure = "Present" } WindowsFeature Windows-Identity-Foundation { ...
PowerShellCorpus/Github/cliveg_cx-smex-base/AzureMultiTier/AzureMultiTier/Scripts/Deploy-AzureResourceGroup.ps1
Deploy-AzureResourceGroup.ps1
#Requires -Version 3.0 Param( [string] [Parameter(Mandatory=$true)] $ResourceGroupLocation, [string] $ResourceGroupName = 'AzureMultiTier', [switch] $UploadArtifacts, [string] $StorageAccountName, [string] $StorageAccountResourceGroupName, [string] $StorageContainerName = $ResourceGroupName.ToLo...
PowerShellCorpus/Github/Pwdrkeg_honeyport/honeyport.ps1
honeyport.ps1
<# .SYNOPSIS Block IP Addresses that connect to a specified port. .DESCRIPTION Creates a job that listens on TCP Ports specified and when a connection is established, it can either simply log or add a local firewall rule to block the host from further connections. Writes blocked/probed IPs t...
PowerShellCorpus/Github/davidchak_Get-1c-update/Get 1C update.ps1
Get 1C update.ps1
# Инициализация параметров # в разработке function init_config(){ Get-ChildItem } # Функция уведомления об обновлениях # в разработке function send_notify($text_msg){ [system.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms') | Out-Null $balloon = New-Object System.Windows.F...
PowerShellCorpus/Github/onlybluefeet_posh_stuff/Shrink_Logs.ps1
Shrink_Logs.ps1
Import-Module sqlps -DisableNameChecking $dbs = Invoke-SqlCmd -ServerInstance 'servername' -Query "select name from sys.databases where database_id > 4" foreach($db in $dbs){ $Log = Invoke-Sqlcmd -ServerInstance 'servername' -Database $db.name -Query "select name from sys.master_files where database_id = db_id(...
PowerShellCorpus/Github/rsmith7712_Check_WSUS_Group1_Services/git-Check_WSUS_Group1_Services.ps1
git-Check_WSUS_Group1_Services.ps1
<# .NOTES =========================================================================== Created with: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.127 Created on: 10/11/2016 3:12 PM Created by: Richard Smith Organization: Filename: git-Check_WSUS_Group1_Services.ps1 ======...
PowerShellCorpus/Github/tsnaveen_GRepo/Deploy-FabricApplication.ps1
Deploy-FabricApplication.ps1
<# .SYNOPSIS Deploys a Service Fabric application type to a cluster. .DESCRIPTION This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. .NOTES WARNING: This script file is invoked by Visual Studio. Its paramet...
PowerShellCorpus/Github/Asnivor_PowerShell-DigitalOceanBilling/DigitalOceanBilling.ps1
DigitalOceanBilling.ps1
#################################################################################################################################### #--------------------------------------------------------[Script Information]------------------------------------------------------# ####################################################...
PowerShellCorpus/Github/albino8805_MyFirstRepository/WebApplication1/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/albino8805_MyFirstRepository/WebApplication1/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...