full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/Stijnc_Resource-Manager/AzureAutomationRunbook/Scripts/Deploy-AzureResourceGroup.ps1
Deploy-AzureResourceGroup.ps1
#Requires -Version 3.0 Param( [string] [Parameter(Mandatory=$true)] $ResourceGroupLocation, [string] $ResourceGroupName = 'ResourceManager', [switch] $UploadArtifacts, [string] $StorageAccountName, [string] $StorageContainerName = $ResourceGroupName.ToLowerInvariant() + '-stageartifacts', [string]...
PowerShellCorpus/Github/Stijnc_Resource-Manager/AzureAutomationRunbook/Scripts/AzureAutomationWorkflow.ps1
AzureAutomationWorkflow.ps1
# # AzureAutomationWorkflow.ps1 # Workflow Hello-ARM { Write-Output "Hello, I'm created using ARM :-) " }
PowerShellCorpus/Github/Stijnc_Resource-Manager/SingleWindowsVMExtDSCAutomation/Scripts/Deploy-AzureResourceGroup.ps1
Deploy-AzureResourceGroup.ps1
#Requires -Version 3.0 Param( [string] [Parameter(Mandatory=$true)] $ResourceGroupLocation, [string] $ResourceGroupName = 'ResourceManager', [switch] $UploadArtifacts, [string] $StorageAccountName, [string] $StorageContainerName = $ResourceGroupName.ToLowerInvariant() + '-stageartifacts', [string]...
PowerShellCorpus/Github/Stijnc_Resource-Manager/SingleWindowsVMExtDSCScript/Scripts/Deploy-AzureResourceGroup.ps1
Deploy-AzureResourceGroup.ps1
#Requires -Version 3.0 Param( [string] [Parameter(Mandatory=$true)] $ResourceGroupLocation, [string] $ResourceGroupName = 'ResourceManager', [switch] $UploadArtifacts, [string] $StorageAccountName, [string] $StorageContainerName = $ResourceGroupName.ToLowerInvariant() + '-stageartifacts', [string]...
PowerShellCorpus/Github/Stijnc_Resource-Manager/MultipleVMsWithDatadisk/Scripts/Deploy-AzureResourceGroup.ps1
Deploy-AzureResourceGroup.ps1
#Requires -Version 3.0 Param( [string] [Parameter(Mandatory=$true)] $ResourceGroupLocation, [string] $ResourceGroupName = 'TestStorageAccountDeployment', [switch] $UploadArtifacts, [string] $StorageAccountName, [string] $StorageContainerName = $ResourceGroupName.ToLowerInvariant() + '-stageartifacts'...
PowerShellCorpus/Github/Stijnc_Resource-Manager/SingleVMChooseStorageType/Scripts/Deploy-AzureResourceGroup.ps1
Deploy-AzureResourceGroup.ps1
#Requires -Version 3.0 Param( [string] [Parameter(Mandatory=$true)] $ResourceGroupLocation, [string] $ResourceGroupName = 'ResourceManager', [switch] $UploadArtifacts, [string] $StorageAccountName, [string] $StorageContainerName = $ResourceGroupName.ToLowerInvariant() + '-stageartifacts', [string]...
PowerShellCorpus/Github/haraldfianbakken_Fianbakken.PowershellUtils/Diff-utils/Fianbakken.DiffUtils.ps1
Fianbakken.DiffUtils.ps1
<# .Synopsis Merge 2 json structures .DESCRIPTION Long description .EXAMPLE Example of how to use this cmdlet .EXAMPLE Another example of how to use this cmdlet #> function Diff-Json{ [CmdletBinding()] [Alias()] [OutputType([json])] Param ( # Param1 help descripti...
PowerShellCorpus/Github/haraldfianbakken_Fianbakken.PowershellUtils/Release-management/Release.ps1
Release.ps1
# Powershell release script for bumping package.json and bower.json # Builds a web project (simple) task using npm, bower and gulp . # Pushes the correct tags to git. # Then assembles a package and uploads the web-package to artifactory with the right version # Harald S. Fianbakken <harald.fianbakken@gmail.com> ...
PowerShellCorpus/Github/monday-night-lights_mnl-api/src/mnl-api/Properties/PublishProfiles/mnl-api-publish.ps1
mnl-api-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'] = '86e194b2-c35d-4d7...
PowerShellCorpus/Github/markusFrost_Sports-Store/SportsStore/packages/Microsoft.AspNet.Providers.LocalDB.1.1/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) try { # Set up variables $timestamp = (Get-Date).ToString('yyyyMMddHHmmss') $projectName = [IO.Path]::GetFileName($project.ProjectName.Trim([IO.PATH]::DirectorySeparatorChar, [IO.PATH]::AltDirectorySeparatorChar)) $catalogName = "aspnet-$project...
PowerShellCorpus/Github/markusFrost_Sports-Store/SportsStore/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/markusFrost_Sports-Store/SportsStore/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/markusFrost_Sports-Store/SportsStore/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/markusFrost_Sports-Store/SportsStore/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...
PowerShellCorpus/Github/markusFrost_Sports-Store/SportsStore/packages/jQuery.1.7.1.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/DXFrance_back2hack/scripts/powershell/create_hdinsight_cluster_linux.ps1
create_hdinsight_cluster_linux.ps1
#region init Import-Module azure echo $PSVersionTable Get-Module azure Switch-AzureMode -Name AzureResourceManager Add-AzureAccount #NB all $b_* variables are defined on my laptop. Replace with your own values in this script. #psedit C:\benjguin\_e\config\benjguin_config_in_PowerShell.ps1 $createCluster=$tr...
PowerShellCorpus/Github/DXFrance_back2hack/scripts/powershell/create_hdinsight_cluster_windows.ps1
create_hdinsight_cluster_windows.ps1
#region init Import-Module azure echo $PSVersionTable Get-Module azure Switch-AzureMode -Name AzureResourceManager Add-AzureAccount #NB all $b_* variables are defined on my laptop. Replace with your own values in this script. #psedit C:\benjguin\_e\config\benjguin_config_in_PowerShell.ps1 $createCluster=$tr...
PowerShellCorpus/Github/chipolux_Multi_Minecraft/_TEMPLATE/Resize-Minecraft.ps1
Resize-Minecraft.ps1
#Resize-Minecraft.ps1 - Script to resize minecraft client to 720p -chipolux Add-Type @" using System; using System.Runtime.InteropServices; public class Win32 { [DllImport("user32.dll")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool GetWindowRect(IntPtr hWnd, out RECT lp...
PowerShellCorpus/Github/esnijder_azure_arm_templates/rds-deployment-ha-gateway/Scripts/WebAndGwFarmAdd_PostConfig1.1.ps1
WebAndGwFarmAdd_PostConfig1.1.ps1
param ( [String]$WebGwServer, [String]$BrokerServer, [String]$WebURL, [String]$Domainname, [String]$DomainNetbios, [String]$username, [String]$password, [string]$ServerName = "alt-gw-p0", [int]$numberofwebServers, $validationKey64, $de...
PowerShellCorpus/Github/esnijder_azure_arm_templates/active-directory-new-domain-ha-2-dc/DSC/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 -ModuleName xA...
PowerShellCorpus/Github/esnijder_azure_arm_templates/active-directory-new-domain-ha-2-dc/DSC/ConfigureADBDC.ps1
ConfigureADBDC.ps1
configuration ConfigureADBDC { param ( [Parameter(Mandatory)] [String]$DomainName, [Parameter(Mandatory)] [System.Management.Automation.PSCredential]$Admincreds, [Int]$RetryCount=20, [Int]$RetryIntervalSec=30 ) Import-DscResource -ModuleNam...
PowerShellCorpus/Github/esnijder_azure_arm_templates/active-directory-new-domain-ha-2-dc/DSC/PrepareADBDC.ps1
PrepareADBDC.ps1
configuration PrepareADBDC { param ( [Parameter(Mandatory)] [String]$DNSServer, [Int]$RetryCount=20, [Int]$RetryIntervalSec=30 ) Import-DscResource -ModuleName xStorage, xNetworking $Interface=Get-NetAdapter|Where Name -Like "Ethernet*"|Select-Object -Fi...
PowerShellCorpus/Github/esnijder_azure_arm_templates/rds-update-rdsh-collection/Scripts/Script.ps1
Script.ps1
[cmdletbinding()] param( [parameter(mandatory = $true)] [string]$domain, [parameter(mandatory = $true)] [string]$username, [parameter(mandatory = $true)] [string]$password, [parameter(mandatory = $true)] [string]$collection, [parameter(mandatory = $true)] ...
PowerShellCorpus/Github/SheffSix_SIMS2Oliver/coreFunctions.ps1
coreFunctions.ps1
Function Speak() { Param ( [Parameter(Position=1)][string]$Message, [switch]$Time, [switch]$NoNewLine ) $TheTime = Now If ($TIME) { $Message = "${TheTime} ${Message}" } If ($NoNewLine) { write-host -NoNewLine $Message } Else { write-host $Message } } Function Bork ([INT]$error = 0)...
PowerShellCorpus/Github/SheffSix_SIMS2Oliver/sims2oliver.ps1
sims2oliver.ps1
<# .SYNOPSIS Creates a CSV file to synchronise Oliver borrowers for students and staff using reports generated from SIMS. #> . "${PSScriptRoot}\coreFunctions.ps1" . "${PSScriptRoot}\Config.ps1" Function RunSIMSReport($ReportName, $OutputFile) { If (Test-Path -Path ${OutputFile}){ Remove-Item -Path ${Outp...
PowerShellCorpus/Github/SheffSix_SIMS2Oliver/Config.dist.ps1
Config.dist.ps1
#Date and time stuff $FSTimeFormat = "yyyy\-MM\-dd\THH\-mm\-ss" $ReadableTimeFormat = "dd\/MM\/yyyy\ HH\:mm\:ss" $StartDate = Date $StartTime = Get-Date -Date $StartDate -f $FSTimeFormat $ThisMonth = Get-Date -f MMM #Set file and folder locations $ReportsFolder = "${PSScriptRoot}\Reports" If (Test-Path -Path ...
PowerShellCorpus/Github/Durgaprasad-Budhwani_Net-Migrater-v4.5/migrator4.5.ps1
migrator4.5.ps1
Clear-Host #$exPolicy = Get-ExecutionPolicy #Write-Host "Current execution policy is $exPolicy, will be changed to RemoteSigned. Will be reverted once the execution of script is complete" -ForegroundColor Cyan #Set-ExecutionPolicy RemoteSigned -Force function Save-Project ($fileName, [xml]$xml) { $i...
PowerShellCorpus/Github/DeprecatedWork_PersonalWebsite_2nd/Properties/PublishProfiles/jesswhite - Web Deploy-publish.ps1
jesswhite - Web Deploy-publish.ps1
[cmdletbinding(SupportsShouldProcess=$true)] param($publishProperties, $packOutput, $nugetUrl) # to learn more about this file visit http://go.microsoft.com/fwlink/?LinkId=524327 $publishModuleVersion = '1.0.1' function Get-VisualStudio2015InstallPath{ [cmdletbinding()] param() process{ $k...
PowerShellCorpus/Github/DeprecatedWork_PersonalWebsite_2nd/bin/output/approot/packages/Newtonsoft.Json/6.0.6/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/DeprecatedWork_PersonalWebsite_2nd/bin/output/approot/packages/Microsoft.CodeAnalysis.Analyzers/1.0.0/tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) $analyzersPaths = Join-Path (Join-Path (Split-Path -Path $toolsPath -Parent) "analyzers" ) * -Resolve foreach($analyzersPath in $analyzersPaths) { # Uninstall the language agnostic analyzers. if (Test-Path $analyzersPath) { foreach ($ana...
PowerShellCorpus/Github/DeprecatedWork_PersonalWebsite_2nd/bin/output/approot/packages/Microsoft.CodeAnalysis.Analyzers/1.0.0/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) $analyzersPaths = Join-Path (Join-Path (Split-Path -Path $toolsPath -Parent) "analyzers" ) * -Resolve foreach($analyzersPath in $analyzersPaths) { # Install the language agnostic analyzers. if (Test-Path $analyzersPath) { foreach ($analy...
PowerShellCorpus/Github/DeprecatedWork_PersonalWebsite_2nd/bin/output/approot/packages/EntityFramework.Commands/7.0.0-rc1-final/tools/init.ps1
init.ps1
param ($installPath, $toolsPath, $package, $project) if (Get-Module | ? Name -eq EntityFramework) { Remove-Module EntityFramework } Import-Module (Join-Path $PSScriptRoot EntityFramework.psd1) -DisableNameChecking # SIG # Begin signature block # MIIkCgYJKoZIhvcNAQcCoIIj+zCCI/cCAQExDzANBglghkgBZQMEAgEFAD...
PowerShellCorpus/Github/DeprecatedWork_PersonalWebsite_2nd/bin/output/approot/packages/EntityFramework.Commands/7.0.0-rc1-final/tools/install.ps1
install.ps1
param ($installPath, $toolsPath, $package, $project) Write-Host Write-Host 'Type ''get-help EntityFramework'' to see all available Entity Framework commands.' Write-Host # SIG # Begin signature block # MIIkCgYJKoZIhvcNAQcCoIIj+zCCI/cCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCA...
PowerShellCorpus/Github/JamesWoolfenden_packerdemo/Set-AWSAccountEnv.ps1
Set-AWSAccountEnv.ps1
#this script assume your using dev and sets it too the prod aws cred Param( [Parameter(Mandatory=$true)] [string]$awsprofile) $exists="$(aws configure get aws_access_key_id --profile $awsprofile)" if ($exists) { [Environment]::SetEnvironmentVariable("AWS_DEFAULT_PROFILE","$awsprofile","m...
PowerShellCorpus/Github/JamesWoolfenden_packerdemo/setup-pc.ps1
setup-pc.ps1
winrm quickconfig set-item WSMan:\localhost\Client\AllowUnencrypted -Value True set-item WSMan:\localhost\Client\Auth\Basic -Value True set-item WSMan:\localhost\Client\TrustedHosts -Value * set-item WSMan:\localhost\Service\AllowUnencrypted -Value True set-item WSMan:\localhost\Service\Auth\Basic -Value True ...
PowerShellCorpus/Github/JamesWoolfenden_packerdemo/ssh.ps1
ssh.ps1
param( [Parameter(Mandatory=$true)] [string]$keyfile) ssh-keygen -t rsa -b 4096 -f .\secret\$keyfile
PowerShellCorpus/Github/christophercsmall_COP4813/Module 2/cop4813_Module2/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/christophercsmall_COP4813/Module 2/cop4813_Module2/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/jackhwl_Powershell_Installer/e.ps1
e.ps1
$Policy = "Unrestricted" If ((get-ExecutionPolicy) -ne $Policy) { Set-ExecutionPolicy $Policy -Force } $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition #*********************************************************************** #************************* DB Powershell Init *******************...
PowerShellCorpus/Github/jackhwl_Powershell_Installer/EcmInstall - Copy.ps1
EcmInstall - Copy.ps1
param( [string]$IN_BEPLOY_POWERSHELL_CONFIG_FILE = "ConfigFile.xml", [string]$IN_BEPLOY_SCRIPT = "\\Deploy Script Folder", [string]$IN_INSTALL_FOLDER = "\\INSTALL WEBSITE Folder", [string]$IN_SOURCE_CODE = "\\Source Code Folder", [string]$IN_BINARY = "\\Build Folder", [string]$IN_DB ...
PowerShellCorpus/Github/jackhwl_Powershell_Installer/EcmInstall2.ps1
EcmInstall2.ps1
$Policy = "Unrestricted" If ((get-ExecutionPolicy) -ne $Policy) { Set-ExecutionPolicy $Policy -Force } $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition #*********************************************************************** #************************* DB Powershell Init *******************...
PowerShellCorpus/Github/jackhwl_Powershell_Installer/ee0.ps1
ee0.ps1
echo "call ee.ps1 start" .\ee.ps1 –applicationPoolIdentityPassword horton –dBServerPassword adminski echo "call ee.ps1 end"
PowerShellCorpus/Github/jackhwl_Powershell_Installer/EcmInstall.ps1
EcmInstall.ps1
$Policy = "Unrestricted" If ((get-ExecutionPolicy) -ne $Policy) { Set-ExecutionPolicy $Policy -Force } $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition #*********************************************************************** #************************* DB Powershell Init *******************...
PowerShellCorpus/Github/jackhwl_Powershell_Installer/EcmInstall0.ps1
EcmInstall0.ps1
param( [string]$IN_BEPLOY_POWERSHELL_CONFIG_FILE = "ConfigFile.xml", [string]$IN_BEPLOY_SCRIPT = "\\Deploy Script Folder", [string]$IN_INSTALL_FOLDER = "\\INSTALL WEBSITE Folder", [string]$IN_SOURCE_CODE = "\\Source Code Folder", [string]$IN_BINARY = "\\Build Folder", [string]$IN_DB ...
PowerShellCorpus/Github/jackhwl_Powershell_Installer/ee.ps1
ee.ps1
param ( [string]$configFile = "site.config", [string]$InstallFolder = "Package", [string]$applicationPoolIdentityPassword = "", [string]$dBServerPassword = "" ) $Policy = "Unrestricted" If ((get-ExecutionPolicy) -ne $Policy) { Set-ExecutionPolicy $Policy -Force } $scriptPath = split-path -parent $MyInv...
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Print-ServiceNowIncidents.ps1
Print-ServiceNowIncidents.ps1
<#******************************************* Using global var to store auth creds in. Will not work in PS Workflow. *********************************************#> $Cred = Get-AutomationPSCredential -Name 'ServiceNowCred' $Url = "msitpovitsmpov.service-now.com" Write-Output "Testing using auth`n`n" Set-...
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/Say-HelloSample.ps1
Say-HelloSample.ps1
Write-Output "Hello" Get-Date Get-Module -ListAvailable
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/PowerShellRunbookinAutomation.ps1
PowerShellRunbookinAutomation.ps1
Get-Date Write-Output "PowerShell rocks"
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/ServiceIsRunning.ps1
ServiceIsRunning.ps1
workflow ServiceIsRunning { "Test DSC conflict" }
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/DraftRunbook.ps1
DraftRunbook.ps1
workflow DraftRunbook { Write-Output "I am a draft" }
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/Watch-VMRunningState.ps1
Watch-VMRunningState.ps1
workflow Watch-VMRunningState { param ( #Monitor AWS [bool] $checkAWS = $true, #Monitor VMware [bool] $checkVMware = $false ) #Keep the last failed machines $DownAwsMachines = @() $DownVMwareMachines = @() while ($true) { #*********...
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/BaaadWF.ps1
BaaadWF.ps1
workflow BaadWF { Write-Output "Not so bad anymore..." }
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/Watch-SharePointList.ps1
Watch-SharePointList.ps1
workflow Watch-SharePointList { $ListName = "Support Requests" $Cred = Get-AutomationPSCredential -Name 'SharePointCred' $URL = "https://scautomation.sharepoint.com" $SqlServer = "pc2lg0xblg.database.windows.net" $Database = "MyDB" $ListItemID = InlineScript { ...
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/Test-GitHubCheckIn.ps1
Test-GitHubCheckIn.ps1
workflow Test-GitHubCheckIn { Get-Date }
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/Monitor-GitHubTrigger.ps1
Monitor-GitHubTrigger.ps1
<# .SYNOPSIS Monitors a GitHub repository, downloads the GitHub repo, and publishes the ARM template in the repo. .DESCRIPTION This runbook monitors an a GitHub respository looking for a new commit. Once a commit is found, it downloads the repository, and publishes the specified ARM tem...
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/Deploy-ArmTemplate.ps1
Deploy-ArmTemplate.ps1
<# .SYNOPSIS Deploys an Azure Resource Manager template .DESCRIPTION This runbook deploys an Azure Resource Manager template using a template an a parameter template. Use this runbook after downloading the resource templates to the Automation runbook host. You can use https://gallery.techn...
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/SampleARMdeploy.ps1
SampleARMdeploy.ps1
#Connect to your Azure account Add-AzureAccount #Select your subscription if you have more than one Select-AzureSubscription -SubscriptionId "f2092f2a-a813-4e15-856d-64c11ad8ec33" #Use Azure resource Manager to deploy template (note this is being deprecated) Switch-AzureMode -Name AzureResourceManager #Se...
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/Backup-AzureCloudServiceVMs.ps1
Backup-AzureCloudServiceVMs.ps1
<# .SYNOPSIS This Azure Automation runbook provides a way to back up data and OS disks of Azure VMs in a specified Cloud Service using only the native Azure module cmdlets. If specified it will shutdown and restart VMs that are running. Backup Location defaults to vhd-backups container in the same s...
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/Get-AwsProblemVMs.ps1
Get-AwsProblemVMs.ps1
workflow Get-AwsProblemVMs { [OutputType([string[]])] #Retrieve the values for the access and secret key $Creds = Get-AutomationPSCredential -Name 'AWSCredentials' $AccessKey = $Creds.UserName $SecretKey = $Creds.GetNetworkCredential().Password $DefaultRegion = "us-west-1" ...
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/Start-StoppedServices.ps1
Start-StoppedServices.ps1
workflow Start-StoppedServices { param ( [string] $ComputerName = "cooper-sma", [string] $CredentialName = "Cooper-Sma-Cred", [string] $ServiceName = "aspnet_state" ) #Retreive credential from secure asset store $Cred = Get-AutomationPSCredential -Name $CredentialName #Remote to specified m...
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/Get-AzureVMTutorial.ps1
Get-AzureVMTutorial.ps1
<# .DESCRIPTION An example runbook which prints out the first 10 Azure VMs in your subscription (ordered alphabetically). For more information about how this runbook authenticates to your Azure subscription, see our documentation here: http://aka.ms/fxu3mn .NOTES AUTHOR: Azure Aut...
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/Get-VMwareProblemVMs.ps1
Get-VMwareProblemVMs.ps1
workflow Get-VMwareProblemVMs { [OutputType([string[]])] #This is the host that has the VMware module installed on it #You can remove if PowerCLI is installed on all of your runbook workers $HostWithVMwareModule = "MyHost" #Retrieve server and credentials from Assets $Server = Get-Aut...
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/Send-Email.ps1
Send-Email.ps1
<# .SYNOPSIS Sends an email .DESCRIPTION This runbook sends an email using the specified body, subject and email address It can be called from a monitoring or troubleshooting runbook to alert the on call employee of a potential issue. REQUIREMENTS You must add an asset containing the ...
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/MyPowerShellRunbook.ps1
MyPowerShellRunbook.ps1
Write-Output "Hello world!" $i = 10 Write-Output "Divide by 0?!" $i/0
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/Copy-BlobAcrossStorageAccount.ps1
Copy-BlobAcrossStorageAccount.ps1
<# This PowerShell script was automatically converted to PowerShell Workflow so it can be run as a runbook. Specific changes that have been made are marked with a comment starting with “Converter:” #> workflow Copy-BlobAcrossStorageAccount { # Converter: Wrapping initial script in an InlineScript activity, ...
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/Get-IsWorkHours.ps1
Get-IsWorkHours.ps1
<# .SYNOPSIS Determines whether the current time is in or out of work hours .DESCRIPTION This runbook determines if the current time is in or out of work hours. It checks if the time is in the specified work hours range and if it is a weekend. Returns $true if the time is in work hour...
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/Runbooks/Install-ModuleOnAzureVM.ps1
Install-ModuleOnAzureVM.ps1
workflow Install-ModuleOnAzureVM { param ( [parameter(Mandatory=$true)] [String] $AzureConnectionName, [parameter(Mandatory=$true)] [String] $CredentialAssetNameWithAccessToVM, [parameter(Mandatory=$true)] [String] $ModuleS...
PowerShellCorpus/Github/epc2101_AzureAutomationRunbooks/AzureAutomationRunbooks/Runbooks/Backup-AzureCloudServiceVMs.ps1
Backup-AzureCloudServiceVMs.ps1
<# .SYNOPSIS This Azure Automation runbook provides a way to back up data and OS disks of Azure VMs in a specified Cloud Service using only the native Azure module cmdlets. If specified it will shutdown and restart VMs that are running. Backup Location defaults to vhd-backups container in the same s...
PowerShellCorpus/Github/davidyang99_Azure/Runbooks/Start-AzureRMVMs.ps1
Start-AzureRMVMs.ps1
<# .DESCRIPTION start VMs created in resoucemanger mode one parameter $ResourceGroupName .NOTES AUTHOR: David Yang LASTEDIT: Nov 4, 2015 #> workflow Start-AzureRMVMs { param( [string]$ResourceGroupName ) #The name of the Automation Credent...
PowerShellCorpus/Github/davidyang99_Azure/Runbooks/Stop-AzureRMVMs.ps1
Stop-AzureRMVMs.ps1
<# .DESCRIPTION stop VMs created in resoucemanger mode one parameter $ResourceGroupName .NOTES AUTHOR: David Yang LASTEDIT: Nov 4, 2015 #> workflow Stop-AzureRMVMs { param( [string]$ResourceGroupName ) #Get the credential with the above name ...
PowerShellCorpus/Github/maravedi_CheckExport/RestartAXImport.ps1
RestartAXImport.ps1
# RestartAXImport.ps1 # Monitors the folder in which referrals are placed for pickup and transmission to AppXtender # "Normal" cause is commonly the AxImport service gets hung-up and needs to be restarted # to get documents flowing to AppXtender again. # # David Frazer 10/27/2015 # # Change History # - 01-15-20...
PowerShellCorpus/Github/maravedi_CheckExport/CheckReferralExport.ps1
CheckReferralExport.ps1
# CheckReferralExport.ps1 # Monitors the folder in which referrals are placed for pickup and transmission # to AppXtender # # "Normal" cause is commonly the AxImport service gets hung-up and needs to be # restarted to get documents flowing to AppXtender again. # # David Frazer 10/27/2015 # # Change History ...
PowerShellCorpus/Github/Rocketcandy_ConvertUsingHandBreakCLI/ConvertUsingHandBrakeCLI.ps1
ConvertUsingHandBrakeCLI.ps1
#### Change values below to match your enviroment ##### ### Specify Directories below ### # TV Shows directory $TvShowDir = "C:\Path\To\Episodes" # Movies directory $MovieDir = "\\File.Server\Path\To\Movies" # HandBreakCLI Directory (Wherever you extracted Handbreak to. Example: C:\Downloads\HandBrake...
PowerShellCorpus/Github/LockheedMartinEntityFramework_Day1/Module 2 - Choosing a Workflow/Code/Entity Framework/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/LockheedMartinEntityFramework_Day1/Module 2 - Choosing a Workflow/Code/Entity Framework/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/PuscaGhenadie_PSProject/Webshop/packages/Microsoft.AspNet.Providers.LocalDB.1.1/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) try { # Set up variables $timestamp = (Get-Date).ToString('yyyyMMddHHmmss') $projectName = [IO.Path]::GetFileName($project.ProjectName.Trim([IO.PATH]::DirectorySeparatorChar, [IO.PATH]::AltDirectorySeparatorChar)) $catalogName = "aspnet-$projectNa...
PowerShellCorpus/Github/PuscaGhenadie_PSProject/Webshop/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/PuscaGhenadie_PSProject/Webshop/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/PuscaGhenadie_PSProject/Webshop/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/PuscaGhenadie_PSProject/Webshop/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...
PowerShellCorpus/Github/PuscaGhenadie_PSProject/Webshop/packages/jQuery.1.7.1.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/xlgwr_RobotERP/src/RobotERP.IdentityServer/Properties/PublishProfiles/d-publish.ps1
d-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'] = 'af1359c8-beed-4b5...
PowerShellCorpus/Github/RamsesVeloso_Azure-Scripts/SCCM/SCCM2012R2-InstallPrerequisites.ps1
SCCM2012R2-InstallPrerequisites.ps1
######################################################################################## # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL TH...
PowerShellCorpus/Github/RamsesVeloso_Azure-Scripts/Azure.Storage/ASM-FindUnattachedDisks.ps1
ASM-FindUnattachedDisks.ps1
######################################################################################## # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL TH...
PowerShellCorpus/Github/RamsesVeloso_Azure-Scripts/Exchange/Exchange2013-InstallPrerequisites.ps1
Exchange2013-InstallPrerequisites.ps1
######################################################################################## # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL TH...
PowerShellCorpus/Github/RamsesVeloso_Azure-Scripts/ActiveDirectory/ADDS-DeployForestUnattended.ps1
ADDS-DeployForestUnattended.ps1
######################################################################################## # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL TH...
PowerShellCorpus/Github/RamsesVeloso_Azure-Scripts/ActiveDirectory/ADDS-CreateOUs.ps1
ADDS-CreateOUs.ps1
######################################################################################## # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL TH...
PowerShellCorpus/Github/RamsesVeloso_Azure-Scripts/ActiveDirectory/ADDS-TestConnectivity.ps1
ADDS-TestConnectivity.ps1
######################################################################################## # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL TH...
PowerShellCorpus/Github/RamsesVeloso_Azure-Scripts/ActiveDirectory/ADDS-DeployForestInteractive.ps1
ADDS-DeployForestInteractive.ps1
######################################################################################## # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL TH...
PowerShellCorpus/Github/RamsesVeloso_Azure-Scripts/ActiveDirectory/ADDS-ProtectObjects.ps1
ADDS-ProtectObjects.ps1
######################################################################################## # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL TH...
PowerShellCorpus/Github/RamsesVeloso_Azure-Scripts/Lync/Lync2013-InstallPrerequisites.ps1
Lync2013-InstallPrerequisites.ps1
######################################################################################## # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL TH...
PowerShellCorpus/Github/RamsesVeloso_Azure-Scripts/WindowsServer/WS2012R2-InstallAllIisFeatures.ps1
WS2012R2-InstallAllIisFeatures.ps1
######################################################################################## # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL TH...
PowerShellCorpus/Github/RamsesVeloso_Azure-Scripts/Office365/O365-ConnectToOffice365.ps1
O365-ConnectToOffice365.ps1
######################################################################################## # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL TH...
PowerShellCorpus/Github/RamsesVeloso_Azure-Scripts/Azure.Subscription/ARM-CreateResourceGroup.ps1
ARM-CreateResourceGroup.ps1
######################################################################################## # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL TH...
PowerShellCorpus/Github/RamsesVeloso_Azure-Scripts/Azure.Subscription/ASM-CleanUpSubscription.ps1
ASM-CleanUpSubscription.ps1
######################################################################################## # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL TH...
PowerShellCorpus/Github/RamsesVeloso_Azure-Scripts/Azure.Subscription/ASM-LoginToAzure.ps1
ASM-LoginToAzure.ps1
######################################################################################## # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL TH...
PowerShellCorpus/Github/RamsesVeloso_Azure-Scripts/Azure.Subscription/ARM-LoginToAzure.ps1
ARM-LoginToAzure.ps1
######################################################################################## # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL TH...
PowerShellCorpus/Github/RamsesVeloso_Azure-Scripts/Azure.Network/ASM-CreateVnet.ps1
ASM-CreateVnet.ps1
######################################################################################## # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL TH...
PowerShellCorpus/Github/RamsesVeloso_Azure-Scripts/Azure.Network/ARM-CreatePublicIp.ps1
ARM-CreatePublicIp.ps1
######################################################################################## # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL TH...
PowerShellCorpus/Github/RamsesVeloso_Azure-Scripts/Azure.Network/ARM-CreateVnetGateway.ps1
ARM-CreateVnetGateway.ps1
######################################################################################## # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL TH...