full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/legigor_WindowsPowerShell/Modules/posh-git/CheckVersion.ps1
CheckVersion.ps1
$Global:GitMissing = $false if (!(Get-Command git -TotalCount 1 -ErrorAction SilentlyContinue)) { Write-Warning "git command could not be found. Please create an alias or add it to your PATH." $Global:GitMissing = $true return } $requiredVersion = [Version]'1.7.2' if ((git --version 2> $null) -ma...
PowerShellCorpus/Github/legigor_WindowsPowerShell/Modules/posh-git/Utils.ps1
Utils.ps1
# General Utility Functions function Invoke-NullCoalescing { $result = $null foreach($arg in $args) { if ($arg -is [ScriptBlock]) { $result = & $arg } else { $result = $arg } if ($result) { break } } $result } Set-Alias ?? Invoke-N...
PowerShellCorpus/Github/legigor_WindowsPowerShell/Modules/posh-git/GitPrompt.ps1
GitPrompt.ps1
# Inspired by Mark Embling # http://www.markembling.info/view/my-ideal-powershell-prompt-with-git-integration $global:GitPromptSettings = New-Object PSObject -Property @{ DefaultForegroundColor = $Host.UI.RawUI.ForegroundColor BeforeText = ' [' BeforeForegroundColor = [Console...
PowerShellCorpus/Github/legigor_WindowsPowerShell/Modules/posh-git/GitUtils.ps1
GitUtils.ps1
# Inspired by Mark Embling # http://www.markembling.info/view/my-ideal-powershell-prompt-with-git-integration function Get-GitDirectory { if ($Env:GIT_DIR) { $Env:GIT_DIR } else { Get-LocalOrParentPath .git } } function Get-GitBranch($gitDir = $(Get-GitDirectory), [Diagnostics.S...
PowerShellCorpus/Github/legigor_WindowsPowerShell/Modules/posh-git/profile.example.ps1
profile.example.ps1
Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent) # Load posh-git module from current directory Import-Module .\posh-git # If module is installed in a default location ($env:PSModulePath), # use this instead (see about_Modules for more information): # Import-Module posh-git # Set...
PowerShellCorpus/Github/legigor_WindowsPowerShell/Modules/posh-git/install.ps1
install.ps1
param([switch]$WhatIf = $false) if($PSVersionTable.PSVersion.Major -lt 2) { Write-Warning "posh-git requires PowerShell 2.0 or better; you have version $($Host.Version)." return } if(!(Test-Path $PROFILE)) { Write-Host "Creating PowerShell profile...`n$PROFILE" New-Item $PROFILE -Force -Type ...
PowerShellCorpus/Github/legigor_WindowsPowerShell/Modules/posh-git/GitTabExpansion.ps1
GitTabExpansion.ps1
# Initial implementation by Jeremy Skinner # http://www.jeremyskinner.co.uk/2010/03/07/using-git-with-windows-powershell/ $Global:GitTabSettings = New-Object PSObject -Property @{ AllCommands = $false } $subcommands = @{ bisect = 'start bad good skip reset visualize replay log run' notes = 'edit ...
PowerShellCorpus/Github/legigor_WindowsPowerShell/Modules/posh-hg/HgUtils.ps1
HgUtils.ps1
function isHgDirectory() { if(test-path ".git") { return $false; #short circuit if git repo } if(test-path ".hg") { return $true; } # Test within parent dirs $checkIn = (Get-Item .).parent while ($checkIn -ne $NULL) { $pathToTest = $checkIn.fullname + '/.hg' ...
PowerShellCorpus/Github/legigor_WindowsPowerShell/Modules/posh-hg/HgTabExpansion.ps1
HgTabExpansion.ps1
$script:hgCommands = @() $script:hgflowStreams = @() function HgTabExpansion($lastBlock) { switch -regex ($lastBlock) { #handles hgtk help <cmd> #handles hgtk <cmd> 'thg (help )?(\S*)$' { thgCommands($matches[2]); } #handles hg update <branch name> #handles hg merge <br...
PowerShellCorpus/Github/legigor_WindowsPowerShell/Modules/posh-hg/HgPrompt.ps1
HgPrompt.ps1
# For backwards compatibility $global:HgPromptSettings = $global:PoshHgSettings function Write-Prompt($Object, $ForegroundColor, $BackgroundColor = -1) { if ($BackgroundColor -lt 0) { Write-Host $Object -NoNewLine -ForegroundColor $ForegroundColor } else { Write-Host $Object -NoNewLine -...
PowerShellCorpus/Github/legigor_WindowsPowerShell/Modules/posh-hg/profile.example.ps1
profile.example.ps1
Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent) # Load posh-hg module from current directory Import-Module .\posh-hg # If module is installed in a default location ($env:PSModulePath), # use this instead (see about_Modules for more information): # Import-Module posh-hg # Set up...
PowerShellCorpus/Github/legigor_WindowsPowerShell/Modules/posh-hg/install.ps1
install.ps1
param([switch]$WhatIf = $false) if($PSVersionTable.PSVersion.Major -lt 2) { Write-Warning "posh-hg requires PowerShell 2.0 or better; you have version $($Host.Version)." return } if(!(Get-Command hg -ErrorAction SilentlyContinue)) { Write-Warning 'Could not find hg command. Please create an hg ali...
PowerShellCorpus/Github/legigor_WindowsPowerShell/Modules/posh-hg/Settings.ps1
Settings.ps1
$global:PoshHgSettings = New-Object PSObject -Property @{ #Retreival settings GetFileStatus = $true GetBookmarkStatus = $true #Before prompt BeforeText = ' [' BeforeForegroundColor = [ConsoleColor]::Yellow BeforeBackgroundColor = $Host.UI....
PowerShellCorpus/Github/legigor_WindowsPowerShell/Modules/Nvt2/BuildClientPackage.ps1
BuildClientPackage.ps1
# .\.nuget\NuGet pack .\Client\Client.csproj -Symbols .\.nuget\NuGet pack .\Client\Client.csproj
PowerShellCorpus/Github/legigor_WindowsPowerShell/temp/TortoiseGit.ps1
TortoiseGit.ps1
# TortoiseGit function private:Get-TortoiseGitPath { if ((Test-Path "C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe") -eq $true) { # TortoiseGit 1.8.0 renamed TortoiseProc to TortoiseGitProc. return "C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe" } return "C:\Program Files\Tortoise...
PowerShellCorpus/Github/legigor_WindowsPowerShell/temp/CheckVersion.ps1
CheckVersion.ps1
$Global:GitMissing = $false if (!(Get-Command git -TotalCount 1 -ErrorAction SilentlyContinue)) { Write-Warning "git command could not be found. Please create an alias or add it to your PATH." $Global:GitMissing = $true return } $requiredVersion = [Version]'1.7.2' if ((git --version 2> $null) -ma...
PowerShellCorpus/Github/legigor_WindowsPowerShell/temp/Utils.ps1
Utils.ps1
# General Utility Functions function Invoke-NullCoalescing { $result = $null foreach($arg in $args) { if ($arg -is [ScriptBlock]) { $result = & $arg } else { $result = $arg } if ($result) { break } } $result } Set-Alias ?? Invoke-N...
PowerShellCorpus/Github/legigor_WindowsPowerShell/temp/GitPrompt.ps1
GitPrompt.ps1
# Inspired by Mark Embling # http://www.markembling.info/view/my-ideal-powershell-prompt-with-git-integration $global:GitPromptSettings = New-Object PSObject -Property @{ DefaultForegroundColor = $Host.UI.RawUI.ForegroundColor BeforeText = ' [' BeforeForegroundColor = [Console...
PowerShellCorpus/Github/legigor_WindowsPowerShell/temp/profile.example.ps1
profile.example.ps1
Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent) # Load posh-git module from current directory Import-Module .\posh-git # If module is installed in a default location ($env:PSModulePath), # use this instead (see about_Modules for more information): # Import-Module posh-git # Set...
PowerShellCorpus/Github/legigor_WindowsPowerShell/temp/install.ps1
install.ps1
param([switch]$WhatIf = $false) if($PSVersionTable.PSVersion.Major -lt 2) { Write-Warning "posh-git requires PowerShell 2.0 or better; you have version $($Host.Version)." return } if(!(Test-Path $PROFILE)) { Write-Host "Creating PowerShell profile...`n$PROFILE" New-Item $PROFILE -Force -Type ...
PowerShellCorpus/Github/legigor_WindowsPowerShell/temp/GitTabExpansion.ps1
GitTabExpansion.ps1
# Initial implementation by Jeremy Skinner # http://www.jeremyskinner.co.uk/2010/03/07/using-git-with-windows-powershell/ $Global:GitTabSettings = New-Object PSObject -Property @{ AllCommands = $false } $subcommands = @{ bisect = 'start bad good skip reset visualize replay log run' notes = 'edit ...
PowerShellCorpus/Github/glaucia86_integritas-desafio-angular-dotnet/IntegritasChallenge/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/glaucia86_integritas-desafio-angular-dotnet/IntegritasChallenge/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/glaucia86_integritas-desafio-angular-dotnet/IntegritasChallenge/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/glaucia86_integritas-desafio-angular-dotnet/IntegritasChallenge/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/glaucia86_integritas-desafio-angular-dotnet/IntegritasChallenge/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/glaucia86_integritas-desafio-angular-dotnet/IntegritasChallenge/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/glaucia86_integritas-desafio-angular-dotnet/IntegritasChallenge/packages/Microsoft.ApplicationInsights.WindowsServer.2.1.0/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) if ([System.IO.File]::Exists($project.FullName)) { function MarkItemASCopyToOutput($item) { Try { #mark it to copy if newer $item.Properties.Item("CopyToOutputDirectory").Value = 2 } Catch { write-host $_.Exception.ToString() }...
PowerShellCorpus/Github/glaucia86_integritas-desafio-angular-dotnet/IntegritasChallenge/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/glaucia86_integritas-desafio-angular-dotnet/IntegritasChallenge/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/glaucia86_integritas-desafio-angular-dotnet/IntegritasChallenge/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/glaucia86_integritas-desafio-angular-dotnet/IntegritasChallenge/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/glaucia86_integritas-desafio-angular-dotnet/IntegritasChallenge/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/CorralesD_10-FullStackTodo/Frontend/04-VSTDA/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 ...
PowerShellCorpus/Github/CorralesD_10-FullStackTodo/Backend/VSTDA/packages/Microsoft.ApplicationInsights.WindowsServer.2.1.0/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) if ([System.IO.File]::Exists($project.FullName)) { function MarkItemASCopyToOutput($item) { Try { #mark it to copy if newer $item.Properties.Item("CopyToOutputDirectory").Value = 2 } Catch { write-host $_.Exception.ToString() }...
PowerShellCorpus/Github/CorralesD_10-FullStackTodo/Backend/VSTDA/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/CorralesD_10-FullStackTodo/Backend/VSTDA/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/CorralesD_10-FullStackTodo/Backend/VSTDA/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/CorralesD_10-FullStackTodo/Backend/VSTDA/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/CorralesD_10-FullStackTodo/Backend/VSTDA/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/brollins90_Bapi/src/Bapi/Properties/PublishProfiles/bapitest - Web Deploy-publish.ps1
bapitest - Web Deploy-publish.ps1
[cmdletbinding(SupportsShouldProcess=$true)] param($publishProperties, $packOutput, $nugetUrl) # to learn more about this file visit http://go.microsoft.com/fwlink/?LinkId=524327 $publishModuleVersion = '1.0.1' function Get-VisualStudio2015InstallPath{ [cmdletbinding()] param() process{ $k...
PowerShellCorpus/Github/aarons2222_Powershell/powershellAssessment.ps1
powershellAssessment.ps1
#LOGIN TO AZURE - DISPLAYS LOGIN DIALOG Login-AzureRmAccount # Random generator function function rand { -join ((48..57) + (97..100) | Get-Random -Count 1 | % {[char]$_}) } #_______ VARIABLES _______# #hides green (GET) progress bars $ProgressPreference = 'SilentlyContinue' # Error variable use...
PowerShellCorpus/Github/cynoteck_Windows10-Universal-DemoApp/DemoAppW10/DemoAppW10/AppPackages/DemoAppW10_1.0.0.0_x64_Test/Add-AppDevPackage.ps1
Add-AppDevPackage.ps1
# # Add-AppxDevPackage.ps1 is a PowerShell script designed to install app # packages created by Visual Studio for developers. To run this script from # Explorer, right-click on its icon and choose "Run with PowerShell". # # Visual Studio supplies this script in the folder generated with its # "Prepare Package" c...
PowerShellCorpus/Github/cynoteck_Windows10-Universal-DemoApp/DemoAppW10/packages/PlatformSpecific.Analyzer.0.0.2-alpha/tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) $analyzersPath = join-path $toolsPath "analyzers" # Uninstall the language agnostic analyzers. foreach ($analyzerFilePath in Get-ChildItem $analyzersPath -Filter *.dll) { if($project.Object.AnalyzerReferences) { $project.Object.AnalyzerRefer...
PowerShellCorpus/Github/cynoteck_Windows10-Universal-DemoApp/DemoAppW10/packages/PlatformSpecific.Analyzer.0.0.2-alpha/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) $analyzersPath = join-path $toolsPath "analyzers" # Install the language agnostic analyzers. foreach ($analyzerFilePath in Get-ChildItem $analyzersPath -Filter *.dll) { if($project.Object.AnalyzerReferences) { $project.Object.AnalyzerReferen...
PowerShellCorpus/Github/cynoteck_Windows10-Universal-DemoApp/DemoAppW10/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/wp8/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module Add-ApplicationInsights $project; Remove-Module Microsoft.ApplicationInsights; # SIG # Begin signature block # MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ...
PowerShellCorpus/Github/cynoteck_Windows10-Universal-DemoApp/DemoAppW10/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/win81/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module Add-ApplicationInsights $project; Remove-Module Microsoft.ApplicationInsights; # SIG # Begin signature block # MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ...
PowerShellCorpus/Github/cynoteck_Windows10-Universal-DemoApp/DemoAppW10/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/wpa81/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module Add-ApplicationInsights $project; Remove-Module Microsoft.ApplicationInsights; # SIG # Begin signature block # MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ...
PowerShellCorpus/Github/cynoteck_Windows10-Universal-DemoApp/DemoAppW10/packages/Microsoft.ApplicationInsights.0.14.3-build00177/tools/net40/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Checking if Path exists because the websites don't have a project file if ([System.IO.File]::Exists($project.FullName)) { # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, Pu...
PowerShellCorpus/Github/cynoteck_Windows10-Universal-DemoApp/DemoAppW10/packages/Microsoft.ApplicationInsights.0.14.3-build00177/tools/net40/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # Checking if Path exists because the websites don't have a project file if ([System.IO.File]::Exists($project.FullName)) { # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, Publ...
PowerShellCorpus/Github/Sikkandar-Sha_SEC-AUDIT/SEC-AUDIT-(Secure).ps1
SEC-AUDIT-(Secure).ps1
#RECORDING TRANSCRIPT TO DUMP FILE $CurrentDir = $PSScriptRoot $ServerName = $env:computername $DumpFilePath = "$CurrentDir\"+$ServerName+"-CONFIG_DUMP_$(get-date -Format yyyymmdd_hhmmtt).txt" Start-Transcript -Path $DumpFilePath -NoClobber Write-Host Write-Host 'Checking if your PowerShell Script Execution P...
PowerShellCorpus/Github/tsfahmed2_AMT-lms/remediation.ps1
remediation.ps1
<# .NOTES =========================================================================== Created with: SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.138 Created on: 5/21/2017 12:09 AM Created by: tausifkhan Organization: FICO Filename: ==========================================...
PowerShellCorpus/Github/tsfahmed2_AMT-lms/discovery.ps1
discovery.ps1
<# .NOTES =========================================================================== Created with: SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.138 Created on: 5/21/2017 12:05 AM Created by: tausifkhan Organization: FICO Filename: ==========================================...
PowerShellCorpus/Github/tsfahmed2_AMT-lms/remote.ps1
remote.ps1
<# .NOTES =========================================================================== Created with: SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.138 Created on: 5/21/2017 12:05 AM Created by: tausifkhan Organization: FICO Filename: ==========================================...
PowerShellCorpus/Github/hunezhaw_ZHAW-PW-Letter-itextsharp/AGPLGeneratePWLetters/AGPLUsageExample.ps1
AGPLUsageExample.ps1
Import-Module AGPLGeneratePWLetters Import-Module AGPLLogging Function Create-Form(){ # define return object $retObj = New-Object Object Add-Member -InputObject $retObj -MemberType NoteProperty -Name 'filter' -Value '' Add-Member -InputObject $retObj -MemberType NoteProperty -Name 'validfrom' -Value '' ...
PowerShellCorpus/Github/Doist_java-code-styles/winscript.ps1
winscript.ps1
Write-Host "" Write-Host "Installing Doist code style configs..." Write-Host "" $arr = Get-ChildItem "$Env:userprofile\.AndroidStudio*\config" | Where-Object {$_.PSIsContainer} | Foreach-Object {$_.FullName} Foreach($path in $arr) { Write-Host "Copying codestyle to " $path\codestyles ...
PowerShellCorpus/Github/rajakamal_test/DemoApplication/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/rajakamal_test/DemoApplication/packages/OctoPack.3.0.45/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) # This is the MSBuild targets file to add $targetsFile = [System.IO.Path]::Combine($toolsPath, $package.Id + '.targets') # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=ne...
PowerShellCorpus/Github/rajakamal_test/DemoApplication/packages/OctoPack.3.0.45/tools/Uninstall.ps1
Uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' # Grab the loaded MSBuild project for the project $msbuild = [Microsoft.Build.Evaluatio...
PowerShellCorpus/Github/rajakamal_test/DemoApplication/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/rajakamal_test/DemoApplication/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/rajakamal_test/DemoApplication/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/rajakamal_test/DemoApplication/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/rajakamal_test/DemoApplication/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/rajakamal_test/DemoApplication/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/rajakamal_test/DemoApplication/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/rajakamal_test/DemoApplication/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/rajakamal_test/DemoApplication/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/rajakamal_test/DemoApplication/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/rajakamal_test/DemoApplication/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/Keawman_doc2pdf.ps1/doc2pdf.ps1
doc2pdf.ps1
$message = 'This script will convert any doc/docx files in this folder and subfolders to PDF and delete the existing doc/docx files.' $question = 'Are you sure you want to proceed?' $choices = New-Object Collections.ObjectModel.Collection[Management.Automation.Host.ChoiceDescription] $choices.Add((New-Object Mana...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_Provision_2017_5_8_10_11_25/.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/ensleep_jggs/JSGS/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/ensleep_jggs/JSGS/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/ensleep_jggs/JSGS/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/ensleep_jggs/JSGS/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/ensleep_jggs/JSGS/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/ensleep_jggs/JSGS/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/ensleep_jggs/JSGS/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/ensleep_jggs/JSGS/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/ensleep_jggs/JSGS/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/ensleep_jggs/JSGS/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/ensleep_jggs/JSGS/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/ensleep_jggs/JSGS/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/ensleep_jggs/JSGS/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/ensleep_jggs/JSGS/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/stefanstranger_Events/OperationsDay2017/Code/Demo01/DemoNodeJSWebAppResourceGroup/Deploy-AzureResourceGroup.ps1
Deploy-AzureResourceGroup.ps1
#Requires -Version 3.0 #Requires -Module AzureRM.Resources #Requires -Module Azure.Storage Param( [string] [Parameter(Mandatory=$true)] $ResourceGroupLocation, [string] $ResourceGroupName = 'Demo01', [switch] $UploadArtifacts, [string] $StorageAccountName, [string] $StorageContainerName = ...
PowerShellCorpus/Github/stefanstranger_Events/OperationsDay2017/Code/Demo01/DemoNodeJSWebAppResourceGroup/AzureRM_UnitTest.ps1
AzureRM_UnitTest.ps1
# # AzureRM_UnitTest.ps1 # Param ( # Param1 help description [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, Position=0)] $ResourceGroupName) #region Get-AzureRMResource Find-AzureRmResource -ResourceGroupNameContains $R...
PowerShellCorpus/Github/travisty-_PSCloudBleed/src/Get-SitesUsingCloudflare.ps1
Get-SitesUsingCloudflare.ps1
#Requires -Version 5 using namespace System.Collections.Generic; using namespace System.IO; function Get-SitesUsingCloudflare { <# .SYNOPSIS Cross references sites with a list of domains possibly affected by the CloudBleed HTTPS traffic leak. .DESCRIPTION Get-SitesUsingCloudflare cross references...
PowerShellCorpus/Github/travisty-_PSCloudBleed/tests/Get-SitesUsingCloudflare.Tests.ps1
Get-SitesUsingCloudflare.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.' . "$here\..\src\$sut" Describe "Get-SitesUsingCloudflare" { Context "When it produces output." { Mock -CommandName Get-SitesUsingCloudflare -MockWith { ...
PowerShellCorpus/Github/atribeiro_WCFService/ClientServiceCsv/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/atribeiro_WCFService/ClientServiceCsv/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/atribeiro_WCFService/ClientServiceCsv/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/atribeiro_WCFService/ClientServiceCsv/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/atribeiro_WCFService/ClientServiceCsv/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/atribeiro_WCFService/ClientServiceCsv/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/atribeiro_WCFService/ClientServiceCsv/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/atribeiro_WCFService/ClientServiceCsv/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/atribeiro_WCFService/ClientServiceCsv/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/atribeiro_WCFService/ClientServiceCsv/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...