full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/MSUDenverSystemsEngineering_MATLAB_2017A/AppDeployToolkit/AppDeployToolkitMain.ps1
AppDeployToolkitMain.ps1
<# .SYNOPSIS This script contains the functions and logic engine for the Deploy-Application.ps1 script. .DESCRIPTION The script can be called directly to dot-source the toolkit functions for testing, but it is usually called by the Deploy-Application.ps1 script. The script can usually be updated to the latest versio...
PowerShellCorpus/Github/MSUDenverSystemsEngineering_MATLAB_2017A/AppDeployToolkit/AppDeployToolkitHelp.ps1
AppDeployToolkitHelp.ps1
<# .SYNOPSIS Displays a graphical console to browse the help for the App Deployment Toolkit functions .DESCRIPTION Displays a graphical console to browse the help for the App Deployment Toolkit functions .EXAMPLE AppDeployToolkitHelp.ps1 .NOTES .LINK http://psappdeploytoolkit.com #> ##*================...
PowerShellCorpus/Github/MSUDenverSystemsEngineering_MATLAB_2017A/Tests/PSScriptAnalyzer.tests.ps1
PSScriptAnalyzer.tests.ps1
Describe 'Testing against PSScriptAnalyzer rules' { Context 'PSScriptAnalyzer Standard Rules' { $analysis = Invoke-ScriptAnalyzer -Path 'Deploy-Application.ps1' $scriptAnalyzerRules = Get-ScriptAnalyzerRule forEach ($rule in $scriptAnalyzerRules) { It "Should pass $rule" { If ($analysis.RuleName -co...
PowerShellCorpus/Github/wdwinslow_gcp-snapshots/remove-snaps.ps1
remove-snaps.ps1
# Set the path and file name for PowerShell transcripts (logs) to be written to. $LogPath = "c:\logs\powershell\snaps\" $LogFile = Get-Date -Format FileDateTimeUniversal $TranscriptFileName = $LogPath + $LogFile +".txt" # Start the transcript. Start-Transcript -Path $TranscriptFileName #Set the project. $Pro...
PowerShellCorpus/Github/wdwinslow_gcp-snapshots/create-snaps.ps1
create-snaps.ps1
# Set the path and file name for PowerShell transcripts (logs) to be written to. $LogPath = "c:\logs\powershell\snaps\" $LogFile = Get-Date -Format FileDateTimeUniversal $TranscriptFileName = $LogPath + $LogFile +".txt" # Start the transcript. Start-Transcript -Path $TranscriptFileName #Set the GCP project. ...
PowerShellCorpus/Github/mbbonagua_Repo01/iPBC/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/mbbonagua_Repo01/iPBC/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/mbbonagua_Repo01/iPBC/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/mbbonagua_Repo01/iPBC/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/mbbonagua_Repo01/iPBC/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/mbbonagua_Repo01/iPBC/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/mbbonagua_Repo01/iPBC/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/mbbonagua_Repo01/iPBC/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/mbbonagua_Repo01/iPBC/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/mbbonagua_Repo01/iPBC/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/mbbonagua_Repo01/iPBC/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/Azure-Samples_virtual-machines-powershell-auto-expired/PowerShell/SetExpiredDateAzureVM.ps1
SetExpiredDateAzureVM.ps1
<# The sample scripts are not supported under any Microsoft standard support program or service. The sample scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for ...
PowerShellCorpus/Github/nocomms_powershell/GUI.ps1
GUI.ps1
Add-Type -assembly System.Windows.Forms | Out-Null Add-Type -AssemblyName System.Core | Out-Null <####### Назначение основной формы #######> $Window = New-Object System.Windows.Forms.Form $Window.MinimumSize = New-Object System.Drawing.Size (885, 757); $Window.MaximumSize = New-Object System.Drawing.Size (885,...
PowerShellCorpus/Github/cdhgee_o365-admin/Add-O365License.ps1
Add-O365License.ps1
[CmdletBinding()] Param( [Parameter(Mandatory=$true)] $SkuId, [Parameter(Mandatory=$true)] $SkuOption, [Parameter(Mandatory=$true)] $file ) Function Set-O365License { [CmdletBinding()] Param( [Parameter(ValueFromPipeline=$true)] $user ) Begin { Connect-MsolService...
PowerShellCorpus/Github/junshao_SetProductVersionWhenBuildProject/SetProductVersionWhenBuildProject/content/_SetProductVersionWhenBuildProject/Config.ps1
Config.ps1
# The relative path of assembly information cs file under the project. # If not specified, 'Properties\AssemblyInfo.cs' will be used. $assemblyInfoFileRelativePath = "" # githash for the latest commit $githash = git log -1 --pretty='%h' # Product version value in the dll file property, which is set by Assembly...
PowerShellCorpus/Github/junshao_SetProductVersionWhenBuildProject/SetProductVersionWhenBuildProject/content/_SetProductVersionWhenBuildProject/DoNotModify/RemoveAssemblyInfoFileChange.ps1
RemoveAssemblyInfoFileChange.ps1
param ([string]$ProjectFilePath, [string]$OutputDirectory, [string]$BuildConfiguration, [string]$BuildPlatform) # Turn on Strict Mode to help catch syntax-related errors. # This must come after a script's/function's param section. # Forces a function to be the first non-comment code to appear in a PowerShell M...
PowerShellCorpus/Github/junshao_SetProductVersionWhenBuildProject/SetProductVersionWhenBuildProject/content/_SetProductVersionWhenBuildProject/DoNotModify/SetProductVersion.ps1
SetProductVersion.ps1
param ([string]$ProjectFilePath, [string]$OutputDirectory, [string]$BuildConfiguration, [string]$BuildPlatform) # Turn on Strict Mode to help catch syntax-related errors. # This must come after a script's/function's param section. # Forces a function to be the first non-comment code to appear in a PowerShell M...
PowerShellCorpus/Github/junshao_SetProductVersionWhenBuildProject/SetProductVersionWhenBuildProject/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) # Get the current Event text. $preBuildEventText = $project.Properties.Item("PreBuildEvent").Value $postBuildEventText = $project.Properties.Item("PostBuildEvent").Value # Define the Event Code to add. $preBuildEventCode = @' PowerShell -NoProfile -Execution...
PowerShellCorpus/Github/junshao_SetProductVersionWhenBuildProject/SetProductVersionWhenBuildProject/tools/Uninstall.ps1
Uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Get the current Pre-Build Event text. $preBuildEventText = $project.Properties.Item("PreBuildEvent").Value $postBuildEventText = $project.Properties.Item("PostBuildEvent").Value # Define the Event Code to add. $preBuildEventCode = @' PowerShell -NoProfile ...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/Microsoft.PowerShell_profile.ps1
Microsoft.PowerShell_profile.ps1
$PROFILE_PATH = "$REPOS_PATH/rcm-dotfiles/powershell/profile/profile.ps1" if (Test-Path $PROFILE_PATH) { . $PROFILE_PATH }
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/aliases.ps1
aliases.ps1
Set-Alias add Git-Add Set-Alias blame Git-Blame Set-Alias blametool Git-Blametool Set-Alias bt blametool Set-Alias branch Git-Branch Set-Alias br branch Set-Alias build Invoke-Build Set-Alias checkout Git-Checkout Set-Alias co checkout Set-Alias clean Git-Clean Set-Alias clone Git-Clone Set-Alias commit Git-...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/constants.ps1
constants.ps1
# Executable Constants $MSBUILD = 'C:\Program Files (x86)\MSBuild\12.0\Bin\amd64\MSBuild.exe' if(-not (Test-Path $MSBUILD)) { $MSBUILD = 'C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe' if(-not (Test-Path $MSBUILD)) { $MSBUILD = 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe' } } $NUNIT = 'C:\P...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/Invoke-Test.ps1
Invoke-Test.ps1
function Invoke-Test { <# .SYNOPSIS Performs unit tests on the current build. .DESCRIPTION The Invoke-Test function utilizes NUnit to run all tests within a test file. It relies on the nearest parent directory's NUnit files. .EXAMPLE PS> test ----------- Description Compiles projects in th...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/profile.ps1
profile.ps1
$scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition $scriptName = Split-Path -Leaf $MyInvocation.MyCommand.Definition Get-ChildItem "$scriptPath" -include "*.ps1" -recurse | ?{ $_ -notmatch "\\$scriptName|.Tests.ps1|\\user\\" } | %{ Write-Verbose "`tLoading $($_.FullName)" . $_.FullName } $...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/av-help.ps1
av-help.ps1
function av-help([string] $command) { <# .SYNOPSIS Compiles all projects and copies to the build directory. .DESCRIPTION The Invoke-Build function utilizes MsBuild to compiles all of the projects identified in the build file. It relies on the nearest parent directory's build files. .PARAMETER command Re...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/Generate-CoverageReport.ps1
Generate-CoverageReport.ps1
function Generate-CoverageReport { <# .SYNOPSIS Generates a code coverage report from the supplied code coverage output file. .DESCRIPTION The Generate-CoverageReport function utililizes OpenCover's Report Generator to take the resulting output from OpenCover and creates an HTML report for easier viewing. ...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/Invoke-Build.ps1
Invoke-Build.ps1
function Invoke-Build { <# .SYNOPSIS Compiles all projects and copies to the build directory. .DESCRIPTION The Invoke-Build function utilizes MsBuild to compiles all of the projects identified in the build file. It relies on the nearest parent directory's build files. .PARAMETER test Indicates unit test...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/Generate-TestReport.ps1
Generate-TestReport.ps1
function Generate-TestReport { <# .SYNOPSIS Generates a unit test report from the supplied unit test output file. .DESCRIPTION The Generate-TestReport function utililizes NUnit2Report to take the resulting output from NUnit and creates an HTML report for easier viewing. .EXAMPLE PS> test TestResults.xml ...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/Invoke-Coverage.ps1
Invoke-Coverage.ps1
function Invoke-Coverage { <# .SYNOPSIS Performs code coverage on the current build. .DESCRIPTION The Invoke-Coverage function utilizes OpenCover to run code coverage on the NUnit output. A report will be generated and displayed open completion. .EXAMPLE PS> coverage ----------- Description ...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/user/Project-Functions.ps1
Project-Functions.ps1
function Invoke-CorrectReferencePaths() { [CmdletBinding()] param ( [string]$projectPath, [string]$replacementText = '.*\\bigbin\\(.+)', [string]$referencePath = '$(RmBigBinPath)' ) if (-not (Test-Path $projectPath)) { Write-Error "Project file does not exist: $projectPath" } ...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/user/Branch-Navigation.ps1
Branch-Navigation.ps1
$global:branchHistory = @{} # Gets the history object for the current repo. # Creates a new history object if the repo hasn't been encountered in this session. function Get-BranchHistoryForRepo() { $repoName = git remote -v | % { if ($_ -match ".*:(.+) \(fetch\)") { return $Matches[1] ...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/user/user.profile.ps1
user.profile.ps1
$scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition $TEAM_PREFIX = "CR" # Load posh-git example profile cd C: . 'C:\repos\vendor-misc\posh-git\profile.example.ps1' . "$scriptPath\Branch-Navigation.ps1" . "$scriptPath\Location-Navigation.ps1" . "$scriptPath\Project-Functions.ps1" Set-Alia...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/user/Location-Navigation.ps1
Location-Navigation.ps1
function Goto-Location($location) { <# .SYNOPSIS Changes to the specified location and stores your previous location in your location history. .DESCRIPTION The Goto-Location function utilizes Push-Location to switch to the specified location while storing the previous location. .PARAMETER location Th...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/git/Git-Environment.ps1
Git-Environment.ps1
function Git-Environment { <# .SYNOPSIS Switches to the specified environment and gets the latest. .DESCRIPTION The Git-Environment function is intended to keep the current repository in sync with bigbin. Upon calling, Git-Environment will change directories to bigbin, checkout the specified environment, and...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/git/Git-Create.ps1
Git-Create.ps1
function Git-Create { <# .SYNOPSIS Creates a new branch from a source branch and switches to it. .DESCRIPTION The Git-Create function is intended to create new branches. It gets the latest of the source branch and creates a new branch. The branchType parameter determines the template to use for the branch nam...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/git/Git-MergeBranch.ps1
Git-MergeBranch.ps1
function Git-MergeBranch { <# .SYNOPSIS Merges a branch into a destination branch. .DESCRIPTION The Git-MergeBranch function merges two branches together. It will pull the latest of the first branch, pull the latest of the destination branch, then merge the first branch into the destination branch using --no-...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/git/Git-Upstream-Branch.ps1
Git-Upstream-Branch.ps1
Function Git-Upstream-Branch() { <# .SYNOPSIS Gets the upstream information about a branch. .PARAMETER branch The branch to get information about. #> [CmdletBinding()] param ( [Alias('h')] [switch] $help, [string] $branch ) process { if ( $help ) { help...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/git/Git-Delete.ps1
Git-Delete.ps1
function Git-Delete { <# .SYNOPSIS Deletes a branch. .DESCRIPTION The Git-Delete function is intended to delete branches. Git-Delete supports local and remote branch deletion. If the current branch is the branch to delete, master is checked out. .PARAMETER delete Deletes a fully merged branch. .PARA...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/git/Git-UpstreamBranch.ps1
Git-UpstreamBranch.ps1
function Git-UpstreamBranch { <# .SYNOPSIS Gets the upstream information about a branch. .DESCRIPTION The Git-UpstreamBranch function will return the name of the branch's upstream branch if one exists. .PARAMETER branch The branch to get information about. .EXAMPLE PS> Git-UpstreamBranch $branch ...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/git/Git-Latest.ps1
Git-Latest.ps1
function Git-Latest { <# .SYNOPSIS Checks out the branch and gets the latest. .DESCRIPTION The Git-Latest function will checkout the specified branch and pull the latest (if an upstream branch exists). .PARAMETER branch The branch to checkout and pull. .EXAMPLE PS> latest ----------- Descr...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/git/Invoke-Git.ps1
Invoke-Git.ps1
function Invoke-Git { if ($LogGitCommands) { Write-Host "git $args" -f DarkMagenta } git $args if ($LastExitCode -eq 1) { throw "Invalid Operation" } }
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/git/Git-Wrappers.ps1
Git-Wrappers.ps1
# Git Wrappers for aliasing function Git-Add() { Git-Helper add @args } function Git-Blame() { Git-Helper blame @args } function Git-Blametool() { <# .SYNOPSIS Launches a visual blame tool. .DESCRIPTION The Git-Blametool function utilizes Git GUI's blame visualization to give a more interactive interfac...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/common/Invoke-Ternary.ps1
Invoke-Ternary.ps1
<# .SYNOPSIS Similar to the C# ? : operator e.g. name = (value != null) ? String.Empty : value .DESCRIPTION Similar to the C# ? : operator e.g. name = (value != null) ? String.Empty : value. The first script block is tested. If it evaluates to $true then the second scripblock is evaluated and its ...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/common/Invoke-NullCoalescing.ps1
Invoke-NullCoalescing.ps1
<# .SYNOPSIS Similar to the C# ?? operator e.g. name = value ?? String.Empty .DESCRIPTION Similar to the C# ?? operator e.g. name = value ?? String.Empty; where value would be a Nullable&lt;T&gt; in C#. Even though PowerShell doesn't support nullables yet we can approximate this behavior. In...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/common/WindowsExplorer.ps1
WindowsExplorer.ps1
function Repos { <# .SYNOPSIS Changes the working directory relative to the repos directory. Override the repos directory by setting REPOS_PATH. #> [CmdletBinding()] param ( [string] $repoPath ) cd "$REPOS_PATH\$repoPath" } function Open { <# .SYNOPSIS Opens the directory relative to the c...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/common/Touch-File.ps1
Touch-File.ps1
function Touch-File { $file = $args[0] if($file -eq $null) { throw "No filename supplied" } if(Test-Path $file) { (Get-Item $file).LastWriteTime = (Get-Date) } else { New-Item $file -type file -force | out-null } }
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/common/Write-Info.ps1
Write-Info.ps1
function Write-Info { <# .SYNOPSIS Write a string to the display in cyan text. See 'help Write-Host' for further information. #> Write-Host $args -f cyan }
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/common/Get-ParentItem.ps1
Get-ParentItem.ps1
function Get-ParentItem { <# .SYNOPSIS Gets all matching items in the parent directory. .DESCRIPTION The Get-ParentItem function performs ls on the parent directory and returns any matching items. Optionally, can search for the first parent containing at least one of the matching items. .PARAMETER Recurse ...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/common/Logging.ps1
Logging.ps1
Function Write-Info() { <# .SYNOPSIS Write a string to the display in cyan text. See 'help Write-Host' for further information #> [CmdletBinding()] param ( [Alias('h')] [switch] $help ) process { if ( $help ) { help $MyInvocation.MyCommand return } Write-Host...
PowerShellCorpus/Github/bobbennett_dotfiles/powershell/profile/common/Write-Success.ps1
Write-Success.ps1
function Write-Success { <# .SYNOPSIS Write a string to the display in green text. See 'help Write-Host' for further information #> Write-Host $args -f green }
PowerShellCorpus/Github/rprokhorov_AzureARM/Write-HelloWorld.ps1
Write-HelloWorld.ps1
<# .SYNOPSIS Provides a simple example of a Azure Automation runbook. .DESCRIPTION This runbook provides the "Hello World" example for Azure Automation. If you are brand new to Automation in Azure, you can use this runbook to explore testing and publishing capabilities. The runbook...
PowerShellCorpus/Github/ringo-apo_20151005_web_enzan/20151005_web_enzan/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/ringo-apo_20151005_web_enzan/20151005_web_enzan/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...
PowerShellCorpus/Github/ringo-apo_20151005_web_enzan/20151005_web_enzan/WebApplication1/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/ringo-apo_20151005_web_enzan/20151005_web_enzan/WebApplication1/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/ringo-apo_20151005_web_enzan/20151005_web_enzan/WebApplication1/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/ringo-apo_20151005_web_enzan/20151005_web_enzan/WebApplication1/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/ringo-apo_20151005_web_enzan/20151005_web_enzan/WebApplication1/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/ringo-apo_20151005_web_enzan/20151005_web_enzan/WebApplication1/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/ringo-apo_20151005_web_enzan/20151005_web_enzan/WebApplication1/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/jeffcanas13_powershell_scripts/InvokeRemoteStartWAS_PRE.ps1
InvokeRemoteStartWAS_PRE.ps1
$server ='170.30.11.242'$profile = 'SREDEVPRE'$appserver= 'server1'$outputLog = 'Jenkins_Deployment_Logs\remoteWAS'$wsadminPath = 'E:/Program Files/IBM/WebSphere/AppServer/bin'$wsadminUsername= 'jenkins'$wsadminPassword = '' function Status($logFile){ $stats = "FAILED" $content = Get-Content $logFile while ($stats -eq...
PowerShellCorpus/Github/jeffcanas13_powershell_scripts/BackupAndClearEventLogs.ps1
BackupAndClearEventLogs.ps1
Param( $LogsArchive = "e:\logs\system\eventviewer", $List, $computers, [switch]$AD, [switch]$Localhost, [switch]$clear, [switch]$Help ) Function Get-ADComputers { $ds = New-Object DirectoryServices.DirectorySearcher $ds.Filter = "ObjectCategory=Compu...
PowerShellCorpus/Github/jeffcanas13_powershell_scripts/InvokeRemoteStartWAS_SRV.ps1
InvokeRemoteStartWAS_SRV.ps1
$server ='170.30.11.242' $profile = 'SREDEVSRV' $appserver= 'server1' $outputLog = 'Jenkins_Deployment_Logs\remoteWAS' $wsadminPath = 'E:/Program Files/IBM/WebSphere/AppServer/bin' $wsadminUsername= 'jenkins' $wsadminPassword = '' function Status($logFile) { $stats = "FAILED" $content = Get-Content $logFi...
PowerShellCorpus/Github/jeffcanas13_powershell_scripts/InvokeRemoteStartWAS1.ps1
InvokeRemoteStartWAS1.ps1
$server ='170.30.11.242' $profile = 'SREDEVSRV' $appserver= 'server1' $wsadminPath = 'E:/Program Files/IBM/WebSphere/AppServer/bin' $wsadminUsername= '' $wsadminPassword = '' $processId = (Invoke-WmiMethod -Path "Win32_Process" -ComputerName $server -Name Create -ArgumentList "cmd /c `"E:\Program Files\IBM\We...
PowerShellCorpus/Github/jeffcanas13_powershell_scripts/crtdatefolder_currentdate.ps1
crtdatefolder_currentdate.ps1
New-Item -ItemType Directory -Path ".\$((Get-Date).ToString('yyyy-MM-dd'))"
PowerShellCorpus/Github/jeffcanas13_powershell_scripts/Invoke RemoteClassLoader.ps1
Invoke RemoteClassLoader.ps1
$server = '170.30.11.242' $profile = 'SREQATSRV' $wsadminPath = 'E:/Program Files/IBM/WebSphere/AppServer/bin' $appName='sreqatsrv' $outputLog = 'Jenkins_Deployment_Logs\remoteWAS' Write-Host "Script execution started" try { Write-Host "Configuring the " + $outputLog + " directory." (New-Item \\$server\e$\...
PowerShellCorpus/Github/jeffcanas13_powershell_scripts/InvokeRemoteTask.ps1
InvokeRemoteTask.ps1
param ( [string]$user = "MEMAdminCodeMove", [string]$remoteMachine = "", [string]$taskName = "", [string]$codeMove = "", [string]$jenkinsBuild = "" ) $key = 'HKLM:\SOFTWARE\CSC\CodeMove\SecurityKeys' $keyStr = (Get-ItemProperty -Path $key -Name $user).$user $key = [System.Text.Encoding]::AS...
PowerShellCorpus/Github/IDontUseGit_AnalogClock/analogclock.ps1
analogclock.ps1
param([int]$locx = 768, [int]$locy = 64, [int]$width = 200, [int]$height = 200) $centerx = $width / 2 $centery = $height / 2 $form = new-object system.windows.forms.form $form.height = $height + $centery $form.width = $width + $centerx $form.StartPosition = [system.windows.forms.formstartposition]::manual ...
PowerShellCorpus/Github/IDontUseGit_AnalogClock/runscript.ps1
runscript.ps1
#фю чряґёър set-executionpolicy remotesigned #чряґёъ &"analogclock.ps1" #яюёых чртхЁЇхэш  set-executionpolicy restricted
PowerShellCorpus/Github/coffeeyy_Posh-LCDKit/Posh-LCDKit.ps1
Posh-LCDKit.ps1
## todo:GPO Off - 0xFE,0x56 (low) ; GPO On - 0xFE,0x57 (HIGH) ## sample ## # Write-LCD "tests" # Set-LCDSplashScreen16x2 "TEST Splash Screen" ## command to write a heart (vaild location 1-7) # Write-LCD -ByteArray 0xfe,0x4e,1,0x00,0x0a,0x15,0x11,0x11,0x0a,0x04,0x00 # Write-LCD -ByteArray 1 ## command to Sa...
PowerShellCorpus/Github/subskipper_GameNights/src/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/subskipper_GameNights/src/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/subskipper_GameNights/src/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/subskipper_GameNights/src/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/subskipper_GameNights/src/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/subskipper_GameNights/src/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/subskipper_GameNights/src/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/subskipper_GameNights/src/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/JBanks_ChristmasAnalysis/Analyze-Christmas.ps1
Analyze-Christmas.ps1
Function Get-Ordinal { Param([int]$i) $Suffix = "thstndrd" [string]$i + $Suffix.Substring( $(if ((($i/10)%10) -and ($i%10 -le 3) -and ($i%100 -lt 10 -or $i%100-gt 20)){$i%10*2} else{0}),2) } #end Get-Ordinal $list = @" 1 Partridge in a pear tree 2 Turtle Doves 3 French Hens 4 Call...
PowerShellCorpus/Github/chrisdaley223_ASP_NET_MVC/MVCPartyInvitations/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/chrisdaley223_ASP_NET_MVC/MVCPartyInvitations/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/chrisdaley223_ASP_NET_MVC/MVCMovieDatabase/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/chrisdaley223_ASP_NET_MVC/MVCMovieDatabase/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/chrisdaley223_ASP_NET_MVC/MVCMovieDatabase/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/chrisdaley223_ASP_NET_MVC/MVCMovieDatabase/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/chrisdaley223_ASP_NET_MVC/MVCMovieDatabase/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/chrisdaley223_ASP_NET_MVC/MVCMovieDatabase/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/chrisdaley223_ASP_NET_MVC/MVCMovieDatabase/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/chrisdaley223_ASP_NET_MVC/MVCMovieDatabase/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/chrisdaley223_ASP_NET_MVC/MVCMovieDatabase/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/chrisdaley223_ASP_NET_MVC/MVCMovieDatabase/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/chrisdaley223_ASP_NET_MVC/MVCDemo/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/chrisdaley223_ASP_NET_MVC/MVCDemo/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/chrisdaley223_ASP_NET_MVC/MVCDemo/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/chrisdaley223_ASP_NET_MVC/MVCDemo/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