full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Set-RegMultiString.ps1 | Set-RegMultiString.ps1 | function Set-RegMultiString
{
<#
.SYNOPSIS
Sets or creates an array of null-terminated strings (REG_MULTI_SZ) on local or remote computers.
.DESCRIPTION
Use Set-RegMultiString to set or create an array of null-terminated strings (REG_MULTI_SZ) on local or remote computers.
.PARA... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Set-RegString.ps1 | Set-RegString.ps1 | function Set-RegString
{
<#
.SYNOPSIS
Sets or creates a string (REG_SZ) registry value on local or remote computers.
.DESCRIPTION
Use Set-RegString to set or create registry string (REG_SZ) value on local or remote computers.
.PARAMETER ComputerName
An array of computer n... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Get-RegKey.ps1 | Get-RegKey.ps1 | function Get-RegKey
{
<#
.SYNOPSIS
Gets the registry keys on local or remote computers.
.DESCRIPTION
Use Get-RegKey to get registry keys on local or remote computers
.PARAMETER ComputerName
An array of computer names. The default is the local computer.
.PARAMETER Hive... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Set-RegBinary.ps1 | Set-RegBinary.ps1 | function Set-RegBinary
{
<#
.SYNOPSIS
Sets or creates a binary data registry value (REG_BINARY) from local or remote computers.
.DESCRIPTION
Use Set-RegBinary to set or create a binary data registry value (REG_BINARY) from local or remote computers.
.PARAMETER ComputerName
... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Get-RegExpandString.ps1 | Get-RegExpandString.ps1 | function Get-RegExpandString
{
<#
.SYNOPSIS
Retrieves a null-terminated string that contains unexpanded references to environment variables (REG_EXPAND_SZ) from local or remote computers.
.DESCRIPTION
Use Get-RegExpandString to retrieve a null-terminated string that contains unexpanded refe... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Test-RegKey.ps1 | Test-RegKey.ps1 | function Test-RegKey
{
<#
.SYNOPSIS
Determines if a registry key exists.
.DESCRIPTION
Use Test-RegKey to determine if a registry key exists.
.PARAMETER ComputerName
An array of computer names. The default is the local computer.
.PARAMETER Hive
The HKEY to open, ... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Get-RegString.ps1 | Get-RegString.ps1 | function Get-RegString
{
<#
.SYNOPSIS
Retrieves a registry string (REG_SZ) value from local or remote computers.
.DESCRIPTION
Use Get-RegString to retrieve a registry string (REG_SZ) value from local or remote computers.
.PARAMETER ComputerName
An array of computer names. The default... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Get-RegBinary.ps1 | Get-RegBinary.ps1 | function Get-RegBinary
{
<#
.SYNOPSIS
Retrieves a binary data registry value (REG_BINARY) from local or remote computers.
.DESCRIPTION
Use Get-RegBinary to retrieve a binary data registry value (REG_BINARY) from local or remote computers.
.PARAMETER ComputerName
An array of... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Set-RegExpandString.ps1 | Set-RegExpandString.ps1 | function Set-RegExpandString
{
<#
.SYNOPSIS
Sets or creates a string (REG_EXPAND_SZ) registry value on local or remote computers.
.DESCRIPTION
Use Set-RegExpandString to set or create registry string (REG_EXPAND_SZ) value on local or remote computers.
.PARAMETER ComputerName
An array of ... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Get-RegDefault.ps1 | Get-RegDefault.ps1 | function Get-RegDefault
{
<#
.SYNOPSIS
Retrieves registry default string (REG_SZ) value from local or remote computers.
.DESCRIPTION
Use Get-RegDefault to retrieve registry default string (REG_SZ) value from local or remote computers.
.PARAMETER ComputerName
An array of c... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Get-RegQWord.ps1 | Get-RegQWord.ps1 | function Get-RegQWord
{
<#
.SYNOPSIS
Retrieves a 64-bit binary number registry value (REG_QWORD) from local or remote computers.
.DESCRIPTION
Use Get-RegQWord to retrieve a 64-bit binary number registry value (REG_QWORD) from local or remote computers.
.PARAMETER ComputerName
... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Get-RegValue.ps1 | Get-RegValue.ps1 | function Get-RegValue
{
<#
.SYNOPSIS
Sets the default value (REG_SZ) of the registry key on local or remote computers.
.DESCRIPTION
Use Get-RegValue to set the default value (REG_SZ) of the registry key on local or remote computers.
.PARAMETER ComputerName
An array of com... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Test-RegValue.ps1 | Test-RegValue.ps1 | function Test-RegValue
{
<#
.SYNOPSIS
Determines if a registry value exists.
.DESCRIPTION
Use Test-RegValue to determine if the registry value exists.
.PARAMETER ComputerName
An array of computer names. The default is the local computer.
.PARAMETER Hive
The HKEY... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Get-RegDWord.ps1 | Get-RegDWord.ps1 | function Get-RegDWord
{
<#
.SYNOPSIS
Retrieves a 32-bit binary number (REG_DWORD) registry value from local or remote computers.
.DESCRIPTION
Use Get-RegDWord to retrieve a 32-bit binary number (REG_DWORD) registry value from local or remote computers.
.PARAMETER ComputerName
... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Set-RegDefault.ps1 | Set-RegDefault.ps1 | function Set-RegDefault
{
<#
.SYNOPSIS
Sets the default value (REG_SZ) of the registry key on local or remote computers.
.DESCRIPTION
Use Set-RegDefault to set the default value (REG_SZ) of the registry key on local or remote computers.
.PARAMETER ComputerName
An array of... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Remove-RegKey.ps1 | Remove-RegKey.ps1 | function Remove-RegKey
{
<#
.SYNOPSIS
Deletes the specified registry key from local or remote computers.
.DESCRIPTION
Use Remove-RegKey to delete the specified registry key from local or remote computers.
.PARAMETER ComputerName
An array of computer names. The default is ... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Set-RegQWord.ps1 | Set-RegQWord.ps1 | function Set-RegQWord
{
<#
.SYNOPSIS
Sets or creates a 64-bit binary number (REG_QWORD) on local or remote computers.
.DESCRIPTION
Use Set-RegQWord to set or create a 64-bit binary number (REG_QWORD) on local or remote computers.
.PARAMETER ComputerName
An array of computer ... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Set-RegDWord.ps1 | Set-RegDWord.ps1 | function Set-RegDWord
{
<#
.SYNOPSIS
Sets or creates a 32-bit binary number (REG_DWORD) on local or remote computers.
.DESCRIPTION
Use Set-RegDWord to set or create a 32-bit binary number (REG_DWORD) on local or remote computers.
.PARAMETER ComputerName
An array of comput... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/New-RegKey.ps1 | New-RegKey.ps1 | function New-RegKey
{
<#
.SYNOPSIS
Creates a new registry key on local or remote machines.
.DESCRIPTION
Use New-RegKey to create a new registry key on local or remote machines.
.PARAMETER ComputerName
An array of computer names. The default is the local computer.
.PAR... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Get-RegMultiString.ps1 | Get-RegMultiString.ps1 | function Get-RegMultiString
{
<#
.SYNOPSIS
Retrieves an array of null-terminated strings (REG_MULTI_SZ) from local or remote computers.
.DESCRIPTION
Use Get-RegMultiString to retrieve an array of null-terminated strings (REG_MULTI_SZ) from local or remote computers.
.PARAMETER C... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSRemoteRegistry/Remove-RegValue.ps1 | Remove-RegValue.ps1 | function Remove-RegValue
{
<#
.SYNOPSIS
Deletes the specified registry value from local or remote computers.
.DESCRIPTION
Use Remove-RegValue to delete the specified registry value from local or remote computers.
.PARAMETER ComputerName
An array of computer names. The def... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/posh-git/TortoiseGit.ps1 | TortoiseGit.ps1 | # TortoiseGit
function private:Get-TortoiseGitPath {
if ((Test-Path "C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe") -eq $true) {
# TortoiseGit 1.8.0 renamed TortoiseProc to TortoiseGitProc.
return "C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe"
}
return "C:\Program Files\Tortoise... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/posh-git/CheckVersion.ps1 | CheckVersion.ps1 | $Global:GitMissing = $false
if (!(Get-Command git -TotalCount 1 -ErrorAction SilentlyContinue)) {
Write-Warning "git command could not be found. Please create an alias or add it to your PATH."
$Global:GitMissing = $true
return
}
$requiredVersion = [Version]'1.7.2'
if ((git --version 2> $null) -ma... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/posh-git/Utils.ps1 | Utils.ps1 | # General Utility Functions
function Invoke-NullCoalescing {
$result = $null
foreach($arg in $args) {
if ($arg -is [ScriptBlock]) {
$result = & $arg
} else {
$result = $arg
}
if ($result) { break }
}
$result
}
Set-Alias ?? Invoke-N... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/posh-git/GitPrompt.ps1 | GitPrompt.ps1 | # Inspired by Mark Embling
# http://www.markembling.info/view/my-ideal-powershell-prompt-with-git-integration
$global:GitPromptSettings = New-Object PSObject -Property @{
DefaultForegroundColor = $Host.UI.RawUI.ForegroundColor
BeforeText = ' ['
BeforeForegroundColor = [Console... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/posh-git/GitUtils.ps1 | GitUtils.ps1 | # Inspired by Mark Embling
# http://www.markembling.info/view/my-ideal-powershell-prompt-with-git-integration
function Get-GitDirectory {
if ($Env:GIT_DIR) {
$Env:GIT_DIR
} else {
Get-LocalOrParentPath .git
}
}
function Get-GitBranch($gitDir = $(Get-GitDirectory), [Diagnostics.S... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/posh-git/profile.example.ps1 | profile.example.ps1 | Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)
# Load posh-git module from current directory
Import-Module .\posh-git
# If module is installed in a default location ($env:PSModulePath),
# use this instead (see about_Modules for more information):
# Import-Module posh-git
# Set... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/posh-git/install.ps1 | install.ps1 | param([switch]$WhatIf = $false)
if($PSVersionTable.PSVersion.Major -lt 2) {
Write-Warning "posh-git requires PowerShell 2.0 or better; you have version $($Host.Version)."
return
}
if(!(Test-Path $PROFILE)) {
Write-Host "Creating PowerShell profile...`n$PROFILE"
New-Item $PROFILE -Force -Type ... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/posh-git/GitTabExpansion.ps1 | GitTabExpansion.ps1 | # Initial implementation by Jeremy Skinner
# http://www.jeremyskinner.co.uk/2010/03/07/using-git-with-windows-powershell/
$Global:GitTabSettings = New-Object PSObject -Property @{
AllCommands = $false
}
$subcommands = @{
bisect = 'start bad good skip reset visualize replay log run'
notes = 'edit ... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSFTP/New-FTPItem.ps1 | New-FTPItem.ps1 | Function New-FTPItem
{
<#
.SYNOPSIS
Creates a new folder on ftp.
.DESCRIPTION
The New-FTPItem cmdlet creates a new folder in specific path in current ftp session.
.PARAMETER Path
Specifies a path to ftp location or file.
.PARAMETER Name
Specifies a name of item.
.PAR... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSFTP/Rename-FTPItem.ps1 | Rename-FTPItem.ps1 | Function Rename-FTPItem
{
<#
.SYNOPSIS
Renames an item in ftp session. Additionally it can be used for move items between folders.
.DESCRIPTION
The Rename-FTPItem cmdlet changes the name of a specified item. This cmdlet does not affect the content of the item being renamed.
.PARAMETER Path... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSFTP/Get-FTPItem.ps1 | Get-FTPItem.ps1 | Function Get-FTPItem
{
<#
.SYNOPSIS
Send specific file from ftop server to location disk.
.DESCRIPTION
The Get-FTPItem cmdlet download file to specific location on local machine.
.PARAMETER Path
Specifies a path to ftp location.
.PARAMETER LocalPath
Specifies a local path.... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSFTP/Remove-FTPItem.ps1 | Remove-FTPItem.ps1 | Function Remove-FTPItem
{
<#
.SYNOPSIS
Remove specific item from ftp server.
.DESCRIPTION
The Remove-FTPItem cmdlet remove item from specific location on ftp server.
.PARAMETER Path
Specifies a path to ftp location.
.PARAMETER Recurse
Remove items recursively.
.PA... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSFTP/Add-FTPItem.ps1 | Add-FTPItem.ps1 | Function Add-FTPItem
{
<#
.SYNOPSIS
Send file to specific ftp location.
.DESCRIPTION
The Add-FTPItem cmdlet send file to specific location on ftp server.
.PARAMETER Path
Specifies a path to ftp location.
.PARAMETER LocalPath
Specifies a local path.
.PARAMETER BufferSi... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSFTP/Set-FTPConnection.ps1 | Set-FTPConnection.ps1 | Function Set-FTPConnection
{
<#
.SYNOPSIS
Set config to ftp Connection.
.DESCRIPTION
The Set-FTPConnection cmdlet creates a Windows PowerShell configuration to ftp server. When you create a ftp connection, you may run multiple commands that use this config.
.PARAMETER Credential
Spec... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSFTP/Get-FTPItemSize.ps1 | Get-FTPItemSize.ps1 | Function Get-FTPItemSize
{
<#
.SYNOPSIS
Gets the item size.
.DESCRIPTION
The Get-FTPItemSize cmdlet gets the specific item size.
.PARAMETER Path
Specifies a path to ftp location.
.PARAMETER Silent
Hide warnings.
.PARAMETER Session
Specifies a friendly name fo... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSFTP/Get-FTPChildItem.ps1 | Get-FTPChildItem.ps1 | Function Get-FTPChildItem
{
<#
.SYNOPSIS
Gets the item and child items from ftp location.
.DESCRIPTION
The Get-FTPChildItem cmdlet gets the items from ftp locations. If the item is a container, it gets the items inside the container, known as child items.
.PARAMETER Path
Specifies a path to ftp... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSFTP/Get-FTPConnection.ps1 | Get-FTPConnection.ps1 | Function Get-FTPConnection
{
<#
.SYNOPSIS
Get config to ftp Connection.
.DESCRIPTION
The Get-FTPConnection cmdlet create a list of registered PSFTP sessions.
.PARAMETER Session
Specifies a friendly name for the ftp session.
.EXAMPLE
Get-FTPConnection
.EXAMPLE
Get... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/NTFSSecurity/NTFSSecurity.Init.ps1 | NTFSSecurity.Init.ps1 | #region Internals
#region C# Code
$type_NTFS1 = @'
using System;
using System.IO;
using System.Collections;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
namespace NTFS
{
public class DriveInfoExt
{
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSe... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/Kerberos/Kerberos.Init.ps1 | Kerberos.Init.ps1 | if ([IntPtr]::Size -eq 8)
{
Add-Type -Path $PSScriptRoot\KerberosLibx64.dll
}
else
{
Add-Type -Path $PSScriptRoot\KerberosLibx86.dll
}
#using Update-FormatData and not FormatsToProcess in the PSD1 as FormatsToProcess does not offer
#putting format data in front of the default data. This is required to make... |
PowerShellCorpus/Github/naeemkhedarun_Console/Third Party/Modules/PSReadline/SamplePSReadlineProfile.ps1 | SamplePSReadlineProfile.ps1 |
# This is an example profile for PSReadline.
#
# This is roughly what I use so there is some emphasis on emacs bindings,
# but most of these bindings make sense in Windows mode as well.
Import-Module PSReadLine
Set-PSReadLineOption -EditMode Emacs
# Searching for commands with up/down arrow is really hand... |
PowerShellCorpus/Github/zjalexander_DscAzureDemo/New-DscMachine.ps1 | New-DscMachine.ps1 | #requires -modules AzureRM, MrAazure
##for reference: other SKUs that might be interesting
#Windows Server 2016 Datacenter
#Windows Server 2016 - Nano Server
$ErrorActionPreference = "Stop"
$resourceGroup = "dscVmDemo"
$location... |
PowerShellCorpus/Github/zjalexander_DscAzureDemo/iisInstall.ps1 | iisInstall.ps1 | configuration IISInstall
{
node "localhost"
{
WindowsFeature IIS
{
Ensure = "Present"
Name = "Web-Server"
}
}
} |
PowerShellCorpus/Github/veereshi_CMRRKAD/CMRRKADMediaServer/packages/AWSSDK.Core.3.1.3.8/tools/account-management.ps1 | account-management.ps1 |
function RegisterProfile()
{
$dllpath = "..\lib\net35\AWSSDK.Core.dll"
$sdkassembly = [System.Reflection.Assembly]::LoadFrom($dllpath)
$completed = $FALSE
do
{
Write-Host "1) Add/Update new profile credentials"
Write-Host "2) List registered profiles"
Write-Host "3) Remove profile credenti... |
PowerShellCorpus/Github/veereshi_CMRRKAD/CMRRKADMediaServer/packages/AWSSDK.S3.3.1.3.7/tools/net35/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# This install script is based on the Newtonsoft.Json NuGet install script and is licensed under the MIT License.
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documen... |
PowerShellCorpus/Github/veereshi_CMRRKAD/CMRRKADMediaServer/packages/AWSSDK.S3.3.1.3.7/tools/net45/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# This install script is based on the Newtonsoft.Json NuGet install script and is licensed under the MIT License.
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documen... |
PowerShellCorpus/Github/veereshi_CMRRKAD/CMRRKADMediaServer/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/veereshi_CMRRKAD/CMRRKADMediaServer/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/veereshi_CMRRKAD/CMRRKADMediaServer/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/veereshi_CMRRKAD/CMRRKADMediaServer/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/veereshi_CMRRKAD/CMRRKADMediaServer/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/veereshi_CMRRKAD/CMRRKADMediaServer/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/veereshi_CMRRKAD/CMRRKADMediaServer/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/veereshi_CMRRKAD/CMRRKADMediaServer/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/veereshi_CMRRKAD/CMRRKADMediaServer/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/Unifield_ufbk/backups.ps1 | backups.ps1 | # '===============================================================================
# ' *** MSF Script
# ' ***
# ' *** --------------------------------------------------------------------------
# ' *** Filename : backups.ps1
# ' *** -------------------------------------------------------------... |
PowerShellCorpus/Github/NickPonikiewski_Test/Budget2.0/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/NickPonikiewski_Test/Budget2.0/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/cliveg_WebApp-IoTWeather/WebApp-IoTWeather/WebApp-IoTWeather/Scripts/Deploy-AzureResourceGroup.ps1 | Deploy-AzureResourceGroup.ps1 | #Requires -Version 3.0
Param(
[string] [Parameter(Mandatory=$true)] $ResourceGroupLocation,
[string] $ResourceGroupName = 'WebApp-IoTWeather',
[switch] $UploadArtifacts,
[string] $StorageAccountName,
[string] $StorageAccountResourceGroupName,
[string] $StorageContainerName = $ResourceGroupName.T... |
PowerShellCorpus/Github/MShawnDillon_webdev-win/Get-Nvmw.ps1 | Get-Nvmw.ps1 | function Get-Nvmw
{
param (
[Parameter(Mandatory = $true)]
[String] $Url,
[Parameter(Mandatory = $false)]
[String] $NvmwInstallRoot = (Join-Path $env:APPDATA '.nvmw')
)
process
{
if (((Get-GitVersion) -eq $null) -or ((Get-GitVersion) -lt ([Version]'1.9... |
PowerShellCorpus/Github/MShawnDillon_webdev-win/Get-UserEnv.ps1 | Get-UserEnv.ps1 | <#
.SYNOPSIS
Gets a user environment variable value as it is currently stored in the
user's persistent profile.
.DESCRIPTION
The user's environment block is stored in the user's profile hive
(HKEY_CURRENT_USER, on disk at %USERPROFILE%\NTUSER.dat) in the Windows
registry (specifically, at HKE... |
PowerShellCorpus/Github/MShawnDillon_webdev-win/Get-NpmVersion.ps1 | Get-NpmVersion.ps1 | <#
.SYNOPSIS
Gets the Node Package Manager (NPM) version that is available in the
current environment.
.DESCRIPTION
This calls the npm --version command if the command is available and
returns a System.Version representing the currently available NPM version.
.EXAMPLE
Get-NpmVersion
.OUTPUT... |
PowerShellCorpus/Github/MShawnDillon_webdev-win/Get-PortableGit.ps1 | Get-PortableGit.ps1 | <#
.SYNOPSIS
Gets the portable version of msysgit (Git for Windows).
.DESCRIPTION
Downloads the portable version of msysgit and configures it for use in a
locked-down environment.
.EXAMPLE
Get-Git 'http://somedomain.com/url/to/portable/git.7z' 'C:\Users\Some User\AppData\Roaming\Git'
.PARAMETER ... |
PowerShellCorpus/Github/MShawnDillon_webdev-win/Get-UserInfo.ps1 | Get-UserInfo.ps1 | <#
.SYNOPSIS
Gets an object that contains basic information about the current user.
.DESCRIPTION
Much of this information is also available as environment variables and
set automatically by the system when you log in. However, there are a few
things that aren't that easy to get to, such as the use... |
PowerShellCorpus/Github/MShawnDillon_webdev-win/Download-Content.ps1 | Download-Content.ps1 | <#
.SYNOPSIS
Downloads text content and returns it as a string or as JSON (depending on
the "Content-Type" of the response).
.DESCRIPTION
This will retrieve web content while showing the progress of the
operation. If the "Content-Type" header of the response is
'application/json', the conten... |
PowerShellCorpus/Github/MShawnDillon_webdev-win/Get-GitProperty.ps1 | Get-GitProperty.ps1 | <#
.SYNOPSIS
Gets the value of a configuration setting from the user's global Git
configuration.
.DESCRIPTION
This basically calls git config --global --get-all with the specified
property name.
.EXAMPLE
Get-GitProperty 'user.name'
.PARAMETER Name
The name of the global Git configurati... |
PowerShellCorpus/Github/MShawnDillon_webdev-win/Test-Nvmw.ps1 | Test-Nvmw.ps1 | function Test-Nvmw
{
try
{
## Calling it without arguments produces help text.
$quickTest = nvmw.bat
return $true
}
catch [System.Management.Automation.CommandNotFoundException]
{
return $false
}
} |
PowerShellCorpus/Github/MShawnDillon_webdev-win/Set-PathInclude.ps1 | Set-PathInclude.ps1 | <#
.SYNOPSIS
Ensures that the user's PATH includes a specific value, adding it if
necessary to the existing list of paths.
.DESCRIPTION
This will determine whether the path already exists in the user's PATH
list, and if it doesn't, it will add it to the user's profile so that it
persists acro... |
PowerShellCorpus/Github/MShawnDillon_webdev-win/Set-NpmProperty.ps1 | Set-NpmProperty.ps1 | <#
.SYNOPSIS
Sets or adds a configuration value to the user's NPM configuration.
.DESCRIPTION
This basically calls 'npm config set' with the specified property name
and value (if the value is different than its current value).
.EXAMPLE
Set-NpmProperty 'strict-ssl' 'false' -Global -Force
.EXAMPLE... |
PowerShellCorpus/Github/MShawnDillon_webdev-win/Get-NodeVersion.ps1 | Get-NodeVersion.ps1 | <#
.SYNOPSIS
Gets the Node version that is available in the current environment.
.DESCRIPTION
This calls the node --version command if the command is available and
returns a System.Version representing the currently available Node
version.
.EXAMPLE
Get-NodeVersion
.OUTPUT
System.Nullab... |
PowerShellCorpus/Github/MShawnDillon_webdev-win/Set-UserEnv.ps1 | Set-UserEnv.ps1 | <#
.SYNOPSIS
Sets a user environment variable in the current environment and in the
registry so that it persists across restarts.
.DESCRIPTION
Most environment variable changes should be scoped to within the current
process, so that those changes only affect that process. This is how the
Env:... |
PowerShellCorpus/Github/MShawnDillon_webdev-win/Expand-Zip.ps1 | Expand-Zip.ps1 | <#
.SYNOPSIS
Expands a compressed archive (*.zip file) using the native facilities
shipped with Windows and available out of the box.
.DESCRIPTION
This will expand a compressed archive using the Windows shell, optionally
showing either PowerShell or Windows (native UI) progress.
.EXAMPLE
Exp... |
PowerShellCorpus/Github/MShawnDillon_webdev-win/Set-GitProperty.ps1 | Set-GitProperty.ps1 | <#
.SYNOPSIS
Sets or adds a configuration value to the user's global Git configuration.
.DESCRIPTION
This basically calls git config --global --replace-all with the specified
property name and value (if the value is different than its current
value).
.EXAMPLE
Set-GitProperty 'user.name' 'Ord... |
PowerShellCorpus/Github/MShawnDillon_webdev-win/get-to-work.ps1 | get-to-work.ps1 | param (
[Parameter(Mandatory = $false)]
[String] $DisplayName = [String]::Empty,
[Parameter(Mandatory = $false)]
[String] $EmailAddress = [String]::Empty
)
## Pull in the other functions we need.
.'.\Invoke-BatchFile.ps1'
.'.\Download-File.ps1'
.'.\Expand-Zip.ps1'
.'.\Get-UserInfo.ps1'
.'.\... |
PowerShellCorpus/Github/MShawnDillon_webdev-win/Get-GitVersion.ps1 | Get-GitVersion.ps1 | <#
.SYNOPSIS
Gets the Git version that is available in the current environment.
.DESCRIPTION
This calls the git --version command if the command is available and
returns a System.Version representing the currently available git version.
.EXAMPLE
Get-GitVersion
.OUTPUT
System.Nullable[System... |
PowerShellCorpus/Github/MShawnDillon_webdev-win/Download-File.ps1 | Download-File.ps1 | <#
.SYNOPSIS
Downloads a file (while showing the progress of the download).
.DESCRIPTION
This will download a file locally while showing the progress of the
download.
.EXAMPLE
Download-File 'http://someurl.com/somefile.zip'
.EXAMPLE
Download-File 'http://someurl.com/somefile.zip' 'C:\Temp\... |
PowerShellCorpus/Github/MShawnDillon_webdev-win/Invoke-BatchFile.ps1 | Invoke-BatchFile.ps1 | <#
.SYNOPSIS
Invokes the specified batch file (*.bat or *.cmd file) and retains any
environment variable changes it makes.
.DESCRIPTION
Invoke the specified batch file (with parameters), but also propagate any
environment variable changes back to the PowerShell environment that
called it.
.PARAME... |
PowerShellCorpus/Github/flcdrg_chocolatey-interfaceware/iguana.portable/tools/chocolateyinstall.ps1 | chocolateyinstall.ps1 | $ErrorActionPreference = 'Stop';
$packageName= 'iguana.portable'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url = 'http://dl.interfaceware.com/iguana/windows/snapshot/iguana_noinstaller_branch_5_6_windows_x86.zip'
$url64 = 'http://dl.interfaceware.com/iguana/windows/snap... |
PowerShellCorpus/Github/flcdrg_chocolatey-interfaceware/iguana.install/tools/chocolateyuninstall.ps1 | chocolateyuninstall.ps1 | $ErrorActionPreference = 'Stop'; # stop on all errors
# Remove firewall rule
Get-NetFirewallRule | Where { $_.DisplayName -eq "Iguana" } | Remove-NetFirewallRule
|
PowerShellCorpus/Github/flcdrg_chocolatey-interfaceware/iguana.install/tools/chocolateyinstall.ps1 | chocolateyinstall.ps1 | $ErrorActionPreference = 'Stop';
$packageName= 'iguana.install'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url = 'http://dl.interfaceware.com/iguana/windows/5_6/iguana_5_6_windows_x86.exe'
$url64 = 'http://dl.interfaceware.com/iguana/windows/5_6/iguana_5_6_windows_x64.ex... |
PowerShellCorpus/Github/openpublish_openpublishing-stress/AzureMigration.ps1 | AzureMigration.ps1 | param(
[string]$azureMigrationCorePowershellUrl = "https://opbuildstoragesandbox2.blob.core.windows.net/azure-migration/AzureMigrationCore.ps1",
[string]$parameters
)
# Main
$errorActionPreference = 'Stop'
# Step-1 Download buildcore script to local
echo "download azure migration core script to local w... |
PowerShellCorpus/Github/openpublish_openpublishing-stress/.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/Team-Delphinium-Belladonna_Project/Alexander/DatabaseProject/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/Team-Delphinium-Belladonna_Project/Alexander/DatabaseProject/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/Team-Delphinium-Belladonna_Project/Alexander/DatabaseProject/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/Team-Delphinium-Belladonna_Project/Alexander/DatabaseProject/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/Team-Delphinium-Belladonna_Project/IvanVanelov/ImportExportXML/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/Team-Delphinium-Belladonna_Project/IvanVanelov/ImportExportXML/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/Team-Delphinium-Belladonna_Project/CreateJSON/packages/Newtonsoft.Json.7.0.1/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://www.newtonsoft.com/json/install?version=" + $package.Version
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWindo... |
PowerShellCorpus/Github/Team-Delphinium-Belladonna_Project/CreateJSON/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/Team-Delphinium-Belladonna_Project/CreateJSON/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/Team-Delphinium-Belladonna_Project/LastVersionProject/Marek/DatabaseProject/SQLiteEntity/packages/System.Data.SQLite.EF6.1.0.97.0/tools/net45/install.ps1 | install.ps1 | ###############################################################################
#
# provider.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, ... |
PowerShellCorpus/Github/Team-Delphinium-Belladonna_Project/LastVersionProject/Marek/DatabaseProject/SQLiteEntity/packages/System.Data.SQLite.EF6.1.0.97.0/tools/net451/install.ps1 | install.ps1 | ###############################################################################
#
# provider.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, ... |
PowerShellCorpus/Github/Team-Delphinium-Belladonna_Project/LastVersionProject/Marek/DatabaseProject/SQLiteEntity/packages/System.Data.SQLite.EF6.1.0.97.0/tools/net40/install.ps1 | install.ps1 | ###############################################################################
#
# provider.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, ... |
PowerShellCorpus/Github/Team-Delphinium-Belladonna_Project/LastVersionProject/Marek/DatabaseProject/SQLiteEntity/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/Team-Delphinium-Belladonna_Project/LastVersionProject/Marek/DatabaseProject/SQLiteEntity/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/Team-Delphinium-Belladonna_Project/LastVersionProject/Marek/DatabaseProject/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/Team-Delphinium-Belladonna_Project/LastVersionProject/Marek/DatabaseProject/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/Team-Delphinium-Belladonna_Project/Marek/DatabaseProject/SQLiteEntity/packages/System.Data.SQLite.EF6.1.0.97.0/tools/net45/install.ps1 | install.ps1 | ###############################################################################
#
# provider.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, ... |
PowerShellCorpus/Github/Team-Delphinium-Belladonna_Project/Marek/DatabaseProject/SQLiteEntity/packages/System.Data.SQLite.EF6.1.0.97.0/tools/net451/install.ps1 | install.ps1 | ###############################################################################
#
# provider.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.