full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/Snaptags_powershell-config/folderdate.ps1 | folderdate.ps1 | #Source: http://www.dslreports.com/forum/r25067225-Solved-How-to-change-folder-date-to-most-recent-file-date
function Set-FolderDate {
$colFolder = Get-ChildItem -Recurse "." | Where-Object {$_.mode -match "d"} | Sort-Object Fullname -Descending
$VerbosePreference = "Continue"
Foreach ($strFolder In $c... |
PowerShellCorpus/Github/Snaptags_powershell-config/prompt.ps1 | prompt.ps1 | # fork of prompt.ps1 for powerline prompt: https://gist.github.com/kadet1090/86023bfad2bdd84d8b1a
$script:bg = [Console]::BackgroundColor;
$script:admin = $false;
$script:first = $true;
$script:last = 0;
$script:max_path_length = 40;
If (([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIden... |
PowerShellCorpus/Github/macko76_CARBON/O365_Users-Licensing.ps1 | O365_Users-Licensing.ps1 |
################################################################################################################################################################
# Script accepts 4 optional parameters from the command line
#
# Arguments
# Realm - Optional - If needed this is used to target only recipients par... |
PowerShellCorpus/Github/macko76_CARBON/O365_Get-DistributionGroupsMembership.ps1 | O365_Get-DistributionGroupsMembership.ps1 | ################################################################################################################################################################
# Script accepts 4 optional parameters from the command line
#
# Arguments
# Realm - Optional - If needed this is used to target only recipients part ... |
PowerShellCorpus/Github/macko76_CARBON/O365_Update-PrimarySMTP.ps1 | O365_Update-PrimarySMTP.ps1 | ################################################################################################################################################################
# Script accepts 4 optional parameters from the command line
#
# Arguments
# SourcePrimaryDomain - Optional - The original domain name targeted for ch... |
PowerShellCorpus/Github/macko76_CARBON/O365_Mailboxes-Security.ps1 | O365_Mailboxes-Security.ps1 | <#==================================================================================================================================================
Program : Retrieve Mailbox Delegation Permission
version : 0.1
Function : Retrieve and export to CSV delegate permission for a mailbox
made by aleresche
==========... |
PowerShellCorpus/Github/macko76_CARBON/O365_Mailbox-Statistics.ps1 | O365_Mailbox-Statistics.ps1 | # Connection to SommetEducation
Get-Credential $ga | Export-Clixml D:\PS-Scripts\sommetEducation_g-admin_Credential.xml
# Set this variable to the location of the file where credentials are cached
$credentialsCache = "D:\PS-Scripts\sommetEducation_g-admin_Credential.xml"
$o365Credentials = Import-Clixml $creden... |
PowerShellCorpus/Github/macko76_CARBON/O365_Get-DistributionGroups_Details.ps1 | O365_Get-DistributionGroups_Details.ps1 | ################################################################################################################################################################
# Arguments
# Realm - Optional - If needed this is used to target only recipients part of the designated domain
# Username - Mandatory - G-Administrato... |
PowerShellCorpus/Github/macko76_CARBON/O365_ResourceMailboxes.ps1 | O365_ResourceMailboxes.ps1 | ################################################################################################################################################################
# Script accepts 4 optional parameters from the command line
#
# Arguments
# DomainFilter - Optional - If needed this is used to target only recipient... |
PowerShellCorpus/Github/macko76_CARBON/O365_Manage-Users.ps1 | O365_Manage-Users.ps1 | ################################################################################################################################################################
# Script accepts 4 optional parameters from the command line
#
# Arguments
# InputFile - Optional - If needed this is used to target only recipients p... |
PowerShellCorpus/Github/kchirayath_FitnessFrogApp/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/kchirayath_FitnessFrogApp/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/kchirayath_FitnessFrogApp/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/kchirayath_FitnessFrogApp/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/kchirayath_FitnessFrogApp/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/kchirayath_FitnessFrogApp/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/kchirayath_FitnessFrogApp/src/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/kchirayath_FitnessFrogApp/src/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/GoateePFE_GPOMigration/Call-GPOExport.ps1 | Call-GPOExport.ps1 | <##############################################################################
Ashley McGlone
Microsoft Premier Field Engineer
April 2014
http://aka.ms/GoateePFE
Module for Group Policy migration.
Requirements / Setup
-Windows 7/2008 R2 (or above) RSAT with AD PowerShell cmdlets installed.
-GPMC with Group... |
PowerShellCorpus/Github/GoateePFE_GPOMigration/Call-GPOImport.ps1 | Call-GPOImport.ps1 | <##############################################################################
Ashley McGlone
Microsoft Premier Field Engineer
April 2014
http://aka.ms/GoateePFE
Module for Group Policy migration.
Requirements / Setup
-Windows 7/2008 R2 (or above) RSAT with AD PowerShell cmdlets installed.
-GPMC with Group... |
PowerShellCorpus/Github/ykrysko_scripts/Nessus_Windows.ps1 | Nessus_Windows.ps1 | ##Windows7/2008R2 Nessus prep script
#Assign values to some variables below
$username = "xadministrator" #The user account with administrative privileges to be used for scanning
$password = "QAZwsx!@#456QAZwsx" #Password for the above user account
#Let's go
$fwsrv = Get-Service -Name "MpsSvc" | Where-Objec... |
PowerShellCorpus/Github/StefanScherer_choco-kitematic/test.ps1 | test.ps1 | "Running tests"
$ErrorActionPreference = "Stop"
$version = $env:APPVEYOR_BUILD_VERSION -replace('\.[^.\\/]+$')
"TEST: Version $version in kitematic.nuspec file should match"
[xml]$spec = Get-Content kitematic.nuspec
if ($spec.package.metadata.version.CompareTo($version)) {
Write-Error "FAIL: rong version in n... |
PowerShellCorpus/Github/StefanScherer_choco-kitematic/tools/chocolateyInstall.ps1 | chocolateyInstall.ps1 | $packageName = 'kitematic'
$url = 'https://github.com/docker/kitematic/releases/download/v0.10.0/Kitematic-0.10.0-Windows.zip'
$url64 = $url
$checksum = '94c217476756269339c610f60926dcf5'
$checksum64 = $checksum
$checksumType = 'md5'
$checksumType64 = $checksumType
$installDir = "$(Split-Path -parent $MyInvoca... |
PowerShellCorpus/Github/StefanScherer_choco-kitematic/tools/chocolateyUninstall.ps1 | chocolateyUninstall.ps1 | $programs = [environment]::GetFolderPath([environment+specialfolder]::Programs)
$shortcutPath = Join-Path "$programs" "Kitematic"
$shortcutFilePath = Join-Path $shortcutPath "Kitematic.lnk"
if ((Test-Path $shortcutFilePath)) {
del $shortcutFilePath
}
if ((Get-ChildItem $shortcutPath -force | Select-Object -... |
PowerShellCorpus/Github/praneetmsft_tmp/ServicePrincipalPS/CreateServicePrincipal.ps1 | CreateServicePrincipal.ps1 | #Login-AzureRmAccount
#Get-AzureRmSubscription
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True, Position=1)]
[string]$AdminPassword,
[Parameter(Mandatory=$True, Position=2)]
[string]$authToken,
[Parameter(Mandatory=$True, Position=3)]
[string]$userId
)
Add-AzureRmAccount -Acce... |
PowerShellCorpus/Github/praneetmsft_tmp/PackageInstaller/CreateServicePrincipal.ps1 | CreateServicePrincipal.ps1 | Login-AzureRmAccount
Get-AzureRmSubscription
$subscriptionName = Read-Host 'Enter the Subscription Name?'
$certName ="retailopt"+[guid]::NewGuid().toString().subString(0,8)
$certPassword = Read-Host -Prompt 'Please enter a new Password here, which will be used as the password for the certificate to be created?'... |
PowerShellCorpus/Github/forgottentq_powershell/vcenter-sessions.ps1 | vcenter-sessions.ps1 |
function vcenter-sessions {
try {
connect-viserver 52tdkp-vm-010vvvv -ErrorAction Stop
} catch {
Write-host "Unable to connect to specified vCenter - Not continuing."
Break
}
$Now = Get-Date
$Report = @()
$svcRef = new-object VMware.Vim.ManagedObjectReference
$svcRef.Type = "ServiceInstance... |
PowerShellCorpus/Github/forgottentq_powershell/get-vmwareevent.ps1 | get-vmwareevent.ps1 |
function getvmware-event {
Add-PSSnapin Vmware.VIMAutomation.Core | Out-Null
set-PowerCLIConfiguration -invalidCertificateAction "ignore" -confirm:$false
connect-viserver $(read-host "Enter VIServer Name.")
$vm = $(read-host "Enter Virtual Machine Name")
$vmObj = Get-VM -Name $vm
$daysbackinput = $(read-h... |
PowerShellCorpus/Github/forgottentq_powershell/Share_Source_Collection.ps1 | Share_Source_Collection.ps1 | $menu =@"
1 - CIFS Source Collection.
2 - Split a Master CSV into Multiple CSVs.
Q - Quit.
"@
Write-Host "Select an option below:" -ForegroundColor Cyan
$r = Read-Host $menu
Switch ($r) {
"1" {
#
# Source Collection Script.
#
# Interactive mode:
$sources = $null
$date = (Get-Date).tostring("yyyyMMdd")
$s... |
PowerShellCorpus/Github/forgottentq_powershell/vmware-overprovisioning-report.ps1 | vmware-overprovisioning-report.ps1 |
function vmware-provisioning {
$viservers = "vcenter1", "vcenter2", "vcenter3", "vcenter4"
$ss = "\\share\e$\Storage_Reports\"
$report = "C:\Vmware_Provisioning.csv"
$date = (Get-Date).tostring("yyyyMMdd")
Add-PSSnapin Vmware.VIMAutomation.Core | Out-Null
set-PowerCLIConfiguration -invalidCertificateActio... |
PowerShellCorpus/Github/forgottentq_powershell/thin-netapp-storage.ps1 | thin-netapp-storage.ps1 | function getthin-storage {
$controllers = "controller1", "controller2", "controller3", "controller4"
$nacred = Import-clixml C:\users\forgotten\Documents\NACred.xml
foreach ($controller in $controllers){
connect-nacontroller -name $controller -credential $nacred | out-null
$vols = get-navol
$luns = get... |
PowerShellCorpus/Github/forgottentq_powershell/emcopy_share_migration.ps1 | emcopy_share_migration.ps1 | #
# Share Migration Script.
#
# This script requires you have "emcopy64.exe" in your C:\windows\system32\ folder.
#
#
#
try {
# DEFINE ME for CSVs location !!!
$csvlocation = "C:\Output\"
# DEFINE ME for CSVs location !!!
} catch {
write-host "Unable to locate CSV, check source path. Exiting"
Return
}
... |
PowerShellCorpus/Github/forgottentq_powershell/vmware-netapp-HP-environment-monitoring.ps1 | vmware-netapp-HP-environment-monitoring.ps1 | function check-env {
[System.Reflection.Assembly]::LoadWithPartialName("System.Diagnostics")
$sw = new-object system.diagnostics.stopwatch
$sw.Start()
############################################################
#### Set all static variables.
$oas = "oa1", "oa2", "oa3", "oa4"
$controllers = "filer1", "filer2", ... |
PowerShellCorpus/Github/vc3_ChocolateyNodeJS.extension/psake-config.ps1 | psake-config.ps1 | # Load modules from the 'Modules' folder
$config.modules=(".\Modules\*\*.psm1", ".\Build\Modules\*\*.psm1")
|
PowerShellCorpus/Github/vc3_ChocolateyNodeJS.extension/default.ps1 | default.ps1 | $root = Split-Path $MyInvocation.MyCommand.Path -Parent
Write-Verbose "Loading 'default.ps1'..."
Write-Verbose "root=$root"
include '.\Modules\Psake-Utils\psake-tasks.ps1'
properties {
Write-Verbose "Applying properties from 'default.ps1'..."
$projectName = 'ChocolateyNodeJS.extension'
}
if ... |
PowerShellCorpus/Github/vc3_ChocolateyNodeJS.extension/Source/Install-ChocolateyNodeWebsite.ps1 | Install-ChocolateyNodeWebsite.ps1 | <#
.SYNOPSIS
Installs a node website found in the 'content' folder of a Chocolatey package and hosts in IIS via iisnode.
.DESCRIPTION
* Stops the existing website (if `-StopSite` is specified).
* Calls `Install-ChocolateyNodeApplication` to copy the relevant application files.
* Creates a default 'iisnode.y... |
PowerShellCorpus/Github/vc3_ChocolateyNodeJS.extension/Source/Install-ChocolateyNodeApplication.ps1 | Install-ChocolateyNodeApplication.ps1 | <#
.SYNOPSIS
Installs a node application found in the 'content' folder of a Chocolatey package.
.DESCRIPTION
* Copies files from the package's "**content**" folder.
- Files are copied to the install `Path`.
- Optional exclusion based on `ExcludedDirectories` and `ExcludedFiles`.
- **Preserve** or **Purg... |
PowerShellCorpus/Github/vc3_ChocolateyNodeJS.extension/Source/Uninstall-ChocolateyNodeApplication.ps1 | Uninstall-ChocolateyNodeApplication.ps1 | <#
.SYNOPSIS
Uninstalls a node application found in the 'content' folder of a Chocolatey package.
.DESCRIPTION
* Removes files that were copied from the package's "**content**" folder.
- Files are removed from the install `Path`.
These parameters have default values, so they are optional.
* `Path`: C:... |
PowerShellCorpus/Github/vc3_ChocolateyNodeJS.extension/Source/Uninstall-ChocolateyNodeWebsite.ps1 | Uninstall-ChocolateyNodeWebsite.ps1 | <#
.SYNOPSIS
Uninstalls a node website found in the 'content' folder of a Chocolatey package.
.DESCRIPTION
* Stops and removes the existing site and app pool.
* Calls `Uninstall-ChocolateyNodeApplication` to remove the website files.
These parameters have default values, so they are optional.
* `Path`:... |
PowerShellCorpus/Github/vc3_ChocolateyNodeJS.extension/Build/psake-tasks.ps1 | psake-tasks.ps1 | Write-Verbose "Loading 'Build\psake-tasks.ps1'..."
properties {
Write-Verbose "Applying properties from 'Build\psake-tasks.ps1'..."
$chocoOutDir = $outDir
$chocoPkgsDir = "$root\Output"
}
include '.\Build\Modules\Psake-Choco\psake-tasks.ps1'
task EnsureApiKey {
if (-not $chocoApiKey) {
t... |
PowerShellCorpus/Github/vc3_ChocolateyNodeJS.extension/Build/Modules/Psake-Choco/psake-tasks.ps1 | psake-tasks.ps1 | Write-Verbose "Loading 'Psake-Choco\psake-tasks.ps1'..."
$psakeChocoRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
$chocoNupkgFileExpr = "^((?:.+(?:[^\d]|(?<=[^\d\.])\d)(?=\.))+)\.((\d+(?=\.)(?:\.\d+)+)(\-[A-Za-z]+)?)\.nupkg$"
properties {
Write-Verbose "Applying properties from 'Psake-Choco\psake... |
PowerShellCorpus/Github/vc3_ChocolateyNodeJS.extension/Modules/Psake-Utils/psake-tasks.ps1 | psake-tasks.ps1 | Write-Verbose "Loading 'Psake-Utils\psake-tasks.ps1'..."
properties {
Write-Verbose "Applying properties from 'Psake-Utils\psake-tasks.ps1'..."
if (-not($projectName)) {
$projectName = Split-Path $root -Leaf
}
$outDir = Join-Path $env:LOCALAPPDATA $projectName
if (-not(Test-Path... |
PowerShellCorpus/Github/NucLabs_ExchangeLab/Deploy-FromLocal.ps1 | Deploy-FromLocal.ps1 | pushd C:\Users\GertJanKraaijeveld\Source\Repos\ExchangeLab
$ResourceGroupName = 'ExLab'
$TemplateFile = 'azuredeploy.json'
$TemplateParametersFile = 'azuredeploy.parameters.local.json'
if ((Get-AzureRmResourceGroup $ResourceGroupName -ErrorAction SilentlyContinue).Count -eq 0){
New-AzureRmResourceGroup -Name $Re... |
PowerShellCorpus/Github/NucLabs_ExchangeLab/DSC/CreateADPDC.ps1 | CreateADPDC.ps1 | configuration CreateADPDC
{
param
(
[Parameter(Mandatory)]
[String]$DomainName,
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$Admincreds,
[Int]$RetryCount=20,
[Int]$RetryIntervalSec=30
)
Import-DscResource -ModuleName xA... |
PowerShellCorpus/Github/JulianChow94_PsProfile/Microsoft.PowerShell_profile.ps1 | Microsoft.PowerShell_profile.ps1 | # Load posh-git module from current directory
Import-Module posh-git;
# Chocolatey profile
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}
$computerName = $env:COMPUTERNAME.Substring(0,1).ToUpper() +
... |
PowerShellCorpus/Github/JulianChow94_PsProfile/Modules/posh-git/0.7.0/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 F... |
PowerShellCorpus/Github/JulianChow94_PsProfile/Modules/posh-git/0.7.0/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 ([String](git --version 2> $n... |
PowerShellCorpus/Github/JulianChow94_PsProfile/Modules/posh-git/0.7.0/Utils.ps1 | Utils.ps1 | # Need this variable as long as we support PS v2
$ModuleBasePath = Split-Path $MyInvocation.MyCommand.Path -Parent
# Store error records generated by stderr output when invoking an executable
# This can be accessed from the user's session by executing:
# PS> $m = Get-Module posh-git
# PS> & $m Get-Variable invok... |
PowerShellCorpus/Github/JulianChow94_PsProfile/Modules/posh-git/0.7.0/GitPrompt.ps1 | GitPrompt.ps1 | # Inspired by Mark Embling
# http://www.markembling.info/view/my-ideal-powershell-prompt-with-git-integration
$global:GitPromptSettings = [pscustomobject]@{
DefaultForegroundColor = $Host.UI.RawUI.ForegroundColor
BeforeText = ' ['
BeforeForegrou... |
PowerShellCorpus/Github/JulianChow94_PsProfile/Modules/posh-git/0.7.0/GitUtils.ps1 | GitUtils.ps1 | # Inspired by Mark Embling
# http://www.markembling.info/view/my-ideal-powershell-prompt-with-git-integration
<#
.SYNOPSIS
Gets the path to the current repository's .git dir.
.DESCRIPTION
Gets the path to the current repository's .git dir. Or if the repository
is a bare repository, the root direct... |
PowerShellCorpus/Github/JulianChow94_PsProfile/Modules/posh-git/0.7.0/GitParamTabExpansion.ps1 | GitParamTabExpansion.ps1 | # Variable is used in GitTabExpansion.ps1
$shortGitParams = @{
add = 'n v f i p e u A N'
bisect = ''
blame = 'b L l t S p M C h c f n s e w'
branch = 'd D l f m M r a v vv q t u'
checkout = 'q f b B t l m p'
cherry = 'v'
'cherry-pick' = 'e x r m n s S X'
clean = 'd f i n q e x X... |
PowerShellCorpus/Github/JulianChow94_PsProfile/Modules/posh-git/0.7.0/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/ateam-etsu_graves/gravesSite/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/ateam-etsu_graves/gravesSite/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/ateam-etsu_graves/gravesSite/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/ateam-etsu_graves/gravesSite/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/ateam-etsu_graves/gravesSite/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/ateam-etsu_graves/gravesSite/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/ateam-etsu_graves/gravesSite/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/ateam-etsu_graves/gravesSite/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/ateam-etsu_graves/gravesSite/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/ateam-etsu_graves/gravesSite/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/ateam-etsu_graves/gravesSite/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/AlexGitHub19_MoviesRent/MoviesRent/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/AlexGitHub19_MoviesRent/MoviesRent/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/AlexGitHub19_MoviesRent/MoviesRent/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/AlexGitHub19_MoviesRent/MoviesRent/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/AlexGitHub19_MoviesRent/MoviesRent/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/AlexGitHub19_MoviesRent/MoviesRent/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/AlexGitHub19_MoviesRent/MoviesRent/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/AlexGitHub19_MoviesRent/MoviesRent/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/AlexGitHub19_MoviesRent/MoviesRent/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/AlexGitHub19_MoviesRent/MoviesRent/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/OmarMeriwani_Dot-Net-Fundamentals/MVC Fundamentals/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/OmarMeriwani_Dot-Net-Fundamentals/MVC Fundamentals/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/OmarMeriwani_Dot-Net-Fundamentals/MVC Fundamentals/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/OmarMeriwani_Dot-Net-Fundamentals/MVC Fundamentals/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/OmarMeriwani_Dot-Net-Fundamentals/MVC Fundamentals/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/OmarMeriwani_Dot-Net-Fundamentals/MVC Fundamentals/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/OmarMeriwani_Dot-Net-Fundamentals/MVC Fundamentals/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/OmarMeriwani_Dot-Net-Fundamentals/MVC Fundamentals/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/OmarMeriwani_Dot-Net-Fundamentals/MVC Fundamentals/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/OmarMeriwani_Dot-Net-Fundamentals/MVC Fundamentals/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/OmarMeriwani_Dot-Net-Fundamentals/MVC Fundamentals/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/castleproject_castle-youtrack-export/export.ps1 | export.ps1 | $baseUrl = "http://issues.castleproject.org/youtrack"
$userName = ""
$password = ""
# Login
$loginResponse = Invoke-RestMethod `
-SessionVariable webSession `
-Uri "$baseUrl/rest/user/login" `
-Method Post `
-Body @{
login = $userName
password = $password
}
if ($loginResponse.login -ne "ok") {
... |
PowerShellCorpus/Github/gauravtiwari-home24_gittutorial/ConnectDatavirtuality.ps1 | ConnectDatavirtuality.ps1 | $logFile="C:\Users\gaurav.tiwari\Desktop\Github\gittutorial\exportschema.log"
function Log
{
param($message)
$message=$message -replace "`n"," " -replace "`r"," "
(Get-Date -Format "yyyyMMdd_HHmmss")+";"+$message | Add-Content $logFile
}
$rootfolder='C:\Users\gaurav.tiwari\Desktop\Github\gittutorial\git'
#DSN... |
PowerShellCorpus/Github/anass-b_MyDeps/MyDeps-Zombies.ps1 | MyDeps-Zombies.ps1 | # This script shows deps that are not mentioned in Deps.txt but are present in vendor folder
# The primary purpose of this script is to help keep the vendor folder clean and save disk space
. "Functions.ps1"
$zombies = GetZombies
if ($zombies.Count -gt 0) {
PrintArrayWithNewLines $zombies
} |
PowerShellCorpus/Github/anass-b_MyDeps/MyDeps-DeleteZombies.ps1 | MyDeps-DeleteZombies.ps1 | . "Functions.ps1"
$zombies = GetZombies
$vendorDirPath = GetVendorDirFullPath
foreach ($zombie in $zombies) {
$zombiePath = $vendorDirPath + [System.IO.Path]::DirectorySeparatorChar + $zombie
try {
[System.IO.Directory]::Delete($zombiePath, 1)
Write-Host "Deleted: " $zombiePath -Foregro... |
PowerShellCorpus/Github/anass-b_MyDeps/MyDeps-Install.ps1 | MyDeps-Install.ps1 | . "Functions.ps1"
$deps = ReadDepsOrExit
$dotMyDepsDir = MyDepsDirFullPath
CreateDirIfNotExist $dotMyDepsDir
$vendorDir = GetVendorDirFullPath
CreateDirIfNotExist $vendorDir
# Install dependencies
foreach ($row in $deps) {
$repoUrl = $row[0]
$name = $row[1]
$myDepsDestination = $dotMyDepsD... |
PowerShellCorpus/Github/anass-b_MyDeps/Functions.ps1 | Functions.ps1 | function GetVendorDirFullPath() {
$path = (Get-Item -Path ".\" -Verbose).FullName + [System.IO.Path]::DirectorySeparatorChar + "vendor"
return $path
}
function MyDepsDirFullPath() {
$path = $env:USERPROFILE + [System.IO.Path]::DirectorySeparatorChar + ".mydeps"
return $path
}
function GetDep... |
PowerShellCorpus/Github/langus0_XnivelMattReduce/worker/Worker/packages/EntityFramework.6.0.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
# MIIarwYJKoZIhvcNAQcCoIIaoDCCGpwCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/langus0_XnivelMattReduce/worker/Worker/packages/EntityFramework.6.0.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/edgdelgado_zabbix/vmware/snapshot/snapshots.ps1 | snapshots.ps1 | #Adicionar Snapin do Powercli da VMware
Add-PSSnapin VMware.VimAutomation.Core
#Parâmetros de conexão com o vcenter [FIXO]
$vmwserver = *"
$vmwlogin = "*"
$vmwpwd = "*"
$vmwdc = "*"
#Parâmetros de conexão com o vcenter [Argumentos externos]
#$vmwserver = $args[0]
#$vmwlogin = $args[1]
#$vm... |
PowerShellCorpus/Github/Nimaazizi86_AngularFinalAssignment/AngularAssignment/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/Nimaazizi86_AngularFinalAssignment/AngularAssignment/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/Nimaazizi86_AngularFinalAssignment/AngularAssignment/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/Nimaazizi86_AngularFinalAssignment/AngularAssignment/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/Nimaazizi86_AngularFinalAssignment/AngularAssignment/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/Nimaazizi86_AngularFinalAssignment/AngularAssignment/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/Nimaazizi86_AngularFinalAssignment/AngularAssignment/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()
}... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.