full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/adnancartwright_SourceControl/Stop-AzureVM.ps1
Stop-AzureVM.ps1
workflow Stop-AzureVM { Param( [string]$VMName, [string]$ResourceGroupName ) $Conn = Get-AutomationConnection -Name AzureRunAsConnection Add-AzureRMAccount -ServicePrincipal -Tenant $Conn.TenantID -ApplicationId $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint Stop-AzureRmVM -Name ...
PowerShellCorpus/Github/adnancartwright_SourceControl/Start-AzureVM.ps1
Start-AzureVM.ps1
workflow Start-AzureVM { Param( [string]$VMName, [string]$ResourceGroupName ) $Conn = Get-AutomationConnection -Name AzureRunAsConnection Add-AzureRMAccount -ServicePrincipal -Tenant $Conn.TenantID -ApplicationId $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint Start-AzureRmVM -Nam...
PowerShellCorpus/Github/adnancartwright_SourceControl/DisplayAccountResources.ps1
DisplayAccountResources.ps1
<# .DESCRIPTION A runbook that list all of the resources in your Azure Subscription #> $connectionName = "AzureRunAsConnection" try { # Get the connection "AzureRunAsConnection " $servicePrincipalConnection=Get-AutomationConnection -Name $connectionName "Logging in...
PowerShellCorpus/Github/adnancartwright_SourceControl/DisplayAzureVM.ps1
DisplayAzureVM.ps1
workflow DisplayAzureVM { # Grab credentials needed to authenticate to Azure. $Cred - Get-AutomatonPSCredential -Name 'AddAzureCred' # Connect to Azure Add-AzureRmAccount -Credential $Cred $name = Get-AutomationVariable -Name 'MySubscriptionName' # Select the Azure Subscription of the...
PowerShellCorpus/Github/adnancartwright_SourceControl/SQL-Scale.ps1
SQL-Scale.ps1
<# .SYNOPSIS Vertically scale (up or down) an Azure SQL Database .DESCRIPTION This runbook enables one to vertically scale (up or down) an Azure SQL Database using Azure Automation. There are many scenarios in which the performance needs of a database follow a known schedule. U...
PowerShellCorpus/Github/adnancartwright_SourceControl/OMSAlertTrigger.ps1
OMSAlertTrigger.ps1
workflow OMSAlertTrigger { param([object]$WebhookData) Write-Output $WebhookData.WebhookName Write-Output $WebhookData.RequestHeader Write-Output $WebhookData.RequestBody }
PowerShellCorpus/Github/adnancartwright_SourceControl/Demo.ps1
Demo.ps1
Write-Output "Text Editor in Azure Automation"
PowerShellCorpus/Github/adnancartwright_SourceControl/Write-HelloWorld.ps1
Write-HelloWorld.ps1
<# .SYNOPSIS Provides a simple example of a Azure Automation runbook. .DESCRIPTION This runbook provides the "Hello World" example for Azure Automation. If you are brand new to Automation in Azure, you can use this runbook to explore testing and publishing capabilities. The runbook...
PowerShellCorpus/Github/athmane_hppm-autoreports/hppm-autoreports.ps1
hppm-autoreports.ps1
<# .SYNOPSIS Automatic reports for HP Performance Manager .DESCRIPTION A script to automatically generate reports from HP Performance Manager and send them via email (blat) Use at your own risks .EXAMPLE Manual: hppm-autoreports.ps1 -BatchPath "E:\Program Files\HP\HP BTO Softwar...
PowerShellCorpus/Github/albanmoreau-pro_CDC/Function/ActiveDirectoy/ADFunction.ps1
ADFunction.ps1
PowerShellCorpus/Github/albanmoreau-pro_CDC/Function/Exchange/ExchangeFunction.ps1
ExchangeFunction.ps1
PowerShellCorpus/Github/albanmoreau-pro_CDC/Function/Exchange/Disconnect-ExchangeServer.ps1
Disconnect-ExchangeServer.ps1
Function Disconnect-ExchangeServer{ Param( [Parameter(Mandatory = $True, Position = 1)][String]$ExchangeServer ) Get-PSSession | Where-Object computerName -Like $ExchangeServer | Remove-PsSession -Confirm:$false }
PowerShellCorpus/Github/albanmoreau-pro_CDC/Function/Exchange/Disconnect-ExchangeOnline.ps1
Disconnect-ExchangeOnline.ps1
Function Disconnect-ExchangeOnline { Get-PSSession | Where-Object ComputerName -like "outlook.office365.com" | Remove-PsSession -Confirm:$false }
PowerShellCorpus/Github/albanmoreau-pro_CDC/Function/Exchange/Connect-ExchangeServer.ps1
Connect-ExchangeServer.ps1
Function Connect-ExchangeServer { Param( [Parameter(Mandatory = $True, Position = 1)]$UserCredential, [Parameter(Mandatory = $True, Position = 2)][String]$ExchangeServer, [Parameter(Mandatory = $True, Position = 2)][String]$AuthMethode = "Basic" ) [string]$URL = "http://$Exchan...
PowerShellCorpus/Github/albanmoreau-pro_CDC/Function/Exchange/Connect-ExchangeOnline.ps1
Connect-ExchangeOnline.ps1
Function Connect-ExchangeOnline { param ( $UserCredential ) $exoSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-PSSession $exoSession -AllowClobber Start-Sl...
PowerShellCorpus/Github/albanmoreau-pro_CDC/Function/Commun/Get-ScriptDirectory.ps1
Get-ScriptDirectory.ps1
function Get-ScriptDirectory { Split-Path -parent $PSCommandPath }
PowerShellCorpus/Github/albanmoreau-pro_CDC/Function/Commun/Run-CommandLine.ps1
Run-CommandLine.ps1
function Run-CommandLine { Param( [Parameter(Mandatory=$True,Position=1)][String]$CommandLine, [hashtable]$ExitCodeStatus=@{ 0="SUCCESS" }, [hashtable]$ExitCodeMessage, [String]$DefaultStatus="ERROR", [String]$DefaultSuccessMessage="", [String]$DefaultErrorMess...
PowerShellCorpus/Github/albanmoreau-pro_CDC/Function/Commun/Test-Connection.ps1
Test-Connection.ps1
function Test-Connection { Param( [Parameter(Mandatory = $True, Position = 1)][String]$Server, [Parameter(Mandatory = $True, Position = 2)][String]$Port ) $Socket = New-Object Net.Sockets.TcpClient # Create a new Net.Sockets.TcpClient object to use for testing open TCP ports $Er...
PowerShellCorpus/Github/albanmoreau-pro_CDC/Function/Commun/LogMessage.ps1
LogMessage.ps1
function LogMessage { Param( [Parameter(Mandatory = $True, Position = 1)][String]$Message, [Parameter(Position = 2)][String]$MessageType = "INFO", [Switch]$DoNotWriteMessageToScreen, [Switch]$DoNotWriteMessageToLog, [Switch]$AppendToUniqueLog, [String]$LogFileF...
PowerShellCorpus/Github/albanmoreau-pro_CDC/Function/Commun/Import-PSCredential.ps1
Import-PSCredential.ps1
Function Import-PSCredential { param ( [string]$Path ) $import = Import-Clixml $Path if ( !$import.UserName -or !$import.EncryptedPassword ) { Throw "Input is not a valid ExportedPSCredential object, exiting." } $Username = $import.Username $SecureP...
PowerShellCorpus/Github/albanmoreau-pro_CDC/Function/Commun/Get-StrictMode.ps1
Get-StrictMode.ps1
<# .SYNOPSIS Gets the current 'StrictMode' setting. See Set-StrictMode for how to set this. .NOTES When -ShowAllScopes has been passed, the properties of the objects might not be ordered properly. If you're using PSv3 or higher, you can make the hash table where the properties are defined ...
PowerShellCorpus/Github/albanmoreau-pro_CDC/Function/Commun/Remove-Diacritics.ps1
Remove-Diacritics.ps1
function Remove-Diacritics { param ([String]$String = [String]::Empty) $normalized = $String.Normalize([Text.NormalizationForm]::FormD) $sb = new-object Text.StringBuilder $normalized.ToCharArray() | ForEach-Object { if ([Globalization.CharUnicodeInfo]::GetUnicodeCategory($_) -ne [Globalization.UnicodeCateg...
PowerShellCorpus/Github/albanmoreau-pro_CDC/Function/PosteDeTravail/W8Function.ps1
W8Function.ps1
PowerShellCorpus/Github/albanmoreau-pro_CDC/Function/Office 365 (Only)/O365Function.ps1
O365Function.ps1
PowerShellCorpus/Github/albanmoreau-pro_CDC/Function/Office 365 (Only)/Connect-MsolService.ps1
Connect-MsolService.ps1
Function Connect-MsolServiceO365 { param ( $UserCredential ) Connect-MsolService -Credential $UserCredential Start-Sleep 5 return $? }
PowerShellCorpus/Github/CarnivoreOC_MindFMovies/WebAssignment/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/CarnivoreOC_MindFMovies/WebAssignment/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/CarnivoreOC_MindFMovies/WebAssignment/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/CarnivoreOC_MindFMovies/WebAssignment/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/CarnivoreOC_MindFMovies/WebAssignment/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/CarnivoreOC_MindFMovies/WebAssignment/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/CarnivoreOC_MindFMovies/WebAssignment/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/CarnivoreOC_MindFMovies/WebAssignment/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/rngene_hackathon/BotClient/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/rngene_hackathon/BotClient/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/rngene_hackathon/BotClient/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/rngene_hackathon/BotClient/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/rngene_hackathon/BotClient/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/rngene_hackathon/BotClient/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/rngene_hackathon/BotClient/packages/Newtonsoft.Json.9.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/rngene_hackathon/BotClient/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/rngene_hackathon/BotClient/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/rngene_hackathon/BotClient/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/rngene_hackathon/BotClient/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/rngene_hackathon/BotClient/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/rngene_hackathon/HotelBot/packages/Newtonsoft.Json.9.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/ozcarzarate_AzureNodeJsExpressApp1/AzureNodeJsExpressApp1/bin/ChangeConfig.ps1
ChangeConfig.ps1
$configFile = $args[0] Write-Host "Adding iisnode section to config file '$configFile'" $config = New-Object System.Xml.XmlDocument $config.load($configFile) $xpath = $config.CreateNavigator() $parentElement = $xpath.SelectSingleNode("//configuration/configSections/sectionGroup[@name='system.webServer']") $iisn...
PowerShellCorpus/Github/ozcarzarate_AzureNodeJsExpressApp1/AzureNodeJsExpressApp1/bin/download.ps1
download.ps1
$runtimeUrl = $args[0] $overrideUrl = $args[1] $current = [string] (Get-Location -PSProvider FileSystem) $client = New-Object System.Net.WebClient function downloadWithRetry { param([string]$url, [string]$dest, [int]$retry) Write-Host Write-Host "Attempt: $retry" Write-Host trap { Write-Hos...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_Provision_2017_5_4_8_59_9/.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/Orzovai_Barcode_Zint_MySQL_ADO.Net/MySQL_Barcode_ADO.Net.ps1
MySQL_Barcode_ADO.Net.ps1
#Load MySql.Data.dll !!CUSTOMIZE!! [void][system.reflection.Assembly]::LoadFrom("#####") #Insert path to assambly #Create variables with custom server data !!CUSTOMIZE!! $server = "127.0.0.1" $port = "3307" $user = "root" $password = "#######" $database = "barcode" $table = "identnummer" $usedColumn = "ident...
PowerShellCorpus/Github/pgibler_powershell-scripts/pixel_format.ps1
pixel_format.ps1
param ( # The file whose pixel format will be checked. This call will fail on non-image files. [Parameter(Mandatory=$true)][string]$file ) # Get the absolute path to the file. This script therefore supports relative paths. $absoluteFile = (Resolve-Path -Path $file).ToString() # Load the System.Drawin...
PowerShellCorpus/Github/pgibler_powershell-scripts/file_replace.ps1
file_replace.ps1
param ( # Root directory from which the file search will be performed. [Parameter(Mandatory=$true)][string]$rootDir, # The file to replace. Supports filtering using the -Filter option of the Get-ChildItem method. [Parameter(Mandatory=$true)][string]$fileFilter, # The file to include in place of...
PowerShellCorpus/Github/titlerequired_GitHub/EssentialsTester.ps1
EssentialsTester.ps1
# Windows Server Essentials & SBS 2011 Essentials Configuration Tester Tool # Written by Robert Pearman $Global:CurrentVersion = "Version: 1.7" # Tool designed to check basic IIS, Certificate and Service settings / configuration. # Not a replacement for other troubleshooting or BPA. # Provided AS IS - no warrant...
PowerShellCorpus/Github/titlerequired_GitHub/TestFile.ps1
TestFile.ps1
# This is a Test File
PowerShellCorpus/Github/titlerequired_GitHub/Password Change Notification.ps1
Password Change Notification.ps1
None
PowerShellCorpus/Github/titlerequired_GitHub/PingTest.ps1
PingTest.ps1
# Powershell script to check average link speed # Input Client Host name and Number of Packets # v0.1 Robert Pearman, May 2013 $client = Read-Host "Enter client hostname" $packets = Read-Host "How many packets to send?" # Ping ipv4 address Write-Host "Pinging $client with $packets packets of data" Write-Host "Ru...
PowerShellCorpus/Github/titlerequired_GitHub/Random Password.ps1
Random Password.ps1
# Password Settings $PasswordLength = 8 $password = "" # Build Password on Length Variable do{ # Set Password Character Strings $Set0 = "abcdefghijklmnpqrstuvwxyz".ToCharArray() $Set1 ="123456789".ToCharArray() $Set2 = "ABCDEFGHIJKLMNPQRSTUVWXYZ".ToCharArray() $Set3 = "!£$...
PowerShellCorpus/Github/kuropristo_FractalWebApp/FractalWebApp/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/kuropristo_FractalWebApp/FractalWebApp/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/kuropristo_FractalWebApp/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/kuropristo_FractalWebApp/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/kuropristo_FractalWebApp/packages/jQuery.2.2.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/kuropristo_FractalWebApp/packages/jQuery.2.2.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/kuropristo_FractalWebApp/packages/jQuery.2.2.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/gigapps_FIV_Aufgabe_Friedl/Databasesample/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/gigapps_FIV_Aufgabe_Friedl/Databasesample/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/gigapps_FIV_Aufgabe_Friedl/Databasesample/packages/Microsoft.AspNet.Providers.LocalDB.2.0.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) try { # Set up variables $timestamp = (Get-Date).ToString('yyyyMMddHHmmss') $projectName = [IO.Path]::GetFileName($project.ProjectName.Trim([IO.PATH]::DirectorySeparatorChar, [IO.PATH]::AltDirectorySeparatorChar)) $catalogName = "aspnet-$project...
PowerShellCorpus/Github/synthtech_ps-scripts/sublister.ps1
sublister.ps1
# Location of Sublist3r script $source = "$env:USERPROFILE\Documents\Git\Sublist3r" $dir = $PSScriptRoot while(!($domain)) { $domain = read-host "[Script] Enter a domain" } cd $source python sublist3r.py -v -e baidu,yahoo,google,bing,ask,netcraft,ssl -d $domain read-host -prompt "`n[Script] Press enter to e...
PowerShellCorpus/Github/synthtech_ps-scripts/dl-video.ps1
dl-video.ps1
# User agent $agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36" # Default download directory $default = "$env:USERPROFILE\Videos" $dir = $PSScriptRoot $dl = read-host "Enter the directory" if (!($dl)) { $dl = $default } while(!($url))...
PowerShellCorpus/Github/synthtech_ps-scripts/taiga-build.ps1
taiga-build.ps1
# Location of vcvars32.bat (for compiling libcurl) $vs = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat" # Location of MsBuild (for compiling Taiga) $msbuild = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" # Location of...
PowerShellCorpus/Github/synthtech_ps-scripts/sanear-build.ps1
sanear-build.ps1
# Location of sanear source code $source = "$env:USERPROFILE\Documents\Git\sanear" # Location of MsBuild $msbuild = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" $dir = $PSScriptRoot # Setup config $quickBuild = read-host "[Script] Quick build?" if ($quickBuild ...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/management/Invoke-RunAs.ps1
Invoke-RunAs.ps1
function Invoke-RunAs { <# .DESCRIPTION Runas knockoff. Will bypass GPO path restrictions. .PARAMETER UserName Provide a user .PARAMETER Password Provide a password .PARAMETER Domain Provide optional domain .PARAMETER Cmd Command to execute. .PARAMETER ShowWindow Show the window being created ins...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/management/MailRaider.ps1
MailRaider.ps1
#requires -version 2 <# MailRaider v0.1 by @xorrior #> function Invoke-SendMail { <# .SYNOPSIS This function sends emails using a custom or default template to specified target email addresses. .DESCRIPTION This function sends a specified number of phishing emails to a specif...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/management/Set-MacAttribute.ps1
Set-MacAttribute.ps1
function Set-MacAttribute { <# .SYNOPSIS Sets the modified, accessed and created (Mac) attributes for a file based on another file or input. PowerSploit Function: Set-MacAttribute Author: Chris Campbell (@obscuresec) License: BSD 3-Clause Required Dependencies: None Optional Dependen...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/management/New-HoneyHash.ps1
New-HoneyHash.ps1
function New-HoneyHash { <# .SYNOPSIS Inject artificial credentials into LSASS. Inspired by Mark Baggett's article: https://isc.sans.edu/diary/Detecting+Mimikatz+Use+On+Your+Network/19311/ Author: Matthew Graeber (@mattifestation) License: BSD 3-Clause Required Dependencies: None Optional Dependencies: None...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/management/Invoke-PSInject.ps1
Invoke-PSInject.ps1
function Invoke-PSInject { <# .SYNOPSIS Taskes a PowerShell script block (base64-encoded), patches the decoded logic into the architecture appropriate ReflectivePick .dll, and injects the result into a specified ProcessID. Adapted from PowerSploit's Invoke-RefleciveDLLInjection codebase .PARAMETER ProcId ...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/collection/Get-IndexedItem.ps1
Get-IndexedItem.ps1
<# James O'Neill's Get-IndexedItem script: https://gallery.technet.microsoft.com/scriptcenter/Get-IndexedItem-PowerShell-5bca2dae Which was distributed under: MICROSOFT LIMITED PUBLIC LICENSE version 1.1 This license governs use of code marked as "sample" or "example" ...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/collection/Get-ClipboardContents.ps1
Get-ClipboardContents.ps1
function Get-ClipboardContents { <# .SYNOPSIS Monitors the clipboard on a specified interval for changes to copied text. PowerSploit Function: Get-ClipboardContents Author: @harmj0y License: BSD 3-Clause Required Dependencies: None Optional Dependencies: None y .PARAMETER CollectionLimit Specifies the...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/collection/Invoke-NinjaCopy.ps1
Invoke-NinjaCopy.ps1
function Invoke-NinjaCopy { <# .SYNOPSIS Copies a file from an NTFS partitioned volume by reading the raw volume and parsing the NTFS structures. This bypasses file DACL's, read handle locks, and SACL's. You must be an administrator to run the script. This can be used to read SYSTEM files which are normally loc...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/collection/Invoke-Inveigh.ps1
Invoke-Inveigh.ps1
function Invoke-Inveigh { <# .SYNOPSIS Invoke-Inveigh is a Windows PowerShell LLMNR/NBNS spoofer with challenge/response capture over HTTP/HTTPS/SMB. .DESCRIPTION Invoke-Inveigh is a Windows PowerShell LLMNR/NBNS spoofer with the following features: IPv4 LLMNR/NBNS spoofer with granular control NTLM...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/collection/Get-BrowserData.ps1
Get-BrowserData.ps1
function Get-BrowserInformation { <# .SYNOPSIS Dumps Browser Information Author: @424f424f License: BSD 3-Clause Required Dependencies: None Optional Dependencies: None .DESCRIPTION Enumerates browser history or bookmarks for a Chrome, Internet Expl...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/collection/Get-FoxDump.ps1
Get-FoxDump.ps1
Function Get-FoxDump { <# .SYNOPSIS This script will utilize the api functions within the nss3.dll to decrypt saved passwords. This will only be successfull if the masterpassword has not been set. .DESCRIPTION This script will utilize the api functions within the nss3.dll to decrypt saved ...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/collection/Get-ChromeDump.ps1
Get-ChromeDump.ps1
Function Get-ChromeDump{ <# .SYNOPSIS This function returns any passwords and history stored in the chrome sqlite databases. .DESCRIPTION This function uses the System.Data.SQLite assembly to parse the different sqlite db files used by chrome to save passwords and browsing history. The System.Data.SQ...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/collection/Invoke-NetRipper.ps1
Invoke-NetRipper.ps1
function Invoke-NetRipper { <# .SYNOPSIS NetRipper is a post exploitation tool targeting Windows systems which uses API hooking in order to intercept network traffic and encryption related functions from a low privileged user, being able to capture both plain-text traffic and encrypted ...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/collection/Get-Screenshot.ps1
Get-Screenshot.ps1
function Get-Screenshot { param ( [Parameter(Mandatory = $False)] [string] $Ratio ) Add-Type -Assembly System.Windows.Forms; $ScreenBounds = [Windows.Forms.SystemInformation]::VirtualScreen; $ScreenshotObject = New-Object Drawing.Bitmap $ScreenBounds.Width, $Sc...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/collection/Get-Keystrokes.ps1
Get-Keystrokes.ps1
function Get-Keystrokes { <# .SYNOPSIS Logs keys pressed, time and the active window (when changed). Some modifications for Empire by @harmj0y. PowerSploit Function: Get-Keystrokes Author: Chris Campbell (@obscuresec) and Matthew Graeber (@mattifestation) Modifications: @harmj0y ...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/collection/Invoke-InveighBruteForce.ps1
Invoke-InveighBruteForce.ps1
function Invoke-InveighBruteForce { <# .SYNOPSIS Invoke-InveighBruteForce is a remote (Hot Potato method)/unprivileged NBNS brute force spoofer. .DESCRIPTION Invoke-InveighBruteForce is a remote (Hot Potato method)/unprivileged NBNS brute force spoofer with the following features: Targeted IPv4 NBNS bru...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/collection/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/DolpheusLabs_PowerShell-Empire/data/module_source/collection/vaults/KeeThief.ps1
KeeThief.ps1
#requires -version 2 function Get-KeePassDatabaseKey { <# .SYNOPSIS Retrieves database mastey key information for unlocked KeePass database. Function: Get-KeePassDatabaseKey Author: Lee Christensen (@tifkin_), Will Schroeder (@harmj0y) License: BSD 3-Clause ...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/collection/vaults/KeePassConfig.ps1
KeePassConfig.ps1
#requires -version 2 function Find-KeePassconfig { <# .SYNOPSIS Finds and parses any KeePass.config.xml (2.X) and KeePass.ini (1.X) files. Author: @harmj0y License: BSD 3-Clause Required Dependencies: None Optional Dependencies: None .DESCRIPTION ...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/exploitation/Exploit-JBoss.ps1
Exploit-JBoss.ps1
function Exploit-JMXConsole { <# .SYNOPSIS PowerShell delivery for vulnerable JBoss JMX Console .PARAMETER Rhost. Host to exploit .PARAMETER Port Port to use. .PARAMETER SSL Switch. SSL. .PARAMETER JMXConsole Switch. The vulnera...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/exploitation/Exploit-Jenkins.ps1
Exploit-Jenkins.ps1
function Exploit-Jenkins() { <# .SYNOPSIS PowerShell delivery for unauthenticated access to Jenkins Script Console .PARAMETER Rhost. Host to exploit .PARAMETER Port Port to use. .PARAMETER Cmd Command to run on remote Jenkins Script Console ...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/recon/HTTP-Login.ps1
HTTP-Login.ps1
function Invoke-ThreadedFunction { [CmdletBinding()] param ( [Parameter(Position = 0, Mandatory = $True)] [String[]]$ComputerName, [Parameter(Position = 1, Mandatory = $True)] [System.Management.Automation.ScriptBlock]$ScriptBlock, [Parameter(Position = 2)] ...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/recon/Find-Fruit.ps1
Find-Fruit.ps1
function Invoke-ThreadedFunction { [CmdletBinding()] param ( [Parameter(Position = 0, Mandatory = $True)] [String[]]$ComputerName, [Parameter(Position = 1, Mandatory = $True)] [System.Management.Automation.ScriptBlock]$ScriptBlock, [Parameter(Position = 2)] ...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/exfil/Invoke-EgressCheck.ps1
Invoke-EgressCheck.ps1
<# This module aims to offer the ability to generate arbitrary traffic on the ports specified, using the protocol specified. Author: Stuart Morgan (@ukstufus) Web: https://github.com/stufus #> function Invoke-EgressCheck { <# .SYNOPSIS Generates arbitrary traffic on the ports specified, using th...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/exfil/Invoke-PostExfil.ps1
Invoke-PostExfil.ps1
Invoke-PostExfil { <# .SYNOPSIS Compresses a target folder, breaks it into chunks, and exfils the parts to a web server. .PARAMETER Folder Folder of files to exfil. .PARAMETER Server Server path to exfil to. #> function split($inFile, $outPrefix, [Int32] $bufSize){ ...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/credentials/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/DolpheusLabs_PowerShell-Empire/data/module_source/credentials/Invoke-PowerDump.ps1
Invoke-PowerDump.ps1
# Pulled from darkoperator's Posh-SecMod: # https://github.com/darkoperator/Posh-SecMod/blob/master/PostExploitation/PostExploitation.psm1 function Invoke-PowerDump { <# .SYNOPSIS Dumps hashes from the local system. Note: administrative privileges required. .DESCRIPTION Generate a command for ...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/credentials/dumpCredStore.ps1
dumpCredStore.ps1
<# This modules is a modified and stripped down version of CredMan.ps1, written by "JimmyJoeBob Alooba". A link to the original script can be found below. BeetleChunks has modified and stripped this script to work in Powershell Empire. Original Script: https://gallery.technet.microsoft.com/scriptcenter/PowerShe...
PowerShellCorpus/Github/DolpheusLabs_PowerShell-Empire/data/module_source/credentials/Invoke-DCSync.ps1
Invoke-DCSync.ps1
function Invoke-DCSync { <# .SYNOPSIS Uses dcsync from mimikatz to collect NTLM hashes from the domain. Author: @monoxgas Improved by: @harmj0y Invoke-ReflectivePEInjection Author: Joe Bialek, Twitter: @JosephBialek License: BSD 3-Clause Mimikatz Author: Benjamin DELPY `gentilkiwi`. Blog: http://blog....