full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/Sunil6568_WCF_Demo/packages/jQuery.UI.Combined.1.8.24/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) if ($scriptsFolderProjectItem -eq $null) { # No Scripts folder Write-Host "No Scripts folder found" exit } # Update the _references.js file AddOrUpdate-Reference $scriptsFolderProjectItem $juiFileNameRegEx ...
PowerShellCorpus/Github/Sunil6568_WCF_Demo/packages/jQuery.UI.Combined.1.8.24/Tools/common.ps1
common.ps1
function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) { try { $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") } catch { # _references.js file not found return } if ($referencesFileProject...
PowerShellCorpus/Github/Sunil6568_WCF_Demo/packages/jQuery.1.8.2/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Determine the file paths $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName if (Test-Path $projectIntelliSense...
PowerShellCorpus/Github/Sunil6568_WCF_Demo/packages/jQuery.1.8.2/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # VS 11 and above supports the new intellisense JS files $vsVersion = [System.Version]::Parse($dte.Version) $supportsJsIntelliSenseFile = $vsVersion.Major -ge 11 if (-not $supportsJsIntelliSenseFile) { $displayVersio...
PowerShellCorpus/Github/Sunil6568_WCF_Demo/packages/jQuery.1.8.2/Tools/common.ps1
common.ps1
function Get-Checksum($file) { $cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider" $fileInfo = Get-Item $file trap { ; continue } $stream = $fileInfo.OpenRead() if ($? -eq $false) { # Couldn't open file for reading return $null } $bytes = $...
PowerShellCorpus/Github/Arno0x_PowerShellScripts/proxyMeterpreterHideout.ps1
proxyMeterpreterHideout.ps1
<# .SYNOPSIS Client side script for a meterpreter stage download obfuscation technique for a reverse_winhttp payload. Beware it does *NOT* work with the reverse_winhttpS payload. Author: Arno0x0x (https://twitter.com/Arno0x0x) License: GPL3 Required Dependencies: None Optional Dependencies: None .DESCRIP...
PowerShellCorpus/Github/Arno0x_PowerShellScripts/Invoke-SendReverseShell.ps1
Invoke-SendReverseShell.ps1
function Invoke-SendReverseShell { <# .SYNOPSIS Sends a reverse shell (cmd.exe) to a remote host. The remote host simply has to listen on a TCP socket, for example: - With netcat: # nc -l -p <any_port> - With socat: # socat TCP-L:<any_port>,fork,reuseaddr - The connection ...
PowerShellCorpus/Github/Arno0x_PowerShellScripts/proxyTunnel.ps1
proxyTunnel.ps1
<# .SYNOPSIS Creates a TCP Tunnel through the default system proxy. As such, it automatically handles proxy authentication if ever required. Author: Arno0x0x (https://twitter.com/Arno0x0x) License: GPL3 Required Dependencies: None Optional Dependencies: None .DESCRIPTION Creates a TCP Tunnel through the...
PowerShellCorpus/Github/Zeinad_random-posh/Restore-SqlDbDiffMove.ps1
Restore-SqlDbDiffMove.ps1
[string]$RestoreServer='your_RestoreServer' [string]$DatabaseName='your_databasename' [string]$BackupFileFull='your_filepathandname' #Optional: [string]$BackupFileDiff='' [string]$DataFileDirectory='' [string]$LogFileDirectory='' function Restore-SqlDbDiffMove { <# .SYNOPSIS Restore a ...
PowerShellCorpus/Github/drpong2_PoSH-tools/NewADUser.ps1
NewADUser.ps1
##Check the profile.ps1 file on my Github/Powershell folder and put it in your respective C:\users\username\my documents\windowspowershell\ folder to export the vcard for Outlook## ## This section prompts you for your Office 365 administrator credentials## #Without 2FA authentication enabled uncomment this sect...
PowerShellCorpus/Github/drpong2_PoSH-tools/profile.ps1
profile.ps1
#Put this file under your C:\users\username\my documents\windowspowershell\ folder function prompt { # New nice WindowTitle $Host.UI.RawUI.WindowTitle = "PowerShell v" + (get-host).Version.Major + "." + (get-host).Version.Minor + " (" + $pwd.Provider.Name + ") " + $pwd.Path # Admin ? if( ( ...
PowerShellCorpus/Github/drpong2_PoSH-tools/EmployeeLeft.ps1
EmployeeLeft.ps1
##Employee left company. Reset's password, converts mailbox to shared, add's supervisor to shared mailbox, syncs AD/O365, and removes licenses.## $UserCredential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credenti...
PowerShellCorpus/Github/drpong2_PoSH-tools/MailboxSizes-Individual.ps1
MailboxSizes-Individual.ps1
##For getting mailbox sizes for individuals in your Office 365 environment.## $UserCredential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-PS...
PowerShellCorpus/Github/drpong2_PoSH-tools/Autodiscover.ps1
Autodiscover.ps1
##to see your environment's AutoDiscover settings used for Outlook. Useful for when migrating from Exchange to Office 365. $obj = @() $ADDomain = Get-ADDomain | Select DistinguishedName $DSSearch = New-Object System.DirectoryServices.DirectorySearcher $DSSearch.Filter = '(&(objectClass=serviceConnectionPoint)...
PowerShellCorpus/Github/drpong2_PoSH-tools/NewNutanixVM.ps1
NewNutanixVM.ps1
##For creating a new VM on your Nutanix cluster $server = read-Host 'Server' $un = read-Host 'Username:' $PlainPassword = Read-Host 'Password:' $pw = $PlainPassword | ConvertTo-SecureString -AsPlainText -Force Connect-NutanixCluster -Server $server -UserName $un -Password $pw -AcceptInvalidSSLCerts $Name ...
PowerShellCorpus/Github/drpong2_PoSH-tools/ReclaimWindows10.ps1
ReclaimWindows10.ps1
# Ask for elevated permissions if required If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]"Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs ...
PowerShellCorpus/Github/rsmith7712_Get-DNSScavengingData/git-Get-DNSScavengingData.ps1
git-Get-DNSScavengingData.ps1
<# .NOTES =========================================================================== Created with: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.127 Created on: September 20, 2016 Created by: Richard Smith, GSweet Organization: Savers, Inc. Filename: git-Get-DNSScavengingData....
PowerShellCorpus/Github/OPSTest_E2E_Provision_1487759195811/.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/nerbix_Invoke-FTPUpload/Invoke-FTPUpload.ps1
Invoke-FTPUpload.ps1
function Invoke-FTPUpload { param ([string] $dir, [string] $user, [string] $server, [string] $password) #ftp server $webclient = New-Object System.Net.WebClient $webclient.Credentials = New-Object System.Net.NetworkCredential($user,$password) Foreach($item in (dir $dir)){ "Uploading $it...
PowerShellCorpus/Github/mrsnaik_KPMG/KPMG/KPMG.TaxCalculator/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/mrsnaik_KPMG/KPMG/KPMG.TaxCalculator/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/mrsnaik_KPMG/KPMG/KPMG.TaxCalculator/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/mrsnaik_KPMG/KPMG/KPMG.TaxCalculator/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/mrsnaik_KPMG/KPMG/KPMG.TaxCalculator/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/mrsnaik_KPMG/KPMG/KPMG.TaxCalculator/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/mrsnaik_KPMG/KPMG/KPMG.TaxCalculator/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/mrsnaik_KPMG/KPMG/KPMG.TaxCalculator/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/mrsnaik_KPMG/KPMG/KPMG.TaxCalculator/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/mrsnaik_KPMG/KPMG/KPMG.TaxCalculator/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/mrsnaik_KPMG/KPMG/KPMG.TaxCalculator/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/NicolaMarchi_Scripts/ClusterSettings.ps1
ClusterSettings.ps1
#Restituisce i Valori configurati $cluster=Get-Cluster -Name sqlmossprclu Write-Host $cluster.name Write-Host 'Valori configurati prima della modifica:' get-cluster -Name SQLMRPR02CLU | fl *subnet* $cluster.SameSubnetDelay = 2000 $cluster.CrossSubnetThreshold = 10 $cluster.CrossSubnetDelay = 2000 $cluster.SameS...
PowerShellCorpus/Github/fiberghost_HDDSpaceChecker/HDDChecker.ps1
HDDChecker.ps1
<# This is a simple tool for checking HDD Space on network machines Thanks for Manas Bhardwaj who wrote this: http://bit.ly/HDDSpaceCheckPowerShell Feel free to use it as you want :) . #> $ServerName = Get-Content "Computers.txt" $ConvertToGB = (1024 * 1024 * 1024) cls " _ _ ____ ___...
PowerShellCorpus/Github/timothek_chocolatey-emclient/update.ps1
update.ps1
import-module au $releases = 'http://www.emclient.com/release-history' function global:au_SearchReplace { @{ 'tools\chocolateyInstall.ps1' = @{ "(^[$]url\s*=\s*)('.*')" = "`$1'$($Latest.URL32)'" "(^[$]checksum\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'" } ...
PowerShellCorpus/Github/timothek_chocolatey-emclient/tools/chocolateyinstall.ps1
chocolateyinstall.ps1
$packageName = 'em-client' $fileType = 'MSI' $url = 'http://www.emclient.com/dist/v7.0.28822/setup.msi' $silentArgs = "/qn /norestart" $validExitCodes = @(0, 3010, 1641) $checksum = '7ae638d2871c62b59c7271ccc142a95269dec060ea11a3f58d8c9f1f0eadee43' $packageArgs = @{ packageName = $packageNam...
PowerShellCorpus/Github/brightcohen_VSOCommunityTasks/Source/ReadOnly/RemoveReadOnly.ps1
RemoveReadOnly.ps1
[CmdletBinding(DefaultParameterSetName = 'None')] param( [string][Parameter(Mandatory=$true)][ValidateNotNullOrEmpty()] $sourcePath, [string] $debugOutput) Write-Verbose -Verbose "Starting Read Only removal step" Write-Verbose -Verbose "sourcePath = $sourcePath" Write-Verbose -Verbose "debugOutput = $debug...
PowerShellCorpus/Github/jmatcuk_WtvToDvr-MS/ConvertWtvToDvr-MS.ps1
ConvertWtvToDvr-MS.ps1
###################################################### ## Description ## ###################################################### # This script will loop through all discovered *.wtv # # in a location where recorded tv is stored. Any # # file that has not been touched in the ...
PowerShellCorpus/Github/jmatcuk_WtvToDvr-MS/ConvertAllWtvToDvr-MS.ps1
ConvertAllWtvToDvr-MS.ps1
<# ################################################### ## Configuration Variables ## ################################################### #> <# $DebugPreference = "Continue" PowerShell will show the debug message. $DebugPreference = "SilentlyContinue" PowerShell will not show the message....
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_NewRepo_2017_4_27_28_58_35/.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/roscoejp_powershell-scripts/Write-AzureAclRules.ps1
Write-AzureAclRules.ps1
function Write-AzureAclRules { #progress bar Write-Progress -Activity "Get-AzureACLRules" -Status "Gathering VMs" -PercentComplete 1 #get All VMs $VMList = Get-AzureVM #get VM count $VMListCount = $VMList.Count #traverse VMs For($i=0; $i -lt $VMListCount;$i++) { ...
PowerShellCorpus/Github/roscoejp_powershell-scripts/Set-Attribute.ps1
Set-Attribute.ps1
function Set-Attribute { param( [Parameter(Mandatory=$True)] [string]$RelativeConfigPath, [Parameter(Mandatory=$True)] [string]$XPathQuery, [Parameter(Mandatory=$True)] [string]$AttributeName, [Parameter(Mandatory=$True)] [string]$NewValue, [Parameter(Mandatory=$False)] [bool]$SingleNo...
PowerShellCorpus/Github/fenxu_fenxu_2016050_docs.fr-fr/.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 ur...
PowerShellCorpus/Github/utsysadmin_powershell/activedirectory/disable-users.ps1
disable-users.ps1
################################################################### # disable-users.ps1 # # By Chad Shaw 09/24/15 # # Checks for user accounts and prompts to disable them # # Usage: .\disable-users.ps1 "John Doe", "...
PowerShellCorpus/Github/utsysadmin_powershell/hyperv/find-vm.ps1
find-vm.ps1
################################################################### # find-vm.ps1 # # By Chad Shaw 10/10/16 # # Find Hyper-V VM(s) # # Usage: .\find-vm.ps1 se-app2,sw-app2 ...
PowerShellCorpus/Github/utsysadmin_powershell/hyperv/migrate-vm.ps1
migrate-vm.ps1
################################################################### # vm-migrate.ps1 # # By Chad Shaw 10/03/16 # # Hyper-V Live Migration Utility # # Usage: .\vm-migrate.ps1 or .\vm-migrate ...
PowerShellCorpus/Github/utsysadmin_powershell/servers/csvservers.ps1
csvservers.ps1
################################################################### # CSVServers.ps1 # # By Chad Shaw 11/26/14 # # Gathers MWI info about computer passed from ImportServers.csv # # Usage: .\CSVServers.ps1 ...
PowerShellCorpus/Github/utsysadmin_powershell/servers/get-server.ps1
get-server.ps1
################################################################### # Get-Server.ps1 # # By Chad Shaw 12/17/14 # # Gathers MWI info about computer passed from CLI # # Usage: .\Get-Server.ps1 computername ...
PowerShellCorpus/Github/apapiccio_Office365/Load-ExchangeOnline.TempPoint.ps1
Load-ExchangeOnline.TempPoint.ps1
function AccessOffice365 { $Credential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection }
PowerShellCorpus/Github/apapiccio_Office365/Load-ExchangeOnlineRuggero.ps1
Load-ExchangeOnlineRuggero.ps1
function Load-ExchangeOnlineRuggero { $UserName = "angelo@papiccio.com" $SecurePwdFilePath = "C:\temp\SecRug.txt" $AESKeyFilePath = "C:\temp\AesRug.txt" $AESKey = Get-Content $AESKeyFilePath $pwdTxt = Get-Content $SecurePwdFilePath $securePwd = $pwdTxt | ConvertTo-SecureString -Key $AESKey $credO...
PowerShellCorpus/Github/apapiccio_Office365/ProvisionUserOneDrive.ps1
ProvisionUserOneDrive.ps1
<# .NOTES =========================================================================== Created with: SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.136 Created on: 21/03/2017 10:21 AM Created by: Papicc0a Organization: RACWA Filename: ProvisionOneDriveUser.ps1 =================...
PowerShellCorpus/Github/apapiccio_Office365/Load-ExchangeOnlinePapiccio.ps1
Load-ExchangeOnlinePapiccio.ps1
function Load-ExchangeOnlinePapiccio { $UserName = "angelo@papiccio.com" $SecurePwdFilePath = "C:\temp\SecPap.txt" $AESKeyFilePath = "C:\temp\AesPap.txt" $AESKey = Get-Content $AESKeyFilePath $pwdTxt = Get-Content $SecurePwdFilePath $securePwd = $pwdTxt | ConvertTo-SecureString -Key $AESKey $cred...
PowerShellCorpus/Github/apapiccio_Office365/Access-Office365.ps1
Access-Office365.ps1
function AccessOffice365 { $Credential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection }
PowerShellCorpus/Github/apapiccio_Office365/Load-ExchangeOnline.ps1
Load-ExchangeOnline.ps1
function Load-ExchangeOnlinePapiccio { $UserName = "angelo@papiccio.com" $SecurePwdFilePath = "C:\temp\SecPap.txt" $AESKeyFilePath = "C:\temp\AesPap.txt" $AESKey = Get-Content $AESKeyFilePath $pwdTxt = Get-Content $SecurePwdFilePath $securePwd = $pwdTxt | ConvertTo-SecureString -Key $AESKey $cred...
PowerShellCorpus/Github/apapiccio_Office365/Create-AESPasswordFiles.ps1
Create-AESPasswordFiles.ps1
<# .NOTES =========================================================================== Created on: 28/03/2017 4:22 PM Created by: Angelo Papiccio Organization: RACWA Filename: Create-AESPasswordFiles.ps1 =========================================================================== .DESCRIP...
PowerShellCorpus/Github/apapiccio_Office365/OneDrive-QuotaSet.ps1
OneDrive-QuotaSet.ps1
<# .NOTES =========================================================================== Created with: SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.136 Created on: 24/03/2017 2:33 PM Created by: Papicc0a Organization: RACWA Filename: OneDrive-QuotaSet.ps1 ======================...
PowerShellCorpus/Github/mnshaabani_sspocs/ProteinTrackerServiceDemo/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/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/mnshaabani_sspocs/ProteinTrackerServiceDemo/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/tools/install.ps1
install.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' $projectRoot = $project.Properties.Item('FullPath').Value $binDirectory...
PowerShellCorpus/Github/parassachapara_GITRIPO/webapi/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/parassachapara_GITRIPO/webapi/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/parassachapara_GITRIPO/webapi/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/parassachapara_GITRIPO/webapi/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/parassachapara_GITRIPO/webapi/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/parassachapara_GITRIPO/webapi/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/parassachapara_GITRIPO/apiangular/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/parassachapara_GITRIPO/apiangular/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/parassachapara_GITRIPO/apiangular/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/parassachapara_GITRIPO/Sample/packages/Newtonsoft.Json.8.0.3/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # open json.net splash page on package install # don't open if json.net is installed as a dependency try { $url = "http://www.newtonsoft.com/json/install?version=" + $package.Version $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) if ($dte2.ActiveWindo...
PowerShellCorpus/Github/parassachapara_GITRIPO/Sample/packages/WebGrease.1.5.2/tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Visual Studio execution done via NuGet Package Manager Function VSExecution($toolsPath, $project) { $project.DTE.ExecuteCommand("File.SaveAll", [system.string]::Empty) # Get the msbuild version of the project and add the import $msbuild = [Microsof...
PowerShellCorpus/Github/parassachapara_GITRIPO/Sample/packages/WebGrease.1.5.2/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # Return a relative path with reference to root as Uri object # $rootPath - root path # $relativePath - relative path # $appendToRelativePath - Optional parameter. If provided will be appended to relative Path using Path.Combine() Function GetRelativeUri($root...
PowerShellCorpus/Github/parassachapara_GITRIPO/Sample/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/parassachapara_GITRIPO/Sample/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/parassachapara_GITRIPO/Sample/packages/EntityFramework.6.1.2/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 # MIIa2AYJKoZIhvcNAQcCoIIayTCCGsUCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQ...
PowerShellCorpus/Github/parassachapara_GITRIPO/Sample/packages/EntityFramework.6.1.2/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/rchaganti_DSCResources/cHyper-V/Examples/SwitchEmbeddedTeamingWithHostNetworkAdapter/SETTeamWithHostNetworkAdapters.Example.ps1
SETTeamWithHostNetworkAdapters.Example.ps1
Configuration SETTeam { param ( [String] $SwitchName, [String[]] $NetAdapterName, [Int] $ManagementVlan, [Int] $ManagementBandwidthWeight, [String] $ClusterAdapterName, [Int] $ClusterVlan, [Int] $ClusterBandwidthWeight, [String] $LiveMigratio...
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cVMSwitch/PrivateSwitch.Example.ps1
PrivateSwitch.Example.ps1
Configuration PrivateSwitch { Import-DscResource -ModuleName cHyper-V -Name cVMSwitch Import-DscResource -ModuleName PSDesiredStateConfiguration cVMSwitch HostSwitch { Name = 'HostSwitch' Type = 'Private' Ensure = 'Present' } }
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cVMSwitch/SETTeamSwitch.Example.ps1
SETTeamSwitch.Example.ps1
Configuration SETTeamSwitch { Import-DscResource -ModuleName cHyper-V -Name cVMSwitch Import-DscResource -ModuleName PSDesiredStateConfiguration cVMSwitch HostSwitch { Name = 'HostSwitch' Type = 'External' AllowManagementOS = $true MinimumBandwidthMode = 'Weight' ...
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cVMSwitch/HostTeamSwitch.Example.ps1
HostTeamSwitch.Example.ps1
Configuration SimpleHostTeamvSwitch { Import-DscResource -ModuleName cHyper-V -Name cVMSwitch Import-DscResource -ModuleName PSDesiredStateConfiguration cVMSwitch HostSwitch { Name = 'HostSwitch' Type = 'External' AllowManagementOS = $true MinimumBandwidthMode = 'We...
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cVMSwitch/InternalSwitch.Example.ps1
InternalSwitch.Example.ps1
Configuration InternalSwitch { Import-DscResource -ModuleName cHyper-V -Name cVMSwitch Import-DscResource -ModuleName PSDesiredStateConfiguration cVMSwitch HostSwitch { Name = 'HostSwitch' Type = 'Internal' Ensure = 'Present' } }
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cVMSwitch/NetAdapterSwitch.Example.ps1
NetAdapterSwitch.Example.ps1
Configuration SimpleNetAdaptervSwitch { Import-DscResource -ModuleName cHyper-V -Name cVMSwitch Import-DscResource -ModuleName PSDesiredStateConfiguration cVMSwitch HostSwitch { Name = 'HostSwitch' Type = 'External' AllowManagementOS = $true NetAdapterName = 'NIC1' ...
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cWaitForVMIntegrationComponent/WaitForIntegrationComponentDefault.Example.ps1
WaitForIntegrationComponentDefault.Example.ps1
Configuration WaitForIC { Import-DscResource -Name cWaitForVMGuestIntegration -ModuleName cHyper-V cWaitForVMGuestIntegration VM01 { Id = 'VM01-IC01' VMName = 'VM01' } }
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cWaitForVMIntegrationComponent/WaitForIntegrationComponentCustom.Example.ps1
WaitForIntegrationComponentCustom.Example.ps1
Configuration WaitForIC { Import-DscResource -Name cWaitForVMGuestIntegration -ModuleName cHyper-V cWaitForVMGuestIntegration VM01 { Id = 'VM01-IC01' VMName = 'VM01' RetryIntervalSec = 20 RetryCount = 10 } }
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cVMIPAddress/ResetIPAddress.Example.ps1
ResetIPAddress.Example.ps1
Configuration VMIPAddress { Import-DscResource -ModuleName cHyper-V -Name cVMIPAddress Import-DscResource -ModuleName PSDesiredStateConfiguration cVMIPAddress VMAdapter1IPAddress { Id = 'VMMgmt-NIC' NetAdapterName = 'VMMgmt-NIC' VMName = 'SQLVM01' IPAddress = 'DHCP'...
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cVMIPAddress/SetIPAddress.Example.ps1
SetIPAddress.Example.ps1
Configuration VMIPAddress { Import-DscResource -ModuleName cHyper-V -Name cVMIPAddress Import-DscResource -ModuleName PSDesiredStateConfiguration cVMIPAddress VMAdapter1IPAddress { Id = 'VMMgmt-NIC' NetAdapterName = 'VMMgmt-NIC' VMName = 'SQLVM01' IPAddress = '172.1...
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cVMNetworkAdapter/CreateVMNetworkAdapterMultipleVM.Example.ps1
CreateVMNetworkAdapterMultipleVM.Example.ps1
Configuration VMAdapter { Import-DscResource -ModuleName cHyper-V -Name cVMNetworkAdapter Import-DscResource -ModuleName PSDesiredStateConfiguration cVMNetworkAdapter MyVM01NIC { Id = 'MyVM01-NIC' Name = 'MyVM01-NIC' SwitchName = 'SETSwitch' VMName = 'MyVM01' ...
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cVMNetworkAdapter/CreateVMNetworkAdapterManagementOS.Example.ps1
CreateVMNetworkAdapterManagementOS.Example.ps1
Configuration HostOSAdapter { Import-DscResource -ModuleName cHyper-V -Name cVMNetworkAdapter Import-DscResource -ModuleName PSDesiredStateConfiguration cVMNetworkAdapter HostOSAdapter { Id = 'Management-NIC' Name = 'Management-NIC' SwitchName = 'SETSwitch' VMName =...
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cVMNetworkAdapter/CreateVMNetworkAdapterMultipleVMMACAddress.Example.ps1
CreateVMNetworkAdapterMultipleVMMACAddress.Example.ps1
Configuration VMAdapter { Import-DscResource -ModuleName cHyper-V -Name cVMNetworkAdapter Import-DscResource -ModuleName PSDesiredStateConfiguration cVMNetworkAdapter MyVM01NIC { Id = 'MyVM01-NIC' Name = 'MyVM01-NIC' SwitchName = 'SETSwitch' MacAddress = '001523be0c...
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cVMNetworkAdapter/CreateVMNetworkAdapterMultipleManagementOS.Example.ps1
CreateVMNetworkAdapterMultipleManagementOS.Example.ps1
Configuration HostOSAdapter { Import-DscResource -ModuleName cHyper-V -Name cVMNetworkAdapter Import-DscResource -ModuleName PSDesiredStateConfiguration cVMNetworkAdapter ManagementAdapter { Id = 'Management-NIC' Name = 'Management-NIC' SwitchName = 'SETSwitch' VMNa...
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cVMNetworkAdapterVlan/VMNetworkAdapterVlanManagementOS.Example.ps1
VMNetworkAdapterVlanManagementOS.Example.ps1
Configuration HostOSAdapterVlan { Import-DscResource -ModuleName cHyper-V -Name cVMNetworkAdapterVlan Import-DscResource -ModuleName PSDesiredStateConfiguration cVMNetworkAdapterVlan HostOSAdapterVlan { Id = 'Management-NIC' Name = 'Management-NIC' VMName = 'ManagementOS' ...
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cVMNetworkAdapterVlan/VMNetworkAdapterVlanMultipleVM.Example.ps1
VMNetworkAdapterVlanMultipleVM.Example.ps1
Configuration HostOSAdapterVlan { Import-DscResource -ModuleName cHyper-V -Name cVMNetworkAdapterVlan Import-DscResource -ModuleName PSDesiredStateConfiguration cVMNetworkAdapterVlan VMMgmtAdapterVlan { Id = 'VMManagement-NIC' Name = 'VMManagement-NIC' VMName = 'SQLVM01' ...
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cVMNetworkAdapterVlan/VMNetworkAdapterVlanMultipleManagementOS.Example.ps1
VMNetworkAdapterVlanMultipleManagementOS.Example.ps1
Configuration HostOSAdapterVlan { Import-DscResource -ModuleName cHyper-V -Name cVMNetworkAdapterVlan Import-DscResource -ModuleName PSDesiredStateConfiguration cVMNetworkAdapterVlan HostOSAdapterVlan { Id = 'Management-NIC' Name = 'Management-NIC' VMName = 'ManagementOS' ...
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cVMNetworkAdapterSettings/VMNetworkAdapterSettingsVMMultiple.Example.ps1
VMNetworkAdapterSettingsVMMultiple.Example.ps1
Configuration VMAdapterSettings { Import-DscResource -ModuleName cHyper-V -Name cVMNetworkAdapterSettings Import-DscResource -ModuleName PSDesiredStateConfiguration cVMNetworkAdapterSettings VMAdapterSettings01 { Id = 'Management-NIC' Name = 'Management-NIC' VMName = 'DHCPVM...
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cVMNetworkAdapterSettings/VMNetworkAdapterSettingsVMSimple.Example.ps1
VMNetworkAdapterSettingsVMSimple.Example.ps1
Configuration VMAdapterSettings { Import-DscResource -ModuleName cHyper-V -Name cVMNetworkAdapterSettings Import-DscResource -ModuleName PSDesiredStateConfiguration cVMNetworkAdapterSettings VMAdapterSettings { Id = 'Management-NIC' Name = 'Management-NIC' VMName = 'DHCPVM01...
PowerShellCorpus/Github/rchaganti_DSCResources/cHyper-V/Examples/Resources/cVMNetworkAdapterSettings/VMNetworkAdapterSettingsManagementOS.Example.ps1
VMNetworkAdapterSettingsManagementOS.Example.ps1
Configuration HostOSAdapterSettings { Import-DscResource -ModuleName cHyper-V -Name cVMNetworkAdapterSettings Import-DscResource -ModuleName PSDesiredStateConfiguration cVMNetworkAdapterSettings HostOSAdapterSettings { Id = 'Management-NIC' Name = 'Management-NIC' VMName = '...
PowerShellCorpus/Github/il-davidlurth_NewRelicDeployment/createNRDeployment.ps1
createNRDeployment.ps1
$ErrorActionPreference = "Continue" $service = $OctopusParameters['Octopus.Project.Name'] -split ' ' $application_id = $OctopusParameters['NewRelic.' + $service[0] + '.application_id'] $API_key = $OctopusParameters['NewRelic.ApiKey'] $revision = $OctopusParameters['Octopus.Release.Number'] $changelog = "changelo...
PowerShellCorpus/Github/ASOS_OctopusStepTemplates/StepTemplates/iis-set-authentication.steptemplate.tests.ps1
iis-set-authentication.steptemplate.tests.ps1
$sut = "iis-set-authentication.steptemplate.ps1" . "$PSScriptRoot\$sut" Describe 'IIS - Sets Desired Authentication State' { $AnonymousAuth = "True" $WindowsAuth = "False" $DigestAuth = "False" $IISSitePaths = "Default Web Site/MockApp" #WebAdministration module must be installed to run t...
PowerShellCorpus/Github/ASOS_OctopusStepTemplates/StepTemplates/iis-set-authentication.steptemplate.ps1
iis-set-authentication.steptemplate.ps1
#requires -version 3 $StepTemplateName = "IIS - Enable or Disable Authentication Methods" $StepTemplateDescription = "Step template to set the desired IIS Authentication (Anonymous, Windows, Digest) State for IIS site(s)" $StepTemplateParameters = @( @{ "Name" = "AnonymousAuth"; "Label" = "A...
PowerShellCorpus/Github/Linuturk_webpagetest/webpagetest/powershell/Set-InstallDummyNet.ps1
Set-InstallDummyNet.ps1
$testsigning = bcdedit | Select-String -pattern "testsigning Yes" if ($testsigning) { Write-Output "changed=no comment='Test Signing Already Enabled.'" } Else { bcdedit /set TESTSIGNING ON Write-Output "changed=yes comment='Test Signing Enabled.'" } $Interface = Get-NetAdapter -Name pub* $...
PowerShellCorpus/Github/Linuturk_webpagetest/webpagetest/powershell/Set-DisableServerManager.ps1
Set-DisableServerManager.ps1
$CurrentState = Get-ScheduledTask -TaskName "ServerManager" If ($CurrentState.State -eq "Ready") { Get-ScheduledTask -TaskName "ServerManager" | Disable-ScheduledTask Write-Output "changed=yes comment='Server Manager disabled at logon.'" } Else { Write-Output "changed=no comment='Server Manager already dis...
PowerShellCorpus/Github/Linuturk_webpagetest/webpagetest/powershell/Set-MonitorTimeout.ps1
Set-MonitorTimeout.ps1
$CurrentVal = POWERCFG /QUERY SCHEME_BALANCED SUB_VIDEO VIDEOIDLE | Select-String -pattern "Current AC Power Setting Index:" If ($CurrentVal -like "*0x00000000*") { Write-Output "changed=no comment='Display Timeout already set to Never.'" } Else { POWERCFG /CHANGE -monitor-timeout-ac 0 Write-Output "change...
PowerShellCorpus/Github/Linuturk_webpagetest/webpagetest/powershell/Set-ClosePort445.ps1
Set-ClosePort445.ps1
$CurrentVal = Get-NetFirewallRule -DisplayName SaltBootstrap if ($CurrentVal.Enabled -eq "True") { Disable-NetFirewallRule -DisplayName SaltBootstrap Write-Output "changed=yes comment='Port 445 Disabled.'" } Else { Write-Output "changed=no comment='Port 445 Already Disabled.'" }
PowerShellCorpus/Github/Linuturk_webpagetest/webpagetest/powershell/Set-InstallAviSynth.ps1
Set-InstallAviSynth.ps1
$InstallDir = "{{ pillar['webpagetest']['win']['install_dir'] }}" $Installed = Test-Path "C:\Program Files (x86)\AviSynth 2.5" -pathType container If ($Installed) { Write-Output "changed=no comment='AviSynth already installed.'" } Else { & "$InstallDir\agent\Avisynth_258.exe" /S Write-Output "changed=ye...