full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/albino8805_MyFirstRepository/WebApplication1/packages/jQuery.1.10.2/Tools/common.ps1 | common.ps1 | function Get-Checksum($file) {
$cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider"
$fileInfo = Get-Item $file
trap { ;
continue } $stream = $fileInfo.OpenRead()
if ($? -eq $false) {
# Couldn't open file for reading
return $null
}
$bytes = $... |
PowerShellCorpus/Github/albino8805_MyFirstRepository/WebApplication1/packages/Modernizr.2.6.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Update the _references.js file
Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx |
PowerShellCorpus/Github/albino8805_MyFirstRepository/WebApplication1/packages/Modernizr.2.6.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
if ($scriptsFolderProjectItem -eq $null) {
# No Scripts folder
Write-Host "No Scripts folder found"
exit
}
# Update the _references.js file
AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileName... |
PowerShellCorpus/Github/albino8805_MyFirstRepository/WebApplication1/packages/Modernizr.2.6.2/Tools/common.ps1 | common.ps1 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) {
try {
$referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js")
}
catch {
# _references.js file not found
return
}
if ($referencesFileProject... |
PowerShellCorpus/Github/albino8805_MyFirstRepository/WebApplication1/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/albino8805_MyFirstRepository/WebApplication1/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/albino8805_MyFirstRepository/WebApplication1/packages/Newtonsoft.Json.6.0.4/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# open json.net splash page on package install
# don't open if json.net is installed as a dependency
try
{
$url = "http://james.newtonking.com/json"
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWindow.Caption -eq "Package Manager Con... |
PowerShellCorpus/Github/IInspectable_IXOS-File-Name-Extensions/_scripts/Versioning.ps1 | Versioning.ps1 |
$targetFiles=
@("$PSScriptRoot'\..\IXOS File Name Extensions\Product.wxs")
function IncreaseMajor(){
[CmdletBinding()]
Param(
[Parameter(Position=0, Mandatory=$true)]
[string] $file
)
UpdateVersion $file { param($oldVersion) New-Object System.Version -ArgumentList (... |
PowerShellCorpus/Github/IInspectable_IXOS-File-Name-Extensions/_scripts/Increase-Build.ps1 | Increase-Build.ps1 |
$versioningScripts=Join-Path $PSScriptRoot Versioning.ps1
. $versioningScripts
$targetFiles | %{IncreaseBuild $_ -verbose} |
PowerShellCorpus/Github/IInspectable_IXOS-File-Name-Extensions/_scripts/Increase-Minor.ps1 | Increase-Minor.ps1 |
$versioningScripts=Join-Path $PSScriptRoot Versioning.ps1
. $versioningScripts
$targetFiles | %{IncreaseMinor $_ -verbose}
|
PowerShellCorpus/Github/IInspectable_IXOS-File-Name-Extensions/_scripts/Increase-Major.ps1 | Increase-Major.ps1 |
$versioningScripts=Join-Path $PSScriptRoot Versioning.ps1
. $versioningScripts
$targetFiles | %{IncreaseMajor $_ -verbose} |
PowerShellCorpus/Github/IInspectable_IXOS-File-Name-Extensions/IXOS File Name Extensions/CodeGen.ps1 | CodeGen.ps1 | #$extension = 'gd'
#$extensionName = 'Gd'
#$iconFile = 'GuiDefinition.ico'
#$description ='GUI Definition'
#$extension = 'pos'
#$extensionName = 'Pos'
#$iconFile = 'PosTemplate.ico'
#$description ='POS Template'
#$extension = 'dep'
#$extensionName = 'Dep'
#$iconFile = 'Depen... |
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_NewRepo_2017_4_6_14_8_30/.openpublishing.build.ps1 | .openpublishing.build.ps1 | param(
[string]$buildCorePowershellUrl = "https://opbuildstorageprod.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1",
[string]$parameters
)
# Main
$errorActionPreference = 'Stop'
# Step-1: Download buildcore script to local
echo "download build core script to local with source url: ... |
PowerShellCorpus/Github/rumart_ps/ESXi/check_3par-AluaRule.ps1 | check_3par-AluaRule.ps1 | <#
.SYNOPSIS
Script to check for the existence of a 3PAR ALUA rule on ESXi hosts
.DESCRIPTION
The script connects to a vCenter to get a list of ESXi hosts and then
connects to each of these to create an ESXCLI object which is used
to check for the existence of a custom 3PAR... |
PowerShellCorpus/Github/chreestopher_SQLtoPS/build.ps1 | build.ps1 | properties {
$TaskName="Analyze"
$FilePath="$(split-path -Parent $PSScriptRoot)\SqlToPS\src\SqlToPS.psm1"
}
Task -name Default -depends Analyze
Task -name Build -action {
$root = (split-path -parent -path (split-path $filePath -Parent))
$version = (read-host "Enter Version Number:")
$files =... |
PowerShellCorpus/Github/newguyneal_PeopleFinder/ThePeopleSearchApplication/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/newguyneal_PeopleFinder/ThePeopleSearchApplication/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/Bojak4616_Pileus/bot_code/windows/win_bot.ps1 | win_bot.ps1 | # windows bot
# find_string test data: $stringarray = "this is a super hard test", "another etest yo"
# Name: Send_NetworkData
# Parameters: $data, whatever we're sending to termbin.com
# Return value: None
# Purpose: Writes to termbin for us so we don't need to install netcat everywhere
# CREDIT: Thi... |
PowerShellCorpus/Github/Bojak4616_Pileus/bot_code/windows/AES.ps1 | AES.ps1 | #credit: https://gist.github.com/ctigeek/2a56648b923d198a6e60
function Create-AesManagedObject($key, $IV) {
$aesManaged = New-Object "System.Security.Cryptography.AesManaged"
$aesManaged.Mode = [System.Security.Cryptography.CipherMode]::CBC
$aesManaged.Padding = [System.Security.Cryptography.PaddingMo... |
PowerShellCorpus/Github/Bojak4616_Pileus/bot_code/windows/termbin_connector.ps1 | termbin_connector.ps1 | # writes to termbin for us so we don't need to install netcat everywhere
# CREDIT: This code was modified from: https://gist.github.com/jstangroome/9adaa87a845e5be906c8/
function Send-NetworkData ($data) {
begin {
# establish the connection and a stream writer
$Encoding = [System.Text.Encoding]::AS... |
PowerShellCorpus/Github/Bojak4616_Pileus/bot_code/windows/soundcloud_scraper.ps1 | soundcloud_scraper.ps1 | # soundcloud scraper
$CLIENT_ID = read-host "Soundcloud CLIENT_ID: "
$method = Read-Host "hashtag or track? "
if ($method -eq 'track'){
# query soundcloud for our user. This gets us all the track_ids that we can then query for the dl link
$url_one = "http://api.soundcloud.com/resolve.json?url=https://sound... |
PowerShellCorpus/Github/Bojak4616_Pileus/scripts/soundcloud_scraper.ps1 | soundcloud_scraper.ps1 | # soundcloud scraper
$CLIENT_ID = read-host "Soundcloud CLIENT_ID: "
$method = Read-Host "hashtag or track? "
if ($method -eq 'track'){
# query soundcloud for our user. This gets us all the track_ids that we can then query for the dl link
$url_one = "http://api.soundcloud.com/resolve.json?url=https://sound... |
PowerShellCorpus/Github/eey0re_my_Powersploit/Exfiltration/VolumeShadowCopyTools.ps1 | VolumeShadowCopyTools.ps1 | function Get-VolumeShadowCopy
{
<#
.SYNOPSIS
Lists the device paths of all local volume shadow copies.
PowerSploit Function: Get-VolumeShadowCopy
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
Version: 2.0... |
PowerShellCorpus/Github/eey0re_my_Powersploit/Exfiltration/Invoke-CredentialInjection.ps1 | Invoke-CredentialInjection.ps1 | function Invoke-CredentialInjection
{
<#
.SYNOPSIS
This script allows an attacker to create logons with clear-text credentials without triggering a suspicious Event ID 4648 (Explicit Credential Logon).
The script either creates a suspended winlogon.exe process running as SYSTEM, or uses an existi... |
PowerShellCorpus/Github/eey0re_my_Powersploit/Exfiltration/Invoke-NinjaCopy.ps1 | Invoke-NinjaCopy.ps1 | function Invoke-NinjaCopy
{
<#
.SYNOPSIS
This script can copy files off an NTFS volume by opening a read handle to the entire volume (such as c:) and parsing the NTFS structures. This requires you
are an administrator of the server. This allows you to bypass the following protections:
1. Files which are ope... |
PowerShellCorpus/Github/eey0re_my_Powersploit/Exfiltration/Get-TimedScreenshot.ps1 | Get-TimedScreenshot.ps1 | function Get-TimedScreenshot
{
<#
.SYNOPSIS
Takes screenshots at a regular interval and saves them to disk.
PowerSploit Function: Get-TimedScreenshot
Author: Chris Campbell (@obscuresec)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
A function that tak... |
PowerShellCorpus/Github/eey0re_my_Powersploit/Exfiltration/Invoke-TokenManipulation.ps1 | Invoke-TokenManipulation.ps1 | function Invoke-TokenManipulation
{
<#
.SYNOPSIS
This script requires Administrator privileges. It can enumerate the Logon Tokens available and use them to create new processes. This allows you to use
anothers users credentials over the network by creating a process with their logon token. This will work even wi... |
PowerShellCorpus/Github/eey0re_my_Powersploit/Exfiltration/Get-VaultCredential.ps1 | Get-VaultCredential.ps1 | function Get-VaultCredential
{
<#
.SYNOPSIS
Displays Windows vault credential objects including cleartext web credentials.
PowerSploit Function: Get-VaultCredential
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
Ge... |
PowerShellCorpus/Github/eey0re_my_Powersploit/Exfiltration/Invoke-Mimikatz.ps1 | Invoke-Mimikatz.ps1 | function Invoke-Mimikatz
{
<#
.SYNOPSIS
This script leverages Mimikatz 2.0 and Invoke-ReflectivePEInjection to reflectively load Mimikatz completely in memory. This allows you to do things such as
dump credentials without ever writing the mimikatz binary to disk.
The script has a ComputerName parameter which a... |
PowerShellCorpus/Github/eey0re_my_Powersploit/Exfiltration/Get-Keystrokes.ps1 | Get-Keystrokes.ps1 | function Get-Keystrokes {
<#
.SYNOPSIS
Logs keys pressed, time and the active window.
PowerSploit Function: Get-Keystrokes
Author: Chris Campbell (@obscuresec) and Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
... |
PowerShellCorpus/Github/eey0re_my_Powersploit/Exfiltration/Get-GPPPassword.ps1 | Get-GPPPassword.ps1 | function Get-GPPPassword {
<#
.SYNOPSIS
Retrieves the plaintext password and other information for accounts pushed through Group Policy Preferences.
PowerSploit Function: Get-GPPPassword
Author: Chris Campbell (@obscuresec)
License: BSD 3-Clause
Required Dependencies: None
Optional D... |
PowerShellCorpus/Github/eey0re_my_Powersploit/Exfiltration/Out-Minidump.ps1 | Out-Minidump.ps1 | function Out-Minidump
{
<#
.SYNOPSIS
Generates a full-memory minidump of a process.
PowerSploit Function: Out-Minidump
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
Out-Minidump writes a... |
PowerShellCorpus/Github/eey0re_my_Powersploit/CodeExecution/Invoke-Shellcode.ps1 | Invoke-Shellcode.ps1 | # The actual Invoke-Shellcode has moved to Invoke--Shellcode.ps1.
# This was done to make a point that you have no security sense
# if you think it's okay to blindly download/exec code directly
# from a GitHub repo you don't control. This will undoubedtly break
# many scripts that have this path hardcoded. If you d... |
PowerShellCorpus/Github/eey0re_my_Powersploit/CodeExecution/Invoke--Shellcode.ps1 | Invoke--Shellcode.ps1 | function Invoke-Shellcode
{
<#
.SYNOPSIS
Inject shellcode into the process ID of your choosing or within the context of the running PowerShell process.
PowerSploit Function: Invoke-Shellcode
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: N... |
PowerShellCorpus/Github/eey0re_my_Powersploit/CodeExecution/Invoke-ShellcodeMSIL.ps1 | Invoke-ShellcodeMSIL.ps1 | function Invoke-ShellcodeMSIL
{
<#
.SYNOPSIS
Execute shellcode within the context of the running PowerShell process without making any Win32 function calls.
PowerSploit Function: Invoke-ShellcodeMSIL
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: N... |
PowerShellCorpus/Github/eey0re_my_Powersploit/CodeExecution/Invoke-DllInjection.ps1 | Invoke-DllInjection.ps1 | function Invoke-DllInjection
{
<#
.SYNOPSIS
Injects a Dll into the process ID of your choosing.
PowerSploit Function: Invoke-DllInjection
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
Invoke-DllInjection injects a ... |
PowerShellCorpus/Github/eey0re_my_Powersploit/CodeExecution/Invoke-ReflectivePEInjection.ps1 | Invoke-ReflectivePEInjection.ps1 | function Invoke-ReflectivePEInjection
{
<#
.SYNOPSIS
This script has two modes. It can reflectively load a DLL/EXE in to the PowerShell process,
or it can reflectively load a DLL in to a remote process. These modes have different parameters and constraints,
please lead the Notes section (GENERAL NOTES) for in... |
PowerShellCorpus/Github/eey0re_my_Powersploit/AntivirusBypass/Find-AVSignature.ps1 | Find-AVSignature.ps1 | function Find-AVSignature
{
<#
.SYNOPSIS
Locate tiny AV signatures.
PowerSploit Function: Find-AVSignature
Authors: Chris Campbell (@obscuresec) & Matt Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
Locates single Byte AV signature... |
PowerShellCorpus/Github/eey0re_my_Powersploit/ScriptModification/Out-CompressedDll.ps1 | Out-CompressedDll.ps1 | function Out-CompressedDll
{
<#
.SYNOPSIS
Compresses, Base-64 encodes, and outputs generated code to load a managed dll in memory.
PowerSploit Function: Out-CompressedDll
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION... |
PowerShellCorpus/Github/eey0re_my_Powersploit/ScriptModification/Out-EncryptedScript.ps1 | Out-EncryptedScript.ps1 | function Out-EncryptedScript
{
<#
.SYNOPSIS
Encrypts text files/scripts.
PowerSploit Function: Out-EncryptedScript
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
Out-EncryptedScript will encrypt a script (or any tex... |
PowerShellCorpus/Github/eey0re_my_Powersploit/ScriptModification/Remove-Comments.ps1 | Remove-Comments.ps1 | function Remove-Comments
{
<#
.SYNOPSIS
Strips comments and extra whitespace from a script.
PowerSploit Function: Remove-Comments
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
Remove-Comments strips out comments a... |
PowerShellCorpus/Github/eey0re_my_Powersploit/ScriptModification/Out-EncodedCommand.ps1 | Out-EncodedCommand.ps1 | function Out-EncodedCommand
{
<#
.SYNOPSIS
Compresses, Base-64 encodes, and generates command-line output for a PowerShell payload script.
PowerSploit Function: Out-EncodedCommand
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DE... |
PowerShellCorpus/Github/eey0re_my_Powersploit/Recon/Invoke-ReverseDnsLookup.ps1 | Invoke-ReverseDnsLookup.ps1 | function Invoke-ReverseDnsLookup
{
<#
.SYNOPSIS
Perform a reverse DNS lookup scan on a range of IP addresses.
PowerSploit Function: Invoke-ReverseDnsLookup
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
Invoke-Reve... |
PowerShellCorpus/Github/eey0re_my_Powersploit/Recon/Get-HttpStatus.ps1 | Get-HttpStatus.ps1 | function Get-HttpStatus
{
<#
.SYNOPSIS
Returns the HTTP Status Codes and full URL for specified paths.
PowerSploit Function: Get-HttpStatus
Author: Chris Campbell (@obscuresec)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
A script to check for the existen... |
PowerShellCorpus/Github/eey0re_my_Powersploit/Recon/Invoke-Portscan.ps1 | Invoke-Portscan.ps1 | function Invoke-Portscan
{
<#
.SYNOPSIS
Simple portscan module
PowerSploit Function: Invoke-Portscan
Author: Rich Lundeen (http://webstersProdigy.net)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
.DESCRIPTION
Does a simple port scan using regular sockets, based (prett... |
PowerShellCorpus/Github/eey0re_my_Powersploit/Recon/Get-ComputerDetails.ps1 | Get-ComputerDetails.ps1 | function Get-ComputerDetails
{
<#
.SYNOPSIS
This script is used to get useful information from a computer.
Function: Get-ComputerDetails
Author: Joe Bialek, Twitter: @JosephBialek
Required Dependencies: None
Optional Dependencies: None
Version: 1.1
.DESCRIPTION
This script is used to get useful infor... |
PowerShellCorpus/Github/anewboyz_myTestCode/EF/CRMSystemEF/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/anewboyz_myTestCode/EF/CRMSystemEF/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/anewboyz_myTestCode/EF/CRMSystemEF/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/anewboyz_myTestCode/EF/CRMSystemEF/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/anewboyz_myTestCode/EF/CRMSystemEF/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/anewboyz_myTestCode/EF/CRMSystemEF/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/anewboyz_myTestCode/EF/CRMSystemEF/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/anewboyz_myTestCode/EF/CRMSystemEF/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/anewboyz_myTestCode/EF/CRMSystemEF/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/anewboyz_myTestCode/EF/CRMSystemEF/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/anewboyz_myTestCode/EF/CRMSystemEF/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/anewboyz_myTestCode/EF/CRMSystemEF/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/anewboyz_myTestCode/EF/CRMSystemEF/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/devblackops_Release-Pipeline-Example/ServerInfo.psdeploy.ps1 | ServerInfo.psdeploy.ps1 | Deploy 'Deploy ServerInfo script' {
By Filesystem {
FromSource '.\ServerInfo.ps1'
To 'C:\temp'
Tagged Prod
}
} |
PowerShellCorpus/Github/devblackops_Release-Pipeline-Example/psakeBuild.ps1 | psakeBuild.ps1 | properties {
$script = "$PSScriptRoot\ServerInfo.ps1"
}
task default -depends Analyze, Test
task Analyze {
$saResults = Invoke-ScriptAnalyzer -Path $script -Severity @('Error', 'Warning') -Recurse -Verbose:$false
if ($saResults) {
$saResults | Format-Table
Write-Error -Message ... |
PowerShellCorpus/Github/devblackops_Release-Pipeline-Example/ServerInfo.tests.ps1 | ServerInfo.tests.ps1 | $sut = "$PSScriptRoot\ServerInfo.ps1"
Describe 'Unit Tests' {
Context 'Parameter Validation' {
$func = Get-Command -Name $sut
it 'ComputerName parameter is mandatory' {
$func.Parameters.ComputerName.Attributes.Mandatory | should be $true
}
it 'R... |
PowerShellCorpus/Github/devblackops_Release-Pipeline-Example/ServerInfo.ps1 | ServerInfo.ps1 | [cmdletbinding()]
[OutputType([pscustomobject])]
param(
[parameter(mandatory)]
[string[]]$ComputerName,
[PSCredential]
[System.Management.Automation.CredentialAttribute()]
$Credential
)
process {
foreach ($name in $ComputerName) {
$cimSession = New-CimSession -Comp... |
PowerShellCorpus/Github/devblackops_Release-Pipeline-Example/build.ps1 | build.ps1 | [cmdletbinding()]
param(
[string[]]$Task = 'default'
)
if (!(Get-Module -Name Pester -ListAvailable)) { Install-Module -Name Pester -Scope CurrentUser }
if (!(Get-Module -Name psake -ListAvailable)) { Install-Module -Name psake -Scope CurrentUser }
if (!(Get-Module -Name PSDeploy -ListAvailable)) { Install-... |
PowerShellCorpus/Github/dotps1_HPWarranty/Invoke-AppveyorBuild.ps1 | Invoke-AppveyorBuild.ps1 | #requires -Modules Configuration, Pester, PSScriptAnalyzer
try {
Set-Location -Path $env:APPVEYOR_BUILD_FOLDER -ErrorAction Stop
$timestamp = Get-Date -uformat "%Y%m%d-%H%M%S"
$resultsFile = "Results_${timestamp}.xml"
Import-Module -Name Pester -Force -ErrorAction Stop
Import-Module -Nam... |
PowerShellCorpus/Github/dotps1_HPWarranty/HPWarranty/Private/Invoke-HPIncSOAPRequest.ps1 | Invoke-HPIncSOAPRequest.ps1 | <#
.SYNOPSIS
Invokes a SOAP Request.
.DESCRIPTION
Sends a SOAP Request to Hewlett-Packard and returns Entitlement data for non Enterprise systems.
.INPUTS
None.
.OUTPUTS
System.Xml
.PARAMETER SOAPRequest
The Xml formated request to send
.PARAMET... |
PowerShellCorpus/Github/dotps1_HPWarranty/HPWarranty/Private/Get-HPProductNumberAndSerialNumber.ps1 | Get-HPProductNumberAndSerialNumber.ps1 | <#
.SYNOPSIS
Get the Product Number (SKU) and Serial Number from a system.
.DESCRIPTION
Query the local or remote system for its Product Number (SKU) and Serial Number, return that object in a HashTable.
.INPUTS
None.
.OUTPUTS
System.Collections.HashTable
.PA... |
PowerShellCorpus/Github/dotps1_HPWarranty/HPWarranty/Private/Invoke-HPEntSOAPRequest.ps1 | Invoke-HPEntSOAPRequest.ps1 | <#
.SYNOPSIS
Invokes a SOAP Request.
.DESCRIPTION
Sends a SOAP Request to Hewlett-Packard ISEE Servers to either create a Registration GDID and Token, or retrieve Warranty Info.
.INPUTS
None.
.OUTPUTS
System.Xml
.PARAMETER SOAPRequest
The Xml Formatted request to be sent.
.PARAMETER Url
... |
PowerShellCorpus/Github/dotps1_HPWarranty/HPWarranty/Public/Get-HPEntWarrantyEntitlement.ps1 | Get-HPEntWarrantyEntitlement.ps1 | Function Get-HPEntWarrantyEntitlement {
[CmdletBinding(
DefaultParameterSetName = '__AllParameterSets'
)]
[OutputType(
[HashTable]
)]
Param (
[Parameter(
ParameterSetName = 'Computer',
ValueFromPipeline = $true
)]
[... |
PowerShellCorpus/Github/dotps1_HPWarranty/HPWarranty/Public/Get-HPIncWarrantyEntitlement.ps1 | Get-HPIncWarrantyEntitlement.ps1 | Function Get-HPIncWarrantyEntitlement {
[CmdletBinding(
DefaultParameterSetName = '__AllParameterSets'
)]
[OutputType(
[HashTable]
)]
Param (
[Parameter(
ParameterSetName = 'Computer',
ValueFromPipeline = $true
)]
[... |
PowerShellCorpus/Github/dotps1_HPWarranty/HPWarranty/Public/Get-HPSystemInformationFromCMDB.ps1 | Get-HPSystemInformationFromCMDB.ps1 | Function Get-HPSystemInformationFromCMDB {
[OutputType([Array])]
Param (
[Parameter()]
[ValidateScript({
if ($_ -eq $env:COMPUTERNAME) {
$true
} else {
try {
Test-Connection -ComputerName $_ -Count 1 ... |
PowerShellCorpus/Github/dotps1_HPWarranty/Tests/Pester.Tests.ps1 | Pester.Tests.ps1 | #requires -Modules Pester, PSScriptAnalyzer
Describe "PSScriptAnalyzer rules." {
Context "Invoke PSScriptAnalyzer rules on all ps1's in module." {
$results = Invoke-ScriptAnalyzer -Path .\HPWarranty -Recurse
It 'Invoke-ScriptAnalyzer results should be 0.' {
$results.Count | Shou... |
PowerShellCorpus/Github/avdaredevil_GIT-AutoManagementSystem/Git-Manager.ps1 | Git-Manager.ps1 | <#
|==============================================================================>|
Git-Hub Automatic Releaser by APoorv Verma [AP] on 4/22/2014
|==============================================================================>|
$) Tracks changes and uploads latest versions of codes
$) Auto-Creation and H... |
PowerShellCorpus/Github/jonbock_pigmoon-smile/pigmoon-smile/packages/jQuery.1.9.1/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/jonbock_pigmoon-smile/pigmoon-smile/packages/jQuery.1.9.1/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/jonbock_pigmoon-smile/pigmoon-smile/packages/jQuery.1.9.1/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/jonbock_pigmoon-smile/pigmoon-smile/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/jonbock_pigmoon-smile/pigmoon-smile/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/jonbock_pigmoon-smile/pigmoon-smile/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/robbiepc30_LocalAccountManagement/psake.ps1 | psake.ps1 | properties {
$Path = "$PSScriptRoot\LocalAccountManagement"
}
Task Analyze {
$saResult = Invoke-ScriptAnalyzer -Path $Path -Recurse -Severity Error, Warning -ExcludeRule PSAvoidUsingPlainTextForPassword, PSAvoidUsingUserNameAndPassWordParams, PSAvoidUsingWMICmdlet |
where { $_.ScriptNam... |
PowerShellCorpus/Github/robbiepc30_LocalAccountManagement/deploy.psdeploy.ps1 | deploy.psdeploy.ps1 | Deploy "Deploy LocalAccountManagement To Dev Folder" {
By FileSystem {
FromSource LocalAccountManagement
To C:\PSDev\LocalAccountManagement
WithOptions @{
Mirror = $True
}
Tagged Dev
}
}
Deploy "Deploy LocalAccountManagement To Local Module Folder"... |
PowerShellCorpus/Github/robbiepc30_LocalAccountManagement/build.ps1 | build.ps1 | #Requires -Modules Pester, psake, PSScriptAnalyzer, PSDeploy
[CmdletBinding()]
param(
[string[]]$Task = 'default'
)
Invoke-psake -buildFile "$PSScriptRoot\psake.ps1" -taskList $Task -Verbose:$VerbosePreference
|
PowerShellCorpus/Github/robbiepc30_LocalAccountManagement/LocalAccountManagement/Functions/New-LocalUser.ps1 | New-LocalUser.ps1 | <#
.Synopsis
Creates local user(s) on computer(s)
.DESCRIPTION
Creates local user(s) on computer(s)
.EXAMPLE
New-LocalUser -Name 'User1', 'User2' -Password 'SuperSecretPassword'
Creates "User1" and "User2" on local computer
.EXAMPLE
New-LocalUser -Name 'User1', 'User2' -ComputerName 'Client0... |
PowerShellCorpus/Github/robbiepc30_LocalAccountManagement/LocalAccountManagement/Functions/Get-LocalUser.ps1 | Get-LocalUser.ps1 | <#
.Synopsis
Retrieves local users from computer(s)
.DESCRIPTION
Retrieves local users from computer(s)
.EXAMPLE
Get-LocalUser
Gets all user accounts from local computer
.EXAMPLE
Get-LocalUser test, guest
Gets user accounts "test" and "guest" on the local computer if they exist
.EXAMPLE
... |
PowerShellCorpus/Github/robbiepc30_LocalAccountManagement/LocalAccountManagement/Functions/Get-LocalUser.Tests.ps1 | Get-LocalUser.Tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
. "$here\$sut"
# helper function
function createUsers([String[]]$User)
{
$userList = @()
foreach ($u in $User) {
$userList += [pscustomobject]@{ name = "$u"... |
PowerShellCorpus/Github/robbiepc30_LocalAccountManagement/LocalAccountManagement/Functions/Remove-LocalUserProfile.ps1 | Remove-LocalUserProfile.ps1 | <#
.Synopsis
Removes local users PROFILE from computer(s)
.DESCRIPTION
Removes local users PROFILE from computer(s)
.EXAMPLE
'User1', 'User2' | Remove-LocalUser
Removes User1 and User2 from local computer
.EXAMPLE
Remove-LocalUserProfile -Name 'User1', 'User2' -ComputerName 'Client01', Clien... |
PowerShellCorpus/Github/robbiepc30_LocalAccountManagement/LocalAccountManagement/Functions/Remove-LocalUserProfile.Tests.ps1 | Remove-LocalUserProfile.Tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
. "$here\$sut"
function userComputerObject ([String[]]$Name, [String[]]$ComputerName) {
$objArray = @()
foreach ($c in $ComputerName) {
foreach ($n in $Name) {... |
PowerShellCorpus/Github/robbiepc30_LocalAccountManagement/LocalAccountManagement/Functions/Remove-LocalUser.Tests.ps1 | Remove-LocalUser.Tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
. "$here\$sut"
# helper function
function userComputerObject ([String[]]$Name, [String[]]$ComputerName) {
$objArray = @()
foreach ($c in $ComputerName) {
fore... |
PowerShellCorpus/Github/robbiepc30_LocalAccountManagement/LocalAccountManagement/Functions/Remove-LocalUser.ps1 | Remove-LocalUser.ps1 | <#
.Synopsis
Removes local users from computer(s)
.DESCRIPTION
Removes local users from computer(s)
.EXAMPLE
'User1', 'User2' | Remove-LocalUser
Removes User1 and User2 from local computer
.EXAMPLE
Remove-LocalUser -Name 'User1', 'User2' -ComputerName 'Client01', Client02' -Force
Remov... |
PowerShellCorpus/Github/robbiepc30_LocalAccountManagement/LocalAccountManagement/Functions/New-LocalUser.Tests.ps1 | New-LocalUser.Tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
. "$here\$sut"
# helper function
function userComputerObject ([String[]]$Name, [String[]]$ComputerName) {
$objArray = @()
foreach ($c in $ComputerName) {
fore... |
PowerShellCorpus/Github/robbiepc30_LocalAccountManagement/LocalAccountManagement/Functions/Set-LocalUser.Tests.ps1 | Set-LocalUser.Tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
. "$here\$sut"
function userComputerObject ([String[]]$Name, [String[]]$ComputerName) {
$objArray = @()
foreach ($c in $ComputerName) {
foreach ($n in $Name) {... |
PowerShellCorpus/Github/robbiepc30_LocalAccountManagement/LocalAccountManagement/Functions/Set-LocalUser.ps1 | Set-LocalUser.ps1 | <#
.Synopsis
Updates settings on local user(s) on computer(s)
.DESCRIPTION
Updates settings on local user(s) on computer(s)
.EXAMPLE
Set-LocalUser -Name test1, test2 -Password 'SuperSecretPassword' -Description 'Test Accounts'
Updates password and description for accounts test1 and test2 on the loc... |
PowerShellCorpus/Github/ulistaerk_Scripts/ProcessorAffinity.ps1 | ProcessorAffinity.ps1 | # shift workload of all windows processes to core 0,1
get-process | foreach { $_.ProcessorAffinity = [int]3 }
|
PowerShellCorpus/Github/aljazceru_vmware-powercli-scripts/snapshot-reports.ps1 | snapshot-reports.ps1 | Param(
[string] $Hostname,
[string] $User,
[String] $Pass,
[String] $Report
)
if ($psboundparameters.count -ne 4) {
Write-Host "Usage:"
Write-Host "Snapshot-report.ps1 -Hostname <hostname> -User <user> -Pass <password> -Report <name of html report file>"
}
else {
Connect-VIServer $Hostname... |
PowerShellCorpus/Github/7222-SIMON_Powershell/scanner.ps1 | scanner.ps1 | # Powershell scripts are not enabled by default on Windows
# To enable, run the following command as ADMIN
# Set-ExecutionPolicy RemoteSigned
# (Answer Y)
#
# How to use
# set $ip_list to a text file containing IP addresses
# set $results_file to where you want output
# Log format
# <address> <time(ms)>
... |
PowerShellCorpus/Github/7222-SIMON_Powershell/scanner_getresults.ps1 | scanner_getresults.ps1 | # Powershell scripts are not enabled by default on Windows
# To enable, run the following command as ADMIN
# Set-ExecutionPolicy RemoteSigned
# (Answer Y)
#
# Puts ping in milliseconds for each IP into separate files
# Replaces "Destination host unreachable" and "Timed out" with $_repwith
# How to use
# Se... |
PowerShellCorpus/Github/7222-SIMON_Powershell/scanner_getaverage.ps1 | scanner_getaverage.ps1 | # Powershell scripts are not enabled by default on Windows
# To enable, run the following command as ADMIN
# Set-ExecutionPolicy RemoteSigned
# (Answer Y)
#
# Puts ping in milliseconds for each IP into separate files
# Replaces "Destination host unreachable" and "Timed out" with 9999ms
# How to use
# Set $... |
PowerShellCorpus/Github/7222-SIMON_Powershell/scanner__getresults_master.ps1 | scanner__getresults_master.ps1 | # Powershell scripts are not enabled by default on Windows
# To enable, run the following command as ADMIN
# Set-ExecutionPolicy RemoteSigned
# (Answer Y)
#
# Please use this with the output of scanner.ps1
#
# Puts ping in milliseconds for each IP into separate files
# Replaces "Destination host unreachabl... |
PowerShellCorpus/Github/kdsnice_Scripts/PowerShell/acminaz/Vars.ps1 | Vars.ps1 | [String] $SubscriptionName_="BizSpark"
[string] $CloudServiceName_="anciblecm-tnice"
[string] $Location_="East US 2"
#~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~
[Array] $VMNamesList_=@( "anciblecm-tnice")
[array] $... |
PowerShellCorpus/Github/kdsnice_Scripts/PowerShell/acminaz/Functions.ps1 | Functions.ps1 | Function CreateAzureStorageAccountsWithLocation
{
param (
[string] $SubscriptionName,
[string] $Location,
[array] $StorageAccountList
)
Select-AzureSubscription $SubscriptionName
foreach ($StorageAccountName in $StorageAccountList )
{
$StorageAccou... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.