full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/VaishnavAcharya_CCITrainee/ToDoAppFromScratch/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/VaishnavAcharya_CCITrainee/ToDoAppFromScratch/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/VaishnavAcharya_CCITrainee/ToDoAppFromScratch/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/VaishnavAcharya_CCITrainee/ToDoAppFromScratch/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/VaishnavAcharya_CCITrainee/ToDoAppFromScratch/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/VaishnavAcharya_CCITrainee/ToDoAppFromScratch/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/VaishnavAcharya_CCITrainee/DemoIdentitySecurity/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/VaishnavAcharya_CCITrainee/DemoIdentitySecurity/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/VaishnavAcharya_CCITrainee/DemoIdentitySecurity/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/VaishnavAcharya_CCITrainee/DemoIdentitySecurity/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/VaishnavAcharya_CCITrainee/DemoIdentitySecurity/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/VaishnavAcharya_CCITrainee/DemoIdentitySecurity/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/VaishnavAcharya_CCITrainee/DemoIdentitySecurity/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/VaishnavAcharya_CCITrainee/DemoIdentitySecurity/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/VaishnavAcharya_CCITrainee/DemoIdentitySecurity/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/VaishnavAcharya_CCITrainee/DemoIdentitySecurity/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/VaishnavAcharya_CCITrainee/DemoIdentitySecurity/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/VaishnavAcharya_CCITrainee/DemoIdentitySecurity/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/VaishnavAcharya_CCITrainee/MVCMusicStore/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/VaishnavAcharya_CCITrainee/MVCMusicStore/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/VaishnavAcharya_CCITrainee/MVCMusicStore/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/VaishnavAcharya_CCITrainee/MVCMusicStore/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/VaishnavAcharya_CCITrainee/MVCMusicStore/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/VaishnavAcharya_CCITrainee/MVCMusicStore/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/VaishnavAcharya_CCITrainee/MVCMusicStore/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/VaishnavAcharya_CCITrainee/MVCMusicStore/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/VaishnavAcharya_CCITrainee/MVCMusicStore/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/VaishnavAcharya_CCITrainee/MVCMusicStore/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/VaishnavAcharya_CCITrainee/MVCMusicStore/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/VaishnavAcharya_CCITrainee/MVCMusicStore/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/luizbon_luizbon-hugo/deploy.ps1 | deploy.ps1 | Param(
[string]$message
)
Write-Host "Deploying updates to GitHub..."
# Build the project.
hugo -t material-design
# Go To Public folder
Set-Location public
# Add changes to git.
git add -A
# Commit changes.
$msg = "rebuilding site " + $(Get-Date)
if (![string]::IsNullOrEmpty($message)) {
$msg ... |
PowerShellCorpus/Github/jeffbuenting_NewRelic/RawCode/Get-NRStuff.ps1 | Get-NRStuff.ps1 |
Import-Module 'F:\OneDrive for Business\Scripts\New Relic\NewRelic.psm1' -force
$APIKey = "1d62dc25a65b6c4a1cd1347e8db2a12c38843359a2af566"
$S = Get-NRServer -APIKey $APIKey -ComputerName cl-hyperv1 | Get-NRServerCPUCounters -APIKey $APIKey -verbose
$S
|
PowerShellCorpus/Github/matarm_personal/add-akey-orsecret-keyvault.ps1 | add-akey-orsecret-keyvault.ps1 | # https://github.com/brentstineman/PersonalStuff/blob/master/PowerShell/ServicePrinciple/
# https://brentdacodemonkey.wordpress.com/2016/12/07/azure-administration-with-certificates/
# https://github.com/robotechredmond
# https://docs.microsoft.com/en-us/powershell/resourcemanager/Azurerm.KeyVault/v2.2.0/Add-AzureKe... |
PowerShellCorpus/Github/OPSTest_E2E_Provision_1488519189160/.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/robertwbrandt_Spark/SparkRun.ps1 | SparkRun.ps1 | # Script to start the OPW version of Spark
# Bob Brandt <projects@brandt.ie>
#
# Copyright (C) 2013 Free Software Foundation, Inc."
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
# This program is free software: you can redistribute it and/or modify i... |
PowerShellCorpus/Github/sadynitro_TfsCiSample/SampleApp01/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/sadynitro_TfsCiSample/SampleApp01/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/sadynitro_TfsCiSample/SampleApp01/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/sadynitro_TfsCiSample/SampleApp01/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/sadynitro_TfsCiSample/SampleApp01/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/sadynitro_TfsCiSample/SampleApp01/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/sadynitro_TfsCiSample/SampleApp01/packages/EntityFramework.6.1.1/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/sadynitro_TfsCiSample/SampleApp01/packages/EntityFramework.6.1.1/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/sadynitro_TfsCiSample/SampleApp01/packages/Newtonsoft.Json.6.0.3/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/christopher-h-clark_hc-service/HealthCatalyst/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/christopher-h-clark_hc-service/HealthCatalyst/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/petejansz_MyLearningGitRepo/copycode-na-functions.ps1 | copycode-na-functions.ps1 | param
(
[string]$script
)
function envCntrlVar_dependencies([string]$filename) # @dependencies
{
$EnvCtrlVarNamesFile = "$env:USERPROFILE\Documents\CMIPS\Env-ctrl-varnames.txt"
$envCntrlVars = cat $EnvCtrlVarNamesFile
$dependencies = @()
foreach ($name in $envCntrlVars)
{
$name = $name.Trim... |
PowerShellCorpus/Github/petejansz_MyLearningGitRepo/csv2xlsx.ps1 | csv2xlsx.ps1 | ##
## Author: Pete Jansz
##
<#
.DESCRIPTION
Convert CSV file to an Excel workbook, using the PSExcel PowerShell module.
http://ramblingcookiemonster.github.io/PSExcel-Intro/
USAGE:
csv2xlsx -csvFilename <csvfile> -worksheetName <string> -xlsxWorkbook <path/filename>
.EXAMPLE
csv2xlsx -csvFilenam... |
PowerShellCorpus/Github/petejansz_MyLearningGitRepo/env-ctrl-refs.ps1 | env-ctrl-refs.ps1 | <#
From a directory of CMIPS MA KSH Scripts and Env-ctrl-varnames.txt of variable names,
produce a CSV file of all KSH files and their reference counts to any Env-ctrl-varnames.txt of variable names and
print the names of unused Env-ctrl-varnames
Author: Pete Jansz
#>
param
(
[string]$path,
[stri... |
PowerShellCorpus/Github/jonathaneckman_NPMPS1/Scripts/Test.ps1 | Test.ps1 | #This is my powershell module. |
PowerShellCorpus/Github/OPSTest_E2E_Provision_1487564442322/.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/arnabganguly_Azure-Powershell/Blob_Storage.ps1 | Blob_Storage.ps1 | Login-AzureRmAccount
Get-AzureRmSubscription
$StorageAccountName = "agstorageaccount1"
$StorageAccountKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
$ctx = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey
$containern... |
PowerShellCorpus/Github/arnabganguly_Azure-Powershell/Application_Gateway.ps1 | Application_Gateway.ps1 | Login-AzureRmAccount
* Create a new subnet
$subnet = New-AzureRmVirtualNetworkSubnetConfig -Name agsubnetps -AddressPrefix 10.0.4.0/24
$vnet = New-AzureRmVirtualNetwork -Name agvmps -ResourceGroupName agrg -Location "West Central US" -AddressPrefix 10.0.0.0/16 -Subnet $subnet
$subnet = $vnet.Subnets[0]
$publi... |
PowerShellCorpus/Github/arnabganguly_Azure-Powershell/Metric_Reporting.ps1 | Metric_Reporting.ps1 | Login-AzureRmAccount
Get-AzureRmAlertRule -ResourceGroup agrg -DetailedOutput
$actionemail = New-AzureRmAlertRuleEmail -CustomEmails arnab.ganguly@hcl.com
$actionwebhook = New-AzureRmAlertRuleWebhook -ServiceUri https://www.contoso.com?token=mytoken
Add-AzureRmMetricAlertRule -Name PSmonitoringrule -Location "Wes... |
PowerShellCorpus/Github/arnabganguly_Azure-Powershell/WindowsVMcreate.ps1 | WindowsVMcreate.ps1 | # Login to the Azure subscription
Login-AzureRmAccount
Get-AzureRmSubscription
# Create the Resourcegroup
$rgname = ag532
New-AzureRmResourceGroup -Name $rgname -Location "West US"
# Create the Subnet and Vnet
$subnetconfig = New-AzureRmVirtualNetworkSubnetConfig -Name subnet1 -AddressPrefix 10.0.1.0/24
... |
PowerShellCorpus/Github/arnabganguly_Azure-Powershell/Networksecuritygroup.ps1 | Networksecuritygroup.ps1 | Login-AzureRmAccount
$rule1 = New-AzureRmNetworkSecurityRuleConfig -Name rdprule1 -Description "Allow RDP" -Access Allow -Protocol Tcp -Direction Inbound -Priority 100 -SourceAddressPrefix Internet -SourcePortRange * -DestinationAddressPrefix * -DestinationPortRange 3389
$rule2 = New-AzureRmNetworkSecurityRuleConfig ... |
PowerShellCorpus/Github/arnabganguly_Azure-Powershell/DSC_Config.ps1 | DSC_Config.ps1 | configuration TestConfig
{
Node WebServer
{
WindowsFeature IIS
{
Ensure = 'Present'
Name = 'Web-Server'
IncludeAllSubFeature = $true
}
}
Node NotWebServer
{
WindowsFeature IIS
... |
PowerShellCorpus/Github/kimizhu_testtips.ar-eg/.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/rgoodwin16_BugTracker_V3/BugTracker_V3/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/rgoodwin16_BugTracker_V3/BugTracker_V3/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/rgoodwin16_BugTracker_V3/BugTracker_V3/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/rgoodwin16_BugTracker_V3/BugTracker_V3/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/rgoodwin16_BugTracker_V3/BugTracker_V3/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/rgoodwin16_BugTracker_V3/BugTracker_V3/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/rgoodwin16_BugTracker_V3/BugTracker_V3/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/rgoodwin16_BugTracker_V3/BugTracker_V3/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/rgoodwin16_BugTracker_V3/BugTracker_V3/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/drm7369_PowerShell/Get-ChangedFiles.ps1 | Get-ChangedFiles.ps1 |
# current directory, looks at any file and only for ones that are 1 days old.
Get-ChildItem -Path . -Recurse| ? {$_.LastWriteTime -gt (Get-Date).AddDays(-1)}
|
PowerShellCorpus/Github/drm7369_PowerShell/Get-Updates.ps1 | Get-Updates.ps1 | # Get-Updates
Function Get-MSHotfix
{
$outputs = Invoke-Expression "wmic qfe list"
$outputs = $outputs[1..($outputs.length)]
foreach ($output in $Outputs) {
if ($output) {
$output = $output -replace 'y U','y-U'
$output = $output -replace 'NT A','NT-A'
... |
PowerShellCorpus/Github/drm7369_PowerShell/Get-SystemInfo.ps1 | Get-SystemInfo.ps1 | <#
.SYNOPSIS
Quesries critical computer information from a single machine.
.Description
Queries OS and hardware information from a single computer. This utilizes WMI, so the appropriate WMI ports must be open and you must be admin on the remote machine
.PARAMETER ComputerName
The name or IP address of the com... |
PowerShellCorpus/Github/drm7369_PowerShell/Tools.ps1 | Tools.ps1 | function Get-SystemInfo {
<#
.SYNOPSIS
Quesries critical computer information from a single machine.
.Description
Queries OS and hardware information from a single computer. This utilizes WMI, so the appropriate WMI ports must be open and you must be admin on the remote machine
.PARAMETER ... |
PowerShellCorpus/Github/drm7369_PowerShell/Get-Netstat.ps1 | Get-Netstat.ps1 | <# function Get-NetStat1
{
<#
.SYNOPSIS
This function will get the output of netstat -n and parse the output
.DESCRIPTION
This function will get the output of netstat -n and parse the output
#>
PROCESS
{
# Get the output of netstat
$data = netstat -n
# Keep only the line with the ... |
PowerShellCorpus/Github/drm7369_PowerShell/Get-Startup-Programs.ps1 | Get-Startup-Programs.ps1 |
#CMD or Powershell
# Using WMI (Windows Management Instrumentation)
# List of all the applications along with their paths that run at Windows startup.
wmic startup get caption,command
# Export the list out as a text file
wmic startup get caption,command > c:\StartupApps.txt
# Getting the same inf... |
PowerShellCorpus/Github/drm7369_PowerShell/Get-Services.ps1 | Get-Services.ps1 |
# Displays all services - Sort services first by Status, and then by DisplayName
Get-Service | Sort-Object status,displayname
# Display all STOPED services - Sort services by DisplayName
Get-Service | Where-Object {$_.status -eq "stopped"} | Sort-Object displayname
# Display all RUNNING services - Sort ... |
PowerShellCorpus/Github/drm7369_PowerShell/ScopeTest.ps1 | ScopeTest.ps1 |
Write-Host "Begining script execution"
write-host "x contains $x"
Write-Host "Now setting $x"
$x = 5
function Scope {
write-host "x contains $x"
$x = 10
write-host "x contains $x"
Write-Host "Finished function scope"
}
write-host "Execution Scope Funtion"
Scope
Write-Host "Finished s... |
PowerShellCorpus/Github/drm7369_PowerShell/ping.ps1 | ping.ps1 | # ββββββββββββββββββββββββββ
# Script: PoshPortScanner.ps1
# Author: ed wilson, msft
# Date: 02/19/2014 15:17:33
# Keywords: Security, Networking, Tcp/IP, Monitoring
# comments: This script scans a range of IP addresses for web servers listening
# to port 80. It is a useful audit tool, because there a... |
PowerShellCorpus/Github/drm7369_PowerShell/ScopeTest2.ps1 | ScopeTest2.ps1 | #Global Scope New-Alias -Name d -Value Get-ChildItem
d
#Child Scope
#New-Alias -Name d -Value Get-Process -Force
#d
# Not defined in child scope - defined in Global Scope
e |
PowerShellCorpus/Github/drm7369_PowerShell/Get-EventLogs.ps1 | Get-EventLogs.ps1 | #Get Event logs
#List all Event log names
Get-EventLog -list
#Displays System Event log
Get-EventLog System
#Display Powershell Event Log
Get-EventLog 'Windows PowerShell'
#Display Applicaiton Event Logs
Get-EventLog Application
# Displays the five most recent entries from the Application event l... |
PowerShellCorpus/Github/drm7369_PowerShell/Get-Powershell_Version.ps1 | Get-Powershell_Version.ps1 |
Write-Host ""
Write-Host "Powershell Version"
$PSVersionTable.PSVersion
Write-Host ""
Write-Host "Powershell PSVersion Table Information"
$PSVersionTable
|
PowerShellCorpus/Github/drm7369_PowerShell/Get-FirewallRules.ps1 | Get-FirewallRules.ps1 | #Display ffirewall rules
#Shows all firewalls rules
Get-NetFirewallRule
#display inbound firewall rules
Show-NetFirewallRule | where {$_.enabled -eq βtrueβ -AND $_.direction -eq βinboundβ}| select displayname
#display outbound firewall rules
Show-NetFirewallRule | where {$_.enabled -eq βtrueβ -AND $_.direct... |
PowerShellCorpus/Github/drm7369_PowerShell/Get-ScheduledTasks.ps1 | Get-ScheduledTasks.ps1 |
# The purpose of this script is to find scheduled tasks on a windows machine
Get-ScheduledTask
Get-ScheduledTask -TaskName "SystemScan"
Get-ScheduledTask | Where-Object { $_.State -ne "Disabled" }
Get-ScheduledTask | Where-Object { $_.State -ne "Enabled" }
Get-ScheduledTask | Where-Object { $_.State -eq ... |
PowerShellCorpus/Github/zhenjiao-ms_testdocset0711.de-de/.openpublishing.build.ps1 | .openpublishing.build.ps1 | param(
[string]$buildCorePowershellUrl = "https://opbuildstorageinternal.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 ur... |
PowerShellCorpus/Github/blooodorange_AD-FS/CheckADFS.ps1 | CheckADFS.ps1 | # CheckADFS.ps1
# Created by Martin Walder
# Version 1.0
# Input
$FQDN = "sts.contoso.com"
$ThresholdCertWarning = 30 # days
$SMTPServer = "smtp.domain.com"
$Sender = "noreply@domain.com"
$Recipient = "email@domain.com"
# Check FederationMetadata.xml
Try{
$Request = Invoke-WebRequest -Uri "https:... |
PowerShellCorpus/Github/OpenRA_Chocolatey/openra-playtest/tools/uninstall.ps1 | uninstall.ps1 | <#
.SYNOPSIS
Get the uninstaller location for most Windows software.
.DESCRIPTION
This function finds the correct uninstaller given just an application name.
Find the name from the Programs and Features Control Panel window.
.PARAMETER Name
The name of the application, as found in the Pro... |
PowerShellCorpus/Github/OpenRA_Chocolatey/openra-playtest/tools/chocolateyInstall.ps1 | chocolateyInstall.ps1 | $id = "openra-playtest"
$url = "https://github.com/OpenRA/OpenRA/releases/download/playtest-20150118/OpenRA-playtest-20150118.exe"
$kind = "EXE"
$silent = "/S"
Install-ChocolateyPackage -PackageName $id -FileType $kind -SilentArgs $silent -Url $url
|
PowerShellCorpus/Github/OpenRA_Chocolatey/openra-playtest/tools/chocolateyUninstall.ps1 | chocolateyUninstall.ps1 | $id = "openra-playtest"
$name = "OpenRA"
$kind = "EXE"
$silent = "/S"
$tools = Split-Path $MyInvocation.MyCommand.Definition
. $tools\uninstall.ps1
$uninstaller = Get-Uninstaller -Name $name
Uninstall-ChocolateyPackage -PackageName $id -FileType $kind -SilentArgs $silent -File $uninstaller
|
PowerShellCorpus/Github/OpenRA_Chocolatey/openra/tools/uninstall.ps1 | uninstall.ps1 | <#
.SYNOPSIS
Get the uninstaller location for most Windows software.
.DESCRIPTION
This function finds the correct uninstaller given just an application name.
Find the name from the Programs and Features Control Panel window.
.PARAMETER Name
The name of the application, as found in the Pro... |
PowerShellCorpus/Github/OpenRA_Chocolatey/openra/tools/chocolateyInstall.ps1 | chocolateyInstall.ps1 | $id = "openra"
$url = "https://github.com/OpenRA/OpenRA/releases/download/release-20141029/OpenRA-release-20141029.exe"
$kind = "EXE"
$silent = "/S"
Install-ChocolateyPackage -PackageName $id -FileType $kind -SilentArgs $silent -Url $url
|
PowerShellCorpus/Github/OpenRA_Chocolatey/openra/tools/chocolateyUninstall.ps1 | chocolateyUninstall.ps1 | $id = "openra"
$name = "OpenRA"
$kind = "EXE"
$silent = "/S"
$tools = Split-Path $MyInvocation.MyCommand.Definition
. $tools\uninstall.ps1
$uninstaller = Get-Uninstaller -Name $name
Uninstall-ChocolateyPackage -PackageName $id -FileType $kind -SilentArgs $silent -File $uninstaller
|
PowerShellCorpus/Github/randorfer_SCOrchDev-Networking/SCOrchDev-Networking.tests.ps1 | SCOrchDev-Networking.tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$manifestPath = "$here\SCOrchDev-Networking.psd1"
Import-Module $manifestPath -Force
Describe -Tags 'VersionChecks' 'SCOrchDev-Networking manifest' {
$script:manifest = $null
It 'has a valid manifest' {
{
$script:manifest = T... |
PowerShellCorpus/Github/cdjeffri_final_message_board_version/Message_Board/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/cdjeffri_final_message_board_version/Message_Board/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/cdjeffri_final_message_board_version/Message_Board/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/cdjeffri_final_message_board_version/Message_Board/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/cdjeffri_final_message_board_version/Message_Board/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/cdjeffri_final_message_board_version/Message_Board/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/cdjeffri_final_message_board_version/Message_Board/packages/EntityFramework.6.1.1/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/cdjeffri_final_message_board_version/Message_Board/packages/EntityFramework.6.1.1/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/cdjeffri_final_message_board_version/Message_Board/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/jkagnes_SpecialProjects/EcommerceWebsite/packages/jQuery.2.2.0/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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.