full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/damienvanrobaeys_MDT_Light_Version/Update_DeploymentShare.ps1 | Update_DeploymentShare.ps1 | #========================================================================
#
# Tool Name : Windows 10 Profile Generator
# Author : Damien VAN ROBAEYS
# Date : 14/06/2016
#
#========================================================================
param
(
[String]$deploymentshare,
[String]$module
)... |
PowerShellCorpus/Github/damienvanrobaeys_MDT_Light_Version/test.ps1 | test.ps1 | #========================================================================
#
# Tool Name : Windows 10 Profile Generator
# Version: : 1.0
# Author : Damien VAN ROBAEYS
# Date : 14/06/2016
#
#========================================================================
# Param
# (
# [Parameter(Mandatory=$... |
PowerShellCorpus/Github/damienvanrobaeys_MDT_Light_Version/Modify_Appli.ps1 | Modify_Appli.ps1 | #========================================================================
#
# Tool Name : ENTITY TOOL WINDOWS 10
# Author : Damien VAN ROBAEYS
#
#========================================================================
param(
[String]$deploymentshare,
[String]$applixml,
[String]$position,
[String]$name... |
PowerShellCorpus/Github/damienvanrobaeys_MDT_Light_Version/Add_MUI.ps1 | Add_MUI.ps1 | #========================================================================
#
# Tool Name : ENTITY TOOL WINDOWS 10
# Author : Damien VAN ROBAEYS
#
#========================================================================
param
(
[String]$deploymentshare,
[String]$module
)
[System.Reflection.Assembly... |
PowerShellCorpus/Github/damienvanrobaeys_MDT_Light_Version/Add_OS.ps1 | Add_OS.ps1 | #========================================================================
#
# Tool Name : Windows 10 Profile Generator
# Author : Damien VAN ROBAEYS
# Date : 14/06/2016
#
#========================================================================
param
(
[String]$deploymentshare,
[String]$module
... |
PowerShellCorpus/Github/damienvanrobaeys_MDT_Light_Version/MDT_Portable_Version.ps1 | MDT_Portable_Version.ps1 | #========================================================================
#
# Tool Name : Windows 10 Profile Generator
# Version: : 1.0
# Author : Damien VAN ROBAEYS
# Date : 14/06/2016
#
#========================================================================
Param
(
[Parameter(Mandatory=$true)]... |
PowerShellCorpus/Github/damienvanrobaeys_MDT_Light_Version/Add_Package.ps1 | Add_Package.ps1 | #========================================================================
#
# Tool Name : ENTITY TOOL WINDOWS 10
# Author : Damien VAN ROBAEYS
#
#========================================================================
param
(
[String]$deploymentshare,
[String]$module
)
[System.Reflection.Assembl... |
PowerShellCorpus/Github/damienvanrobaeys_MDT_Light_Version/Add_Media.ps1 | Add_Media.ps1 | #========================================================================
#
# Tool Name : Windows 10 Profile Generator
# Author : Damien VAN ROBAEYS
# Date : 14/06/2016
#
#========================================================================
param
(
[String]$deploymentshare,
[String]$module
... |
PowerShellCorpus/Github/damienvanrobaeys_MDT_Light_Version/Add_Drivers.ps1 | Add_Drivers.ps1 | #========================================================================
#
# Tool Name : Windows 10 Profile Generator
# Author : Damien VAN ROBAEYS
# Date : 14/06/2016
#
#========================================================================
param
(
[String]$deploymentshare,
[String]$module
... |
PowerShellCorpus/Github/damienvanrobaeys_MDT_Light_Version/Check_PowerShell.ps1 | Check_PowerShell.ps1 | #========================================================================
#
# Tool Name : Windows 10 Profile Generator
# Author : Damien VAN ROBAEYS
# Date : 14/06/2016
#
#========================================================================
$Global:Current_Folder =(get-location).path
$EXE_config = "$C... |
PowerShellCorpus/Github/damienvanrobaeys_MDT_Light_Version/Add_Appli.ps1 | Add_Appli.ps1 | #========================================================================
#
# Tool Name : MDT_Application_Manager
# Author : Damien VAN ROBAEYS
# Website : http://www.systanddeploy.com/
# Facebook : https://www.facebook.com/systanddeploy/
# Mail : damien.vanrobaeys@gmail.com
# Twitter : https://twitter.com/... |
PowerShellCorpus/Github/damienvanrobaeys_MDT_Light_Version/Browse_DeploymentShare.ps1 | Browse_DeploymentShare.ps1 | #========================================================================
#
# Tool Name : Windows 10 Profile Generator
# Author : Damien VAN ROBAEYS
# Date : 14/06/2016
#
#========================================================================
$Global:Current_Folder =(get-location).path
# $EXE_config = "... |
PowerShellCorpus/Github/Max-v_myScripts-Documents/createMailbox_OnPermise.ps1 | createMailbox_OnPermise.ps1 | { # --- Create mailbox On-Premise
$objReport.UUA.nNewMailboxReqCount++
Message("Create mailbox for `""+$objUser.Name.Value+"`" in database "+$strMailboxDatabase) $nLogChangesInfo
try {
$objMailbox = Enable-Mailbox -Identity $strUserLogin -Alias $strUserLogin -Database $strMailboxDatabase
$objRepo... |
PowerShellCorpus/Github/Max-v_myScripts-Documents/connectToMSOlService.ps1 | connectToMSOlService.ps1 | -------------------------------------------------------------------------------
function ConnectToMsolService
{
if ($bMsolServiceConnected -eq $true) { return $true }
$script:bMsolServiceConnected = $false
Message "Connect to MSOL sevice..." $nLogInfo
try {
$SecurePassword = $strMsolAdminPas | C... |
PowerShellCorpus/Github/Max-v_myScripts-Documents/CreateMsolMailbox.ps1 | CreateMsolMailbox.ps1 | if ($bCreateMsolMailbox -eq $true -and $arrExpressUserDepartment -contains $strDepId) {
# --- Create mailbox in Exchange Online
$objReport.UUA.nNewMailboxReqCount++
if (![string]::IsNullOrEmpty($strMsolTenantDomain)) {
$strEmailAddresses = $strUserLogin+"@"+$strMsolTenantDomain
Message("Create ... |
PowerShellCorpus/Github/Max-v_myScripts-Documents/removeMsol.ps1 | removeMsol.ps1 | if ($bRemoveDissmisedUserMsolMailbox -eq $true) {
$objReport.UUA.nRemovedMailboxReqCount++
Message("Remove a remote mailbox "+$objUserAccount.Name.value) $nLogChangesRepInfo
Disable-RemoteMailbox $objUserAccount.userPrincipalName.Value -Confirm:$false
$objReport.UUA.nRemovedMailb... |
PowerShellCorpus/Github/jarvisv_LibrarySystem/LibrarySystem/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/jarvisv_LibrarySystem/LibrarySystem/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/jarvisv_LibrarySystem/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/jarvisv_LibrarySystem/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/brwilkinson_AutomationSchedule/AutomationSchedule.ps1 | AutomationSchedule.ps1 | # AzureRM Virtual Machine and Virtual Machine Gateway Schedule
# This is a solution for Automation of turning VM's and Gateways on and off
#region Authenticate
# set up your runas account first
# https://azure.microsoft.com/en-us/documentation/articles/automation-sec-configure-azure-runas-account/
try
{
$c... |
PowerShellCorpus/Github/BlueWombat_PowershellUtils/WebHooks/NewRelic.ps1 | NewRelic.ps1 | function NewRelicTagAppDeployment($apiKey, $appId, $appName, $description, $revision, $changeLog, $user) {
$postData = New-Object -TypeName "System.Collections.Generic.Dictionary[string, string]"
if(!([string]::IsNullOrEmpty($appId))) {
$postData.Add("deployment[application_id]", $appId)
}
... |
PowerShellCorpus/Github/BlackMesaCode_ps-scripts/Choc Bundle Install.ps1 | Choc Bundle Install.ps1 | #########################
# Autoinstall script using chocolatey
#########################
# Note: Net 4.0 must be installed prior to running this script
#
#Modify this line to change packages
$items = @("google-chrome-x64", "thunderbird", "skype", "vlc", "quicktime", "flashplayerplugin", "javaruntime", "DotNet4.5... |
PowerShellCorpus/Github/BlackMesaCode_ps-scripts/GetInstalledPrograms Examples.ps1 | GetInstalledPrograms Examples.ps1 | . "$PSScriptRoot\GetInstalledPrograms.ps1"
$pathToSetupFiles = $PSScriptRoot + "\Setups"
#Firewall
#netsh advfirewall import "C:\#install\schema\FirewallRichtlinien.wfw"
#Energy Options
#powercfg /import C:\#install\schema\Jerg.pow 12345678-1234-1234-1234-123456789123
#timeout /t 2
#powercfg /s 12345678-1... |
PowerShellCorpus/Github/BlackMesaCode_ps-scripts/Suspend Bitlocker.ps1 | Suspend Bitlocker.ps1 | Suspend-BitLocker -MountPoint "C:" -RebootCount 1
Restart-Computer |
PowerShellCorpus/Github/BlackMesaCode_ps-scripts/CreateApplicationShortcut.ps1 | CreateApplicationShortcut.ps1 | ## Install-ChocolateyShortcut might be cleaner to use !!
# Safely Remove Hardware
$AppLocation = "C:\Windows\System32\rundll32.exe"
$WshShell = New-Object -ComObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("$Home\Desktop\USB Hardware.lnk")
$Shortcut.TargetPath = $AppLocation
$Shortcut.Arguments ="s... |
PowerShellCorpus/Github/BlackMesaCode_ps-scripts/Send Wake on Lan Magic Paket.ps1 | Send Wake on Lan Magic Paket.ps1 | function Send-WOL
{
<#
.SYNOPSIS
Send a WOL packet to a broadcast address
.PARAMETER mac
The MAC address of the device that need to wake up
.PARAMETER ip
The IP address where the WOL packet will be sent to
.EXAMPLE
Send-WOL -mac 00:11:32:21:2D:11 -ip 192.168.8.255
#>
param(
[str... |
PowerShellCorpus/Github/BlackMesaCode_ps-scripts/OpenPowerShellHereAsAdmin.ps1 | OpenPowerShellHereAsAdmin.ps1 | $menu = 'Open Windows PowerShell Here as Administrator'
$command = "$PSHOME\powershell.exe -NoExit -Command ""Set-Location '%V'""" # -NoProfile
'directory', 'directory\background', 'drive' | ForEach-Object {
New-Item -Path "Registry::HKEY_CLASSES_ROOT\$_\shell" -Name runas\command -Force |
Set-ItemProper... |
PowerShellCorpus/Github/BlackMesaCode_ps-scripts/SetDesktopBackground.ps1 | SetDesktopBackground.ps1 | #Set-ItemProperty 'HKU:\.DEFAULT\Control Panel\Desktop' -Name Wallpaper -Value ""
Set-ItemProperty 'HKCU:\Control Panel\Desktop' -Name Wallpaper -Value ""
#Set-ItemProperty 'HKUS:\.DEFAULT\Control Panel\Colors' -Name Background -Value "116 164 2"
Set-ItemProperty 'HKCU:\Control Panel\Colors' -Name Background -Valu... |
PowerShellCorpus/Github/BlackMesaCode_ps-scripts/DebugTest.ps1 | DebugTest.ps1 | function Write-Item($itemCount) {
$i = 1
while ($i -le $itemCount) {
$str = "Output $i"
Write-Output $str
# In the gutter on the left, right click and select "Add Conditional Breakpoint"
# on the next line. Use the condition: $i -eq 25
$i = $i + 1
# ... |
PowerShellCorpus/Github/BlackMesaCode_ps-scripts/Administrative Freigaben aktivieren.ps1 | Administrative Freigaben aktivieren.ps1 | Get-PSDrive -PSProvider Registry
$path = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System" # registry key == registry folder
$registryValue = "LocalAccountTokenFilterPolicy" #registry value == entry of a key
$pathExists = Test-Path $path
If ($pathExists -eq $True)
{
Set-Location HKLM:\Sof... |
PowerShellCorpus/Github/BlackMesaCode_ps-scripts/LatestMp3s.ps1 | LatestMp3s.ps1 | Get-ChildItem 'G:\Musik' *.mp3 -Recurse | Sort LastWriteTime, LastAccessTime -Descending | Select Name, LastWriteTime, LastAccessTime -First 250 | Out-GridView |
PowerShellCorpus/Github/BlackMesaCode_ps-scripts/GetInstalledPrograms.ps1 | GetInstalledPrograms.ps1 | function Get-InstalledPrograms
{
# paths: x86 and x64 registry keys are different
if ([IntPtr]::Size -eq 4) {
$path = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*'
}
else {
$path = @(
'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*'
... |
PowerShellCorpus/Github/BlackMesaCode_ps-scripts/GetDnsClientCache.ps1 | GetDnsClientCache.ps1 | Get-DnsClientCache |
PowerShellCorpus/Github/BlackMesaCode_ps-scripts/Work Related/UpdateUrlDates.ps1 | UpdateUrlDates.ps1 | # define path to urls.txt - currently urls.txt has to reside in same directory as the script
$pathToUrl = $PSScriptRoot + "\urls.txt"
# read urls.txt content
$urls = Get-Content $pathToUrl
# lines that will be altered
$matches = $urls -match "https://jerg.zimonitor.com/overview/(\d*)/1/(\d*)"
$date = Get-Da... |
PowerShellCorpus/Github/BlackMesaCode_ps-scripts/Basics/Modules.ps1 | Modules.ps1 | # Lists all loaded modules; modules are loaded on the fly when first used
Get-Module
# Lists all modules, that are available on the system (loaded and unloaded ones)
Get-Module –ListAvailable |
PowerShellCorpus/Github/BlackMesaCode_ps-scripts/Basics/Comments.ps1 | Comments.ps1 | # This is a normal comment # second comment in the same line
<#
This is a block comment
#>
|
PowerShellCorpus/Github/BlackMesaCode_ps-scripts/Basics/Output.ps1 | Output.ps1 | # Output Message ...
Write-Host "Execution policy changed. Restart all open shells!" -foregroundcolor yellow |
PowerShellCorpus/Github/BlackMesaCode_ps-scripts/Setup/Step1.ps1 | Step1.ps1 | #Set Execution Policy (required elevated Powershell)
Set-ExecutionPolicy Unrestricted -Force |
PowerShellCorpus/Github/BlackMesaCode_ps-scripts/Setup/Step2.ps1 | Step2.ps1 | # All Chocolatey Helpers: https://github.com/chocolatey/choco/wiki/HelpersReference
# All Boxstarter Helpers: http://boxstarter.org/WinConfig
# Also: consider executing script: OpenPowerShellHereAsAdmin to add useful context menu item for opening powershell
$is64bit = ($ENV:PROCESSOR_ARCHITECTURE -eq "AMD64") ... |
PowerShellCorpus/Github/russgillespie_powershell/test.ps1 | test.ps1 | Get-Service | ft
|
PowerShellCorpus/Github/jsmallwood_Azure_DSC_Resources/scripts/CreateADPDC.ps1 | CreateADPDC.ps1 | configuration CreateADPDC
{
param
(
[Parameter(Mandatory)]
[String]$DomainName,
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$Admincreds,
[Int]$RetryCount=20,
[Int]$RetryIntervalSec=30
)
Import-DscResource -Modu... |
PowerShellCorpus/Github/jsmallwood_Azure_DSC_Resources/scripts/CreateFailoverCluster.ps1 | CreateFailoverCluster.ps1 | #
# Copyright="� Microsoft Corporation. All rights reserved."
#
configuration CreateFailoverCluster
{
param
(
[Parameter(Mandatory)]
[String]$DomainName,
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential ]$Admincreds,
[Parameter(Mandatory)... |
PowerShellCorpus/Github/jsmallwood_Azure_DSC_Resources/scripts/CreateADBDC.ps1 | CreateADBDC.ps1 | configuration CreateADBDC
{
param
(
[Parameter(Mandatory)]
[String]$DomainName,
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$Admincreds,
[Int]$RetryCount=20,
[Int]$RetryIntervalSec=30
)
Import-DscResource -Mod... |
PowerShellCorpus/Github/jsmallwood_Azure_DSC_Resources/scripts/PrepareAlwaysOnSqlServer.ps1 | PrepareAlwaysOnSqlServer.ps1 | #
# Copyright="� Microsoft Corporation. All rights reserved."
#
configuration PrepareAlwaysOnSqlServer
{
param
(
[Parameter(Mandatory)]
[String]$DomainName,
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential ]$Admincreds,
[Parameter(Mandato... |
PowerShellCorpus/Github/jsmallwood_Azure_DSC_Resources/scripts/CreateFileShareWitness.ps1 | CreateFileShareWitness.ps1 | #
# Copyright="© Microsoft Corporation. All rights reserved."
#
configuration CreateFileShareWitness
{
param
(
[Parameter(Mandatory)]
[String]$DomainName,
[Parameter(Mandatory)]
[PSCredential]$Admincreds,
[Parameter(Mandatory)]
[String]$SharePath... |
PowerShellCorpus/Github/jsmallwood_Azure_DSC_Resources/scripts/scripts/PrepareSqlServer.ps1 | PrepareSqlServer.ps1 | #
# Copyright="© Microsoft Corporation. All rights reserved."
#
configuration PrepareSqlServer
{
param
(
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$SQLAdminAuthCreds,
[Parameter(Mandatory)]
[UInt32]$DisksCount,
[Parameter(Mandatory)]... |
PowerShellCorpus/Github/jsmallwood_Azure_DSC_Resources/scripts/scripts/PrepareAlwaysOnSqlServer.ps1 | PrepareAlwaysOnSqlServer.ps1 | #
# Copyright="� Microsoft Corporation. All rights reserved."
#
configuration PrepareAlwaysOnSqlServer
{
param
(
[Parameter(Mandatory)]
[String]$DomainName,
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$Admincreds,
[Parameter(Mandator... |
PowerShellCorpus/Github/jsmallwood_Azure_DSC_Resources/scripts/scripts/Common.ps1 | Common.ps1 | #Verify if enable SQL Server firewall rules are required
function Set-SqlFirewallRule([string]$ConnectionType)
{
$ConnectionType = $ConnectionType.ToUpper()
if($ConnectionType -eq "LOCAL")
{
return $false
}
return $true
}
#Return a SMO object to a SQL Server instance using th... |
PowerShellCorpus/Github/jsmallwood_Azure_DSC_Resources/scripts/scripts/PrepareSqlServerSa.ps1 | PrepareSqlServerSa.ps1 | #
# Copyright="© Microsoft Corporation. All rights reserved."
#
configuration PrepareSqlServerSa
{
param
(
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$SQLAdminAuthCreds,
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$SQLAuthC... |
PowerShellCorpus/Github/cliveg_skype-for-business-simple/ConfigureSkypeForBusinessServerEdge.ps1 | ConfigureSkypeForBusinessServerEdge.ps1 | #
# Copyright="© Microsoft Corporation. All rights reserved."
#
configuration ConfigureSkypeForBusinessServer
{
param
(
[Parameter(Mandatory)]
[String]$DomainName,
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$Admincreds,
[paramete... |
PowerShellCorpus/Github/cliveg_skype-for-business-simple/CreateADPDC.ps1 | CreateADPDC.ps1 | configuration CreateADPDC
{
param
(
[Parameter(Mandatory)]
[String]$DomainName,
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$Admincreds,
[Int]$RetryCount=20,
[Int]$RetryIntervalSec=30
)
Import-DscResource -Modu... |
PowerShellCorpus/Github/cliveg_skype-for-business-simple/ConfigureSkypeForBusinessServer.ps1 | ConfigureSkypeForBusinessServer.ps1 | #
# Copyright="© Microsoft Corporation. All rights reserved."
#
configuration ConfigureSkypeForBusinessServer
{
param
(
[Parameter(Mandatory)]
[String]$DomainName,
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$Admincreds,
[paramete... |
PowerShellCorpus/Github/cliveg_skype-for-business-simple/ConfigureSqlServer.ps1 | ConfigureSqlServer.ps1 | #
# Copyright="© Microsoft Corporation. All rights reserved."
#
configuration ConfigureSqlServer
{
param
(
[Parameter(Mandatory)]
[String]$DomainName,
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$Admincreds,
[Parameter(... |
PowerShellCorpus/Github/cliveg_skype-for-business-simple/CreateADPDCx.ps1 | CreateADPDCx.ps1 | configuration CreateADPDC
{
param
(
[Parameter(Mandatory)]
[String]$DomainName,
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$Admincreds,
[Int]$RetryCount=20,
[Int]$RetryIntervalSec=30
)
Import-DscResource -Modu... |
PowerShellCorpus/Github/nickrod518_Migrate-WindowsUserProfile/Invoke-USMTGUI.ps1 | Invoke-USMTGUI.ps1 | <#
.SYNOPSIS
Migrate user state from one PC to another using USMT.
.DESCRIPTION
Migrate user state from one PC to another using USMT. Intended for domain joined computers.
By default, all user profile data except Favorites and Documents will be included.
Tool also allows for user to specify additional folders t... |
PowerShellCorpus/Github/nickrod518_Migrate-WindowsUserProfile/Config.ps1 | Config.ps1 | # Default configuration options - make edits here
# Default domain to use for profile creation
$DefaultDomain = 'DOMAIN'
# Default accounts to exclude from migration in the form of "Domain\UserName"
$DefaultExcludeProfile = @(
"$ENV:Computername\default*",
"NT Service\*"
)
# By default local accou... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/ec2-windows-test.ps1 | ec2-windows-test.ps1 | #<powershell>
# Set-ExecutionPolicy Unrestricted
# icm $executioncontext.InvokeCommand.NewScriptBlock((New-Object Net.WebClient).DownloadString('https://s3-eu-west-1.amazonaws.com/devops-mateli/scripts/ec2-windows.ps1'))
#</powershell>
param()
$log = 'c:\Bootstrap.txt'
$s3Path = 'https://s3-eu-west-1.amazonaw... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/ebs-net.ps1 | ebs-net.ps1 | param(
[string]
[parameter(Mandatory=$true)]
$DestinationFilePath,
[string]
[parameter(Mandatory=$true)]
$projectName,
[string]
[parameter(Mandatory=$true)]
$versionId,
[string]
[parameter(Mandatory=$true)]
$ApplicationName,
[string]
[parameter(Manda... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/ebextension-manager.ps1 | ebextension-manager.ps1 | param(
[string]
[parameter(Mandatory=$true)]
$projectType,
[string]
[parameter(Mandatory=$true)]
$user,
[string]
[parameter(Mandatory=$true)]
$branch,
[string]
[parameter(Mandatory=$true)]
$applicationName,
[string]
[parameter(Mandatory=$true... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/flyway-condition.ps1 | flyway-condition.ps1 | $user = %dep.MateliBff_BuildTestFeature.teamcity.build.triggeredBy.username%
$branch = %dep.MateliBff_BuildTestFeature.teamcity.build.branch%
Write-Output $user
Write-Output $branch
if($user -eq 'devops' -Or $user -eq 'tester' -Or $user -eq 'developer'){
if($branch -eq 'develop' -Or $branch -like '*fe... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/localadmin.ps1 | localadmin.ps1 | $computername = $env:computername # place computername here for remote access
$username = 'root'
$password = 'Start12!'
$desc = 'Automatically created local admin account'
$computer = [ADSI]"WinNT://$computername,computer"
$user = $computer.Create("user", $username)
$user.SetPassword($password)
$user.Setin... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/flow-condition.ps1 | flow-condition.ps1 |
param(
[string]
[parameter(Mandatory=$true)]
$user,
[string]
[parameter(Mandatory=$true)]
$branch
)
function Run {
$environment="test"
$user = $user.ToLower()
if ($branch -contains '*heads*') {
if($branch -like '*develop*' -Or $branch -like '*release*'){
... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/transformation-run.ps1 | transformation-run.ps1 | param(
[string]
[parameter(Mandatory=$true)]
$user,
[string]
[parameter(Mandatory=$true)]
$branch,
[string]
[parameter(Mandatory=$true)]
$ConfigurationFile,
[string]
[parameter(Mandatory=$true)]
$TransformFile,
[string]
[parameter(Mandatory=$true)]
... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/telnetclient.ps1 | telnetclient.ps1 | Import-Module servermanager
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
Add-WindowsFeature telnet-client
|
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/ebs-java.ps1 | ebs-java.ps1 | param(
[string]
[parameter(Mandatory=$true)]
$DestinationFilePath,
[string]
[parameter(Mandatory=$true)]
$projectName,
[string]
[parameter(Mandatory=$true)]
$versionId,
[string]
[parameter(Mandatory=$true)]
$ApplicationName,
[string]
[parameter(Manda... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/eb-run.ps1 | eb-run.ps1 | #$projectType ="java"
#$user = %dep.MateliBff_BuildTestFeature.teamcity.build.triggeredBy.username%
#$branch = %dep.MateliBff_BuildTestFeature.teamcity.build.branch%
#$file = %teamcity.build.checkoutDir%/target/%system.teamcity.projectName%.%dep.MateliBff_BuildTestFeature.build.number%.zip
#$projectName = "%syste... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/generate-tentacle-certificate.ps1 | generate-tentacle-certificate.ps1 |
function Download-File {
param (
[string]$url,
[string]$saveAs
)
Write-Host "Downloading $url to $saveAs"
$downloader = new-object System.Net.WebClient
$downloader.DownloadFile($url, $saveAs)
}
function Install-Tentacle {
param (
)
Write-Output "Beginning Tentacle installati... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/import-configuration.ps1 | import-configuration.ps1 | Add-Type -Path "C:\Program Files\Octopus Deploy\Octopus\Newtonsoft.Json.dll"
Add-Type -Path "C:\Program Files\Octopus Deploy\Octopus\Octopus.Client.dll"
#####################################################################
# Set this parameters to use this script outside from the Octopus #
####################... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/pom-editing.ps1 | pom-editing.ps1 |
function ReplaceFileContent {
param(
[string]
[parameter(Mandatory=$true)]
$filePath,
[string]
[parameter(Mandatory=$true)]
$target,
[string]
[parameter(Mandatory=$true)]
$with
)
if (-not (Test-Path $filePath))
... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/create-ec2-instance.ps1 | create-ec2-instance.ps1 | param(
[string]
[parameter(Mandatory=$true)]
$tagValue,
[string]
[parameter(Mandatory=$true)]
$octopusEnviroment
)
function CreateVolume {
param(
[string]
[parameter(Mandatory=$true)]
$size
)
#Define the volume properties
$volume = New-... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/flyway-migrate.ps1 | flyway-migrate.ps1 |
param(
[string]
[parameter(Mandatory=$true)]
$ConfigName,
[string]
[parameter(Mandatory=$true)]
$EnvName,
[string]
[parameter(Mandatory=$true)]
$baselineVersion,
[string]
[parameter(Mandatory=$true)]
$baseOnMigrate,
[string]
[parameter(Mandatory=$... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/dotnet-transform.ps1 | dotnet-transform.ps1 | # -----------------------------------------------
# Xdt Config Transform
# -----------------------------------------------
#
# Ver Who When What
# 1.0 Evolve Software 11-08-16 Initial Version
# Script Input Parameters
param (
[ValidateNotNullOrEmpty()]
[string] $Configuratio... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/flyway-java-octopus.ps1 | flyway-java-octopus.ps1 | $pname = $OctopusParameters['Octopus.Action[Deploy To Dev].Package.NuGetPackageId']
$pkgid = $OctopusParameters['Octopus.Action[Deploy To Dev].Package.NuGetPackageVersion']
$env = $OctopusParameters['Octopus.Environment.Name']
$fp = 'C:\Octopus\Packages\{0}' -f $pname
# communication.1.0.31$
$pathName="{0... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/ec2-windows.ps1 | ec2-windows.ps1 | #<powershell>
# Set-ExecutionPolicy Unrestricted
# icm $executioncontext.InvokeCommand.NewScriptBlock((New-Object Net.WebClient).DownloadString('https://s3-eu-west-1.amazonaws.com/devops-mateli/scripts/ec2-windows.ps1')) -ArgumentList "Development"
#</powershell>
param(
[string]
[parameter(Mandatory=$tr... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/octopus-promote.ps1 | octopus-promote.ps1 |
param(
[string]
[parameter(Mandatory=$true)]
$user,
[string]
[parameter(Mandatory=$true)]
$branch,
[string]
[parameter(Mandatory=$true)]
$projectName,
)
function Promote {
$OctopusServer = "http://octopus.mateli.com"
$OctopusAPIKey = "API-OTHMLCFO6UTQT3KJJDXG... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/ebs-net-ruxit.ps1 | ebs-net-ruxit.ps1 | if (!(Test-Path -path 'C:\Program Files (x86)\ruxit\agent\')) {
#download installer zip file
$url = "https://okw37224.live.dynatrace.com/installer/agent/windows/msi/latest/AeSTiNUkTVAFE9o8"
$webclient = New-Object System.Net.WebClient
$destination = (Get-Item -Path ".\" -Verbose).Ful... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/flyway-condition-bff.ps1 | flyway-condition-bff.ps1 | #$projectType ="java"
#$user = %dep.MateliBff_BuildTestFeature.teamcity.build.triggeredBy.username%
#$branch = %dep.MateliBff_BuildTestFeature.teamcity.build.branch%
#$checkOutDir = %system.agent.work.dir%\%dep.MateliBff_BuildTestFeature.teamcity.build.default.checkoutDir%
param(
[string]
[parameter(Man... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/flyway-net-octopus.ps1 | flyway-net-octopus.ps1 | $pname = $OctopusParameters['Octopus.Action[Deploy To Server].Package.NuGetPackageId']
$pkgid = $OctopusParameters['Octopus.Action[Deploy To Server].Package.NuGetPackageVersion']
$fp = 'C:\Octopus\Packages\{0}' -f $pname
$fileName= "{0}.{1}" -f $pname, $pkgid
$path="{0}\{1}.{2}.nupkg" -f $fp, $pname, $pkgi... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/flyway-run.ps1 | flyway-run.ps1 | #$projectType ="java"
#$user = %dep.MateliBff_BuildTestFeature.teamcity.build.triggeredBy.username%
#$branch = %dep.MateliBff_BuildTestFeature.teamcity.build.branch%
#$checkOutDir = %system.agent.work.dir%\%dep.MateliBff_BuildTestFeature.teamcity.build.default.checkoutDir%
#$configName = "bff"
#$baseVersion ="0"... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/firewalloff.ps1 | firewalloff.ps1 | netsh advfirewall set allprofiles state off |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/iis.ps1 | iis.ps1 | Add-WindowsFeature `
Web-Server, ` ... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/localandmonitor.ps1 | localandmonitor.ps1 | $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
mkdir C:\temp
cd C:\temp
$client = new-object System.Net.WebClient
$client.DownloadFile("https://s3-eu-west-1.amazonaws.com/powershell-dotnet-scripts/setKeyboardTR.xml",... |
PowerShellCorpus/Github/Bilalaybar_powershells/powershells/turkishtime.ps1 | turkishtime.ps1 | #Here a a code snippet of how I set the timezone with Powershell
#Using either 'TZUtil' for Vista/Win7 or 'Control TimeDate.cpl' for XP
#Modify the next line with your desired timezone. We use Turkish so this doesnt really apply but in case we deploy to other regions
$timeZone = "Turkey Standard Time"
$regVer =... |
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_Provision_2017_4_6_28_5_20/.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/armandourbina_CursoOPSPanAm/MvcApplication1/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/armandourbina_CursoOPSPanAm/MvcApplication1/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/armandourbina_CursoOPSPanAm/MvcApplication1/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/armandourbina_CursoOPSPanAm/MvcApplication1/packages/EntityFramework.5.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$importedModule = Get-Module | ?{ $_.Name -eq 'EntityFramework' }
if ($PSVersionTable.PSVersion -ge (New-Object Version @( 3, 0 )))
{
$thisModuleManifest = 'EntityFramework.PS3.psd1'
}
else
{
$thisModuleManifest = 'EntityFramework.psd1'
}
$thisModule... |
PowerShellCorpus/Github/armandourbina_CursoOPSPanAm/MvcApplication1/packages/EntityFramework.5.0.0/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
function Invoke-ConnectionFactoryConfigurator($assemblyPath, $project)
{
$appDomain = [AppDomain]::CreateDomain(
'EntityFramework.PowerShell',
$null,
(New-Object System.AppDomainSetup -Property @{ ShadowCopyFiles = 'true' }))
... |
PowerShellCorpus/Github/armandourbina_CursoOPSPanAm/MvcApplication1/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/armandourbina_CursoOPSPanAm/MvcApplication1/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/armandourbina_CursoOPSPanAm/MvcApplication1/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/armandourbina_CursoOPSPanAm/MvcApplication1/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/armandourbina_CursoOPSPanAm/MvcApplication1/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/armandourbina_CursoOPSPanAm/MvcApplication1/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/musa-zulu_mini_projects/mini_projects/GettingStartedWithEntityFrameWork6/SimpleApplication/packages/EntityFramework.5.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$importedModule = Get-Module | ?{ $_.Name -eq 'EntityFramework' }
if ($PSVersionTable.PSVersion -ge (New-Object Version @( 3, 0 )))
{
$thisModuleManifest = 'EntityFramework.PS3.psd1'
}
else
{
$thisModuleManifest = 'EntityFramework.psd1'
}
$thisModule... |
PowerShellCorpus/Github/musa-zulu_mini_projects/mini_projects/GettingStartedWithEntityFrameWork6/SimpleApplication/packages/EntityFramework.5.0.0/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
function Invoke-ConnectionFactoryConfigurator($assemblyPath, $project)
{
$appDomain = [AppDomain]::CreateDomain(
'EntityFramework.PowerShell',
$null,
(New-Object System.AppDomainSetup -Property @{ ShadowCopyFiles = 'true' }))
... |
PowerShellCorpus/Github/musa-zulu_mini_projects/mini_projects/GettingStartedWithEntityFrameWork6/SimpleApplication/packages/jQuery.1.7.1.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/musa-zulu_mini_projects/mini_projects/GettingStartedWithEntityFrameWork6/SimpleApplication/packages/jQuery.1.7.1.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
$supportsJsIntelliSenseFile = [System.Version]::Parse($dte.Version).Major -ge 11
if (-not $supportsJsIntelliSenseFile) {
Write-Host "IntelliSense JS files are n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.