full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/tdashroy_dev/install/vim-plug.ps1
vim-plug.ps1
# Install vim-plug # Create autoload directory $output = [System.IO.Path]::GetFullPath((Join-Path (Resolve-Path ~) "\vimfiles\autoload")) $null = New-Item $output -Type Directory -Force -ErrorAction Stop # Download vim-plug to autoload directory $url = "https://raw.githubusercontent.com/junegunn/vim-plug/mast...
PowerShellCorpus/Github/tdashroy_dev/powershell/profile.ps1
profile.ps1
$dot = Split-Path $MyInvocation.MyCommand.Path . $dot\console\colors.ps1 . $dot\modules\posh-git.ps1 . $dot\console\prompt.ps1 . $dot\functions\colors.ps1 . $dot\functions\cd.ps1 . $dot\aliases\cd.ps1 # Local powershell profile, for machine specific settings $lprofile = "$dot\lprofile.ps1" if (Test-Path $l...
PowerShellCorpus/Github/tdashroy_dev/powershell/modules/posh-git.ps1
posh-git.ps1
Import-Module posh-git
PowerShellCorpus/Github/tdashroy_dev/powershell/console/colors.ps1
colors.ps1
$host.UI.RawUI.ForegroundColor = "White"; $host.UI.RawUI.BackgroundColor = "Black"; # Reset token colors. # Note: for some reason this needs to go after changing the colors.. Set-PSReadlineOption -ResetTokenColors; Clear-Host;
PowerShellCorpus/Github/tdashroy_dev/powershell/console/prompt.ps1
prompt.ps1
function global:prompt { $origLastExitCode = $LASTEXITCODE # git status, requires posh-git Write-VcsStatus $curPath = $ExecutionContext.SessionState.Path.CurrentLocation.Path if ($curPath.ToLower().StartsWith($Home.ToLower())) { $curPath = "~" + $curPath.SubString($Home.Length...
PowerShellCorpus/Github/tdashroy_dev/powershell/aliases/cd.ps1
cd.ps1
Set-Alias -Name cd -value cddash -Option AllScope
PowerShellCorpus/Github/tdashroy_dev/powershell/functions/cd.ps1
cd.ps1
function cddash { if ($args.Length -eq 1 -and $args[0] -eq '-') { $args[0] = $OLDPWD; } $tmp = $pwd; Set-Location @args; if ($pwd.Path -ne $tmp.Path) { Set-Variable -Name OLDPWD -Value $tmp -Scope global; } }
PowerShellCorpus/Github/tdashroy_dev/powershell/functions/colors.ps1
colors.ps1
Function Get-ConsoleColor { Param([switch]$Colorize) $wsh = New-Object -ComObject wscript.shell; $data = [enum]::GetNames([consolecolor]); if ($Colorize) { Foreach ($color in $data) { Write-Host $color -ForegroundColor $Color; } [void]$wsh.Popup("The cu...
PowerShellCorpus/Github/sadovnikovav1_SARepo/WebApplication1/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/sadovnikovav1_SARepo/WebApplication1/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/sadovnikovav1_SARepo/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/sadovnikovav1_SARepo/WebApplication1/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/sadovnikovav1_SARepo/WebApplication1/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/trevorbryant_Windows-LocalGroup-Audit/ps-groupauth.ps1
ps-groupauth.ps1
$Server = hostname $AuthList = "Administrator", "Trevor", "Test" #GC "C:\temp\authlist" $Configuration = "" # If cmdlet exists, do work If (Get-Command -Name Get-LocalGroupMember -Eq $True -ErrorAction SilentlyContinue) { $Configuration = Get-LocalGroupMember -ComputerName $Server Administrators ...
PowerShellCorpus/Github/amrithyerramilli_HelloWorld/HelloWorld/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/amrithyerramilli_HelloWorld/HelloWorld/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/amrithyerramilli_HelloWorld/HelloWorld/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/amrithyerramilli_HelloWorld/HelloWorld/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/amrithyerramilli_HelloWorld/HelloWorld/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/amrithyerramilli_HelloWorld/HelloWorld/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/amrithyerramilli_HelloWorld/HelloWorld/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/amrithyerramilli_HelloWorld/HelloWorld/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/amrithyerramilli_HelloWorld/HelloWorld/packages/Newtonsoft.Json.6.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://james.newtonking.com/json" $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) if ($dte2.ActiveWindow.Caption -eq "Package Manager Con...
PowerShellCorpus/Github/Zazcallabah_Playlist_Downloader/pldl.ps1
pldl.ps1
<# .Synopsis Downloads and concatenates the files in a playlist. .Parameter href The location of the target playlist. Commonly found as the src argument of the video tag. .Parameter entry The entry in the playlist to download. Usually there are several entries in a playlist, each a different quality. Default i...
PowerShellCorpus/Github/rickertDevel_Scripting/powershell/CreateLinkForCadence.ps1
CreateLinkForCadence.ps1
param( $projectCollectionUrl = "http://srvtfs10at01:8080/tfs/DsiDev/", $projectName = "EtudeDePrix" ) $asm = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.TeamFoundation.Client") if ($asm -ne $nothing) { write-output "Microsoft.TeamFoundation.Client loaded." } $asm = [System.Refle...
PowerShellCorpus/Github/rickertDevel_Scripting/powershell/DestroyDeletedItems.ps1
DestroyDeletedItems.ps1
#$tab = tf dir /recursive /folders /collection:"http://srvmigtfs10at:8080/tfs/Tfs2008PT" "$/Iris v2" | ? { $_ -match "\$[/\w\d\.\s]+/generated"} | %{ ($_ | select-string -pattern '\$[/\w\d\.\s]+').Matches.Value } #$tab | %{ $current = $_ ; tf destroy /startcleanup /collection:"http://srvmigtfs10at:8080/tfs/Tfs2008PT" ...
PowerShellCorpus/Github/rickertDevel_Scripting/powershell/RemoveLinkFromCadence.ps1
RemoveLinkFromCadence.ps1
$asm = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.TeamFoundation.Client") if ($asm -ne $nothing) { write-output "Microsoft.TeamFoundation.Client loaded." } $asm = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.TeamFoundation") if ($asm -ne $nothing) { write-output "Micros...
PowerShellCorpus/Github/rickertDevel_Scripting/powershell/changeProxy.ps1
changeProxy.ps1
param([Parameter(Mandatory=$true)][string] $proxyConfName) $vcfDnsBypassProxy = "<local>;localhost;*.vincic-fr.grpsc.net;*.vinci-construction-france.net" $proxySquid = "172.17.1.16:8080" $proxyOfficiel = "http://proxy-vcf.vincic-fr.grpsc.net/" $proxyHome = "127.0.0.1:3128" $regKey="HKCU:\Software\Microso...
PowerShellCorpus/Github/rickertDevel_Scripting/powershell/getUserName.ps1
getUserName.ps1
# #.SYNOPSIS # This script finds an Active Directory object by GUID. #.DESCRIPTION # This script searches the default (or specified) domain for an AD Object based upon a GUID or GUID’s entered. #.NOTES # File Name : Get-ADObjectByGUID.ps1 # Author : Karl Mitschke # Requires : PowerShell Version 2.0 #.LINK # T...
PowerShellCorpus/Github/rickertDevel_Scripting/powershell/deployment/build.ps1
build.ps1
$currentFolder = $PSScriptRoot Push-Location "$currentFolder" $probeProjectBaseDirectory = "..\..\Server\Sources" $nuspecDirectory = "..\..\Nuspecs" if (Test-Path net35) {Remove-Item -force -Recurse net35} if (Test-Path net40) {Remove-Item -force -Recurse net40} # build .net35 components Write-Host "Buil...
PowerShellCorpus/Github/DilshanR_Powershell/Install_ldap_cert.ps1
Install_ldap_cert.ps1
#Author : Dishan_Rodrigo Ver:1.0 $RunScript = $True # <----- Change to $True to run the script $ServerList = 'c:\users\drodrigo\desktop\ServerListFile.txt' # <--------- change this to a file with the list of desired servers If($RunScript -eq $false){ Write-Host Run Script is Equal to False. Please Change it to '...
PowerShellCorpus/Github/rl6067_SoloProject/SecurityNewsProject/packages/NUnitTestAdapter.WithFramework.2.0.0/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) $asms = $package.AssemblyReferences | %{$_.Name} foreach ($reference in $project.Object.References) { if ($asms -contains $reference.Name + ".dll") { if ($reference.Name -ne "nunit.framework") { $reference.CopyLocal = $false...
PowerShellCorpus/Github/rl6067_SoloProject/SecurityNewsProject/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/rl6067_SoloProject/SecurityNewsProject/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/rl6067_SoloProject/SecurityNewsWebApp/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/rl6067_SoloProject/SecurityNewsWebApp/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/rl6067_SoloProject/SecurityNewsWebApp/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/rl6067_SoloProject/SecurityNewsWebApp/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/rl6067_SoloProject/SecurityNewsWebApp/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/rl6067_SoloProject/SecurityNewsWebApp/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/rl6067_SoloProject/SecurityNewsWebApp/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/rl6067_SoloProject/SecurityNewsWebApp/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/rl6067_SoloProject/SecurityNewsWebApp/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/Bredrick_elastic-demo/beats.ps1
beats.ps1
param ( [Parameter(Mandatory=$true)][string]$type, [string]$version = "5.0.1", [string]$target = "localhost:5044" ) $availableTypes = @("file", "metric") if (!$availableTypes.Contains($type)) { $ofs = ' or ' Write-Host "Wrong type. Allowed only $availableTypes." Exit } $beat = $t...
PowerShellCorpus/Github/Bredrick_elastic-demo/java.ps1
java.ps1
#based on https://skarlso.github.io/2015/06/30/powershell-can-also-be-nice-or-installing-java-silently-and-waiting/ $JRE_VER="8u112" $JRE_FULL_VER="8u112-b15" $JRE_PATH="1.8.0_112" $source64 = "http://download.oracle.com/otn-pub/java/jdk/$JRE_FULL_VER/jre-$JRE_VER-windows-x64.exe" $destination64 = "C:\app\$JRE_V...
PowerShellCorpus/Github/Bredrick_elastic-demo/LogGenerator.ps1
LogGenerator.ps1
param ( [string]$source = "App" ) $levels = @("error", "warning", "info") $file = "C:\app\logs\log-$source.txt" while ($true) { $level = Get-Random -Maximum 3 $message = -join ((65..90) + (97..122) | Get-Random -Count 50 | % {[char]$_}) $time = Get-Date -Format "yyyy-MM-dd HH:mm:ss" ...
PowerShellCorpus/Github/Bredrick_elastic-demo/logstash.ps1
logstash.ps1
param ( [string]$version = "5.0.1", [string]$target = (Test-Connection "$env:computername" -count 1).IPv4Address.IPAddressToString + ":9200" ) $source = "https://artifacts.elastic.co/downloads/logstash/logstash-$version.zip" $destination = "C:\elk" $downloadDest = "$destination\logstash-$version.zip" ...
PowerShellCorpus/Github/Bredrick_elastic-demo/kibana.ps1
kibana.ps1
param ( [string]$version = "5.0.1", [string]$target = (Test-Connection "$env:computername" -count 1).IPv4Address.IPAddressToString + ":9200" ) $source = "https://artifacts.elastic.co/downloads/kibana/kibana-$version-windows-x86.zip" $destination = "C:\elk" $downloadDest = "$destination\kibana-$version....
PowerShellCorpus/Github/Bredrick_elastic-demo/elasticsearch.ps1
elasticsearch.ps1
param ( [string]$version = "5.0.1", [string]$target = (Test-Connection "$env:computername" -count 1).IPv4Address.IPAddressToString + ":9300" ) $source = "https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$version.zip" $destination = "C:\elk" $downloadDest = "$destination\elasticsearch-...
PowerShellCorpus/Github/vecilije_strongbox/StrongBox.WebApi/Properties/PublishProfiles/ServerKuca_Strongbox-publish.ps1
ServerKuca_Strongbox-publish.ps1
[cmdletbinding(SupportsShouldProcess=$true)] param($publishProperties=@{}, $packOutput, $pubProfilePath) # to learn more about this file visit https://go.microsoft.com/fwlink/?LinkId=524327 try{ if ($publishProperties['ProjectGuid'] -eq $null){ $publishProperties['ProjectGuid'] = 'ea92b1d0-0a09-4a6...
PowerShellCorpus/Github/vecilije_strongbox/StrongBox.WebApi/Properties/PublishProfiles/Local-publish.ps1
Local-publish.ps1
[cmdletbinding(SupportsShouldProcess=$true)] param($publishProperties=@{}, $packOutput, $pubProfilePath) # to learn more about this file visit https://go.microsoft.com/fwlink/?LinkId=524327 try{ if ($publishProperties['ProjectGuid'] -eq $null){ $publishProperties['ProjectGuid'] = 'ea92b1d0-0a09-4a6...
PowerShellCorpus/Github/vecilije_strongbox/Strongbox.IdentityServer/Properties/PublishProfiles/ServerKuca_IdentityServer-publish.ps1
ServerKuca_IdentityServer-publish.ps1
[cmdletbinding(SupportsShouldProcess=$true)] param($publishProperties=@{}, $packOutput, $pubProfilePath) # to learn more about this file visit https://go.microsoft.com/fwlink/?LinkId=524327 try{ if ($publishProperties['ProjectGuid'] -eq $null){ $publishProperties['ProjectGuid'] = '9a6de2a5-4f39-48d...
PowerShellCorpus/Github/vecilije_strongbox/Strongbox.IdentityServer/Properties/PublishProfiles/KucniServer_IdentityServer-publish.ps1
KucniServer_IdentityServer-publish.ps1
[cmdletbinding(SupportsShouldProcess=$true)] param($publishProperties=@{}, $packOutput, $pubProfilePath) # to learn more about this file visit https://go.microsoft.com/fwlink/?LinkId=524327 try{ if ($publishProperties['ProjectGuid'] -eq $null){ $publishProperties['ProjectGuid'] = '9a6de2a5-4f39-48d...
PowerShellCorpus/Github/vecilije_strongbox/Strongbox.IdentityServer/Properties/PublishProfiles/Local-publish.ps1
Local-publish.ps1
[cmdletbinding(SupportsShouldProcess=$true)] param($publishProperties=@{}, $packOutput, $pubProfilePath) # to learn more about this file visit https://go.microsoft.com/fwlink/?LinkId=524327 try{ if ($publishProperties['ProjectGuid'] -eq $null){ $publishProperties['ProjectGuid'] = '9a6de2a5-4f39-48d...
PowerShellCorpus/Github/kris4o1993_AngularTSDemo/AngularTSTest/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/kris4o1993_AngularTSDemo/AngularTSTest/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/kris4o1993_AngularTSDemo/AngularTSTest/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/royalcas_WebSiteAzureTest/App.Web/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/royalcas_WebSiteAzureTest/App.Web/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/royalcas_WebSiteAzureTest/App.Web/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/royalcas_WebSiteAzureTest/App.Web/packages/jQuery.UI.Combined.1.8.24/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Update the _references.js file Remove-Reference $scriptsFolderProjectItem $juiFileNameRegEx
PowerShellCorpus/Github/royalcas_WebSiteAzureTest/App.Web/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/royalcas_WebSiteAzureTest/App.Web/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/royalcas_WebSiteAzureTest/App.Web/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/royalcas_WebSiteAzureTest/App.Web/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/royalcas_WebSiteAzureTest/App.Web/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/xbanks_COP-4331-Project-2/Web/Website/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/xbanks_COP-4331-Project-2/Web/Website/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/xbanks_COP-4331-Project-2/Web/Website/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/xbanks_COP-4331-Project-2/Web/Website/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/xbanks_COP-4331-Project-2/Web/Website/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/xbanks_COP-4331-Project-2/Web/Website/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/xbanks_COP-4331-Project-2/Web/Website/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/xbanks_COP-4331-Project-2/Web/Website/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/xbanks_COP-4331-Project-2/Web/Website/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/jeffbuenting_SCVMM/Unmount ISO from all VMs.ps1
Unmount ISO from all VMs.ps1
Import-Module "C:\Program Files\Microsoft System Center 2012 r2\Virtual Machine Manager\bin\psModules\virtualmachinemanager\virtualmachinemanager" $VMMServer = "RWVA-scvmm" $VMs = Get-VirtualDVDDrive -VMMServer $VMMServer -All | Where-object {$_.ISO -ne $null} | select-object Name Foreach ($VM in $VMs) {get-virtua...
PowerShellCorpus/Github/jeffbuenting_SCVMM/update-SCVMMAgent.ps1
update-SCVMMAgent.ps1
<# .Link https://technet.microsoft.com/en-us/library/jj613163(v=sc.20).aspx #> import-module virtualmachinemanager $Credential = Get-Credential Get-SCVMMManagedComputer | Update-SCVMMManagedComputer -Credential $Credential
PowerShellCorpus/Github/jeffbuenting_SCVMM/Compare-SCBaselinetoHotfixes.ps1
Compare-SCBaselinetoHotfixes.ps1
$InstalledPatches = get-hotfix -ComputerName 'cl-hyperv1' | Select-object @{N='KBArticle'; E={$_.HotFixID -replace 'KB',''}} $BaselinePatches = (Get-SCBaseline -VMMServer 'rwva-scvmm' -Name '2015 - Patches').Updates | where {(( $_.IsExpired -eq $False) -and ($_.IsSuperseded -eq $False )) } #$BaselinePatches C...
PowerShellCorpus/Github/jeffbuenting_SCVMM/Start-SCVMMPatching.ps1
Start-SCVMMPatching.ps1
<# .Description #> $Year = Get-Date -UFormat %Y $BaseLine = "$Year - Patches" import-module virtualmachinemanager $SCVMM = Get-SCVMMServer -ComputerName RWVA-SCVMM # ----- Dealing with Hosts from this cluster $HostCluster = Get-SCVMHostCluster -Name RWVA -VMMServer $SCVMM # ----- Scan ...
PowerShellCorpus/Github/jeffbuenting_SCVMM/RawCode/Add-SCVMMUpdateToBaseline.ps1
Add-SCVMMUpdateToBaseline.ps1
<# .Description retrieves updates from the SCCM Software update group and adds them to the SCVMM Baseline .Note Author: Jeff Buenting Date: 28 Jul 2015 #> $Year = Get-Date -UFormat %Y $SoftwareUpdateGroup = "$Year - Patches" import-module virtualmachinemanager Import-Mo...
PowerShellCorpus/Github/jeffbuenting_SCVMM/SCVMM2012-UpdateAutomation-Docs-Scripts/SCVMM2012-UpdateAutomation-Scripts/SCCMUpdateUtil.ps1
SCCMUpdateUtil.ps1
# FUNCTION to collect baseline from SCCM function GetBaseLineFromSCCM { Param( [string] $ConfigMgrServer, [string] $SiteCode = "Default", [string] $BaselineName = "TestSCCMBaseLineForVMM" ) Process { $provNamespace = "root\sms" $getSMSProvider = Get-WmiObject -Query "select * from SMS_Pro...
PowerShellCorpus/Github/jeffbuenting_SCVMM/SCVMM2012-UpdateAutomation-Docs-Scripts/SCVMM2012-UpdateAutomation-Scripts/VMMUpdateUtil.ps1
VMMUpdateUtil.ps1
# Function to get current week of month Function Get-WeekOfMonth ([datetime]$Date = $(Get-Date)) { $firstDayOfMonth = $Date.AddDays($Date.Day - $Date.Day + 1); $lastDayOfMonth = $firstDayOfMonth.AddMonths(1).AddDays(-1); $currDayOfMonth = $Date $Culture = [System.Globalization.CultureInfo]::CurrentCultu...
PowerShellCorpus/Github/jeffbuenting_SCVMM/SCVMM2012-UpdateAutomation-Docs-Scripts/SCVMM2012-UpdateAutomation-Scripts/VMMUpdateComplianceRemediate.ps1
VMMUpdateComplianceRemediate.ps1
param ( $VMMServer="localhost", $DomainUser="xxx", $Password="yyy" ) $scriptdir="c:\SCVMM\UpdateAutomation" $scriptout=$scriptdir + "\Output" $logfile="VMMUpdateComplianceRemediate" + (Get-Date -Format "yyyyMMddHHmmss") . $scriptdir\VMMUpdateUtil.ps1 $global:retFlag=0 $global:noOfJobs=0 ...
PowerShellCorpus/Github/jeffbuenting_SCVMM/SCVMM2012-UpdateAutomation-Docs-Scripts/SCVMM2012-UpdateAutomation-Scripts/VMMScriptRunFromSCORCH.ps1
VMMScriptRunFromSCORCH.ps1
param( $VMMServer="vmm2012jp.dcmanager.lab" , $DomainUser = "dcmanagerlab\esdcvsec", $Password = "March2010M2!", $SCCMServer="aaa", $SCCMUser="bbb", $SCCMPass="ccc", $ScriptFile = "VMMUpdateServerSync.ps1") $scriptdir="c:\SCVMM\UpdateAutomation" $scriptout=$script...
PowerShellCorpus/Github/jeffbuenting_SCVMM/SCVMM2012-UpdateAutomation-Docs-Scripts/SCVMM2012-UpdateAutomation-Scripts/VMMUpdateComplianceScan.ps1
VMMUpdateComplianceScan.ps1
param ( $VMMServer="localhost", $DomainUser="xxx", $Password="yyy" ) $scriptdir="c:\SCVMM\UpdateAutomation" $scriptout=$scriptdir + "\Output" $logfile="VMMUpdateComplianceScan" + (Get-Date -Format "yyyyMMddHHmmss") . $scriptdir\VMMUpdateUtil.ps1 $global:retFlag=0 $global:noOfJobs=0 Upda...
PowerShellCorpus/Github/jeffbuenting_SCVMM/SCVMM2012-UpdateAutomation-Docs-Scripts/SCVMM2012-UpdateAutomation-Scripts/VMMUpdateBaselineFromSCCM.ps1
VMMUpdateBaselineFromSCCM.ps1
param ( $VMMServer="localhost", $DomainUser="xxx", $Password="yyy", $SCCMServer="sccmserver", $SCCMUser="aaa", $SCCMPass="bbb" ) $scriptdir="c:\SCVMM\UpdateAutomation" $scriptout=$scriptdir + "\Output" $logfile="VMMUpdateBaselineFromSCCM" + (Get-Date -Format "yyyyMMddHHmmss") . $scriptdir\VM...
PowerShellCorpus/Github/jeffbuenting_SCVMM/SCVMM2012-UpdateAutomation-Docs-Scripts/SCVMM2012-UpdateAutomation-Scripts/VMMUpdateServerSync.ps1
VMMUpdateServerSync.ps1
param ( $VMMServer="localhost", $DomainUser="xxx", $Password="yyy") $scriptdir="c:\scvmm\UpdateAutomation" $scriptout=$scriptdir + "\Output" $logfile="VMMUpdateServerSync" + (Get-Date -Format "yyyyMMddHHmmss") . $scriptdir\VMMUpdateUtil.ps1 $global:retFlag=0 UpdateLogFile -message "***Update...
PowerShellCorpus/Github/ChuixinZeng_PowershellScript/Windows/Disable-WindowsFirewall.ps1
Disable-WindowsFirewall.ps1
function Disable-WindowsFirewall #此function适合于测试环境,生产环境下请谨慎关闭防火墙 { #检测防火墙状态 $firewallstatus = (Get-NetFirewallProfile -Name Domain,Public,Private).Enabled #如果防火墙处于开启状态,则修改所有防火墙设置为关闭 if ($firewallstatus -contains "True") { Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled false } #如果...
PowerShellCorpus/Github/ChuixinZeng_PowershellScript/Exchange/自动发送HTML邮件代码段.ps1
自动发送HTML邮件代码段.ps1
$UserName = "zengchuixin" #用户名可以从变量中提取 # Header $Output=" <html> <body> <font size=""5"" face=""微软雅黑,sans-serif""> <tr align=""left"">您好</th> </font> <font size=""5"" color=""#FF0000"" face=""微软雅黑,sans-serif""> <tr align=""left"">$UserName ,</th><br><br> </font> <font size=""4"" face=""微软雅黑,sans-serif""...
PowerShellCorpus/Github/ChuixinZeng_PowershellScript/Exchange/EnableRoomMailbox.ps1
EnableRoomMailbox.ps1
PowerShellCorpus/Github/OPS-E2E-Prod_E2E_P_Provision_2017_4_26_14_20_39/.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/Olriar_VSTFS_GitMirroring/CloneAllRepos.ps1
CloneAllRepos.ps1
# Read configuration file Get-Content "CloneAllRepos.config" | foreach-object -begin {$h=@{}} -process { $k = [regex]::split($_,'='); if(($k[0].CompareTo("") -ne 0) -and ($k[0].StartsWith("[") -ne $True)) { $h.Add($k[0], $k[1]) } } $url = $h.Get_Item("Url") $username = $h.Get_Item("User...
PowerShellCorpus/Github/StantsJ_todo_ps/todo.ps1
todo.ps1
$todoList = New-Object System.Collections.ArrayList Function processResult($result){ if($result -eq 1) { createNewTask } elseif($result -eq 2) { markTaskDone } elseif($result -eq 3) { deleteTask } writeToScreen } Function createNewtask() { $task ...
PowerShellCorpus/Github/solutionexchange_PowerShell-to-RQL-Prototype/testRQL.ps1
testRQL.ps1
function ReplaceValuesRQL ($sRQL) { $xml = [xml]$sRQL; if($xml.IODATA.HasAttributes) { $xml.IODATA.loginguid = $sStoreRQL.loginguid; } if($xml.IODATA.HasChildNodes) { if($xml.IODATA.GetElementsByTagName("ADMINISTRATION").action -eq "login") { $xml.IODATA.ADMINISTRATION...
PowerShellCorpus/Github/solutionexchange_PowerShell-to-RQL-Prototype/lib.ps1
lib.ps1
Function Pause ($Message = "Press any key to continue . . . ") { If ($psISE) { # The "ReadKey" functionality is not supported in Windows PowerShell ISE. $Shell = New-Object -ComObject "WScript.Shell"; $Button = $Shell.Popup("Click OK to continue.", 0, "Script Paused", 0); Return...
PowerShellCorpus/Github/solutionexchange_PowerShell-to-RQL-Prototype/example.rql.ps1
example.rql.ps1
. "Lib.ps1"; # Replace Values in RQL Request Function ReplaceValuesRQL ($RQL) { $XML = [xml]$RQL; If($XML.IODATA.HasAttributes) { $XML.IODATA.loginguid = $Global:StoreRQL.LoginGUID; $XML.IODATA.sessionkey = $Global:StoreRQL.SessionKey; } If($XML.IODATA.HasChildNodes) { ...
PowerShellCorpus/Github/solutionexchange_PowerShell-to-RQL-Prototype/Tools/check.secure.password.file.ps1
check.secure.password.file.ps1
$CredentialsUserName = "wsm.powershell.account"; $CredentialsPasswordFile = Get-Content ("..\Store\{0}.pwd" -f $CredentialsUserName); $CredentialsSecurePassword = $CredentialsPasswordFile | ConvertTo-SecureString; $Credentials = New-Object System.Management.Automation.PSCredential -ArgumentList ($CredentialsUserName...
PowerShellCorpus/Github/solutionexchange_PowerShell-to-RQL-Prototype/Tools/create.secure.password.file.ps1
create.secure.password.file.ps1
$CredentialsInput = Get-Credential -Message ("Please type the password for WSM Account:"); $CredentialsUserName = $CredentialsInput.GetNetworkCredential().Username; $CredentialsPassword = $CredentialsInput.GetNetworkCredential().Password; if ($CredentialsUserName) { $CredentialsSecureStringPassword = $Credentia...
PowerShellCorpus/Github/Elygian_ProcessKiller/ProcessKiller.ps1
ProcessKiller.ps1
param( [string]$serviceToKill ) $ProcessId = get-wmiobject win32_service | where {$_.name -eq $serviceToKill} | Select-Object -expand ProcessId Try { if ($ProcessId -ne 0) { Write-Host "Killing process: $serviceToKill" Stop-Process -id $ProcessId -Force | Wait-Process $ProcessId ...
PowerShellCorpus/Github/MicrosoftDocs_dynamics365smb-docs-pr.it-it/.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: ...