code
stringlengths
2
1.05M
repo_name
stringlengths
5
101
path
stringlengths
4
991
language
stringclasses
3 values
license
stringclasses
5 values
size
int64
2
1.05M
$targetServer = 'SCSBENSQLDEV01' $targetDB = 'ATOReporting_UAT' $targetSchema = 'aux' $targetTable = 'DistributionLists' [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.Smo') $SMO = New-Object 'Microsoft.SqlServer.Management.Smo.Server' $targetServer $Database = $SMO.Databases.Item($targetDB) ...
mrkaminski77/Create-AuditTrigger
Create-AuditTrigger.ps1
PowerShell
mit
4,978
# Localized resources for WindowsPackageCab ConvertFrom-StringData @' RetrievingPackage = Retrieving information for the package {0} PackageEnsureState = The package {0} is currently {1} SourcePathDoesNotExist = Could not find the source file at path {0} SetTargetResourceStarting = Starting configurat...
corydwood/PSDscResources
DscResources/MSFT_WindowsPackageCab/en-US/MSFT_WindowsPackageCab.strings.psd1
PowerShell
mit
720
# Copyright (c) 2020 Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License (MIT) function Get-RsRestCacheRefreshPlan { <# .SYNOPSIS This function fetches a CacheRefreshPlan from a Power BI report. .DESCRIPTION This function fetches a CacheRefreshPlan f...
SQLvariant/ReportingServicesTools
ReportingServicesTools/Functions/CatalogItems/Rest/Get-RsRestCacheRefreshPlan.ps1
PowerShell
mit
5,252
Param ( [switch]$Publish ) $ErrorActionPreference = "Stop" $global:ExitCode = 1 function Write-Log { #region Parameters [cmdletbinding()] Param( [Parameter(ValueFromPipeline=$true)] [array] $Messages, [Parameter()] [ValidateSet("Error", "Warn", "Info")] [string] $Level = "Info", [Paramete...
c-mcauliffe/Sitecore-Commerce-LINQPad
NuGetPackage/NuGetPackage.ps1
PowerShell
mit
8,872
. ..\utils\make-exercise-repo.ps1 Set-Content -Value "hello" -Path file1.txt git checkout -b master
praqma-training/gitkatas
ignore/setup.ps1
PowerShell
mit
102
function Set-DbaLogin { <# .SYNOPSIS Set-DbaLogin makes it possible to make changes to one or more logins. SQL Azure DB is not supported. .DESCRIPTION Set-DbaLogin will enable you to change the password, unlock, rename, disable or enable, deny or grant login privileges to the login....
kozloski/dbatools
functions/Set-DbaLogin.ps1
PowerShell
mit
18,019
## SharePoint Server: PowerShell Script to Activate Features Across All Site Collections and Sites (webs) in a Web Application ## <# Overview: PowerShell Script to activate a Feature ID across all Sites in all Site Collections in a Web Application Environments: SharePoint Server 2010 / 2013 Farms Usage: Edit the f...
borkit/scriptdump
PowerShell/Working/SharePoint/SharePoint2010/SP2010ActivateFeatureForAllSiteCollectionsAndSites.ps1
PowerShell
mit
1,025
$totalNumberOfThings = 10 $currentCount = 0 while ($currentCount -le $totalNumberOfThings) { $params = @{Activity = 'Currently Doing Stuff' CurrentOperation = "$currentCount / $totalNumberOfThings" PercentComplete = $currentCount} Write-Progress @params $currentCo...
doomjaw87/P0w3rSh3ll
Examples/write-progress example.ps1
PowerShell
mit
356
$packageName = 'awscli' $installerType = 'msi' $silentArgs = '/quiet /qn /norestart' $url = 'https://s3.amazonaws.com/aws-cli/AWSCLI32-1.11.59.msi' $checksum = '4ee2aeb36dbea6e1cabd9f8095fe99d510b6b55506f40173a1a3f6cbc15a2108' $checksumType = 'sha256' $url64 = 'https://s3.amazonaws.com/aws-cli/AWSCLI64-1.11.59.msi' $c...
dtgm/chocolatey-packages
automatic/_output/awscli/1.11.59/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
985
param([String]$testClass) $Global:lastRun = $(date) $testDllDirPath = "$PSScriptRoot\test\VisualBasic\CodeCracker.Test\bin\Debug\" $testDllFileName = "CodeCracker.Test.VisualBasic.dll" $Global:testDllFullFileName = "$testDllDirPath$testDllFileName" $Global:xunitConsole = "$PSScriptRoot\packages\xunit.runners.2.0.0-rc1-...
f14n/code-cracker
runTestsVB.ps1
PowerShell
apache-2.0
1,822
@{ Description = 'Provides common functionality used by multiple Boxstarter Modules' # Script module or binary module file associated with this manifest. ModuleToProcess = './boxstarter.common.psm1' # Version number of this module. ModuleVersion = '1.1.35' # ID used to uniquely identify this module GUID = 'b...
kmcginnes/BoxStarter
Boxstarter.Common/boxstarter.common.psd1
PowerShell
apache-2.0
1,497
configuration Configuration { param ( [Parameter(Mandatory)] [String]$DomainName, [Parameter(Mandatory)] [String]$DCName, [Parameter(Mandatory)] [String]$DPMPName, [Parameter(Mandatory)] [String]$PSName, [Parameter(Mandatory)] [Strin...
daltskin/azure-quickstart-templates
sccm-technicalpreview/DSC/DCConfiguration.ps1
PowerShell
mit
5,493
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") . "$here\$sut" Describe "Grani_ScheduleTask : TestScheduledTaskStatus" { $taskName = "hoge" $taskPath = "\" $execute = "powershell.exe" $argument = "-Command 'Get-Dat...
guitarrapc/GraniResource
Tests/Grani_ScheduleTask/TestScheduledTaskStatus.Tests.ps1
PowerShell
mit
1,878
# # Module manifest for module 'AzureRM.RecoveryServices.Backup' # # Generated by: Microsoft Corporation # # Generated on: 8/28/2018 # @{ # Script module or binary module file associated with this manifest. # RootModule = '' # Version number of this module. ModuleVersion = '4.4.1' # Supported PSEditions # Compatibl...
ClogenyTechnologies/azure-powershell
src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/AzureRM.RecoveryServices.Backup.psd1
PowerShell
apache-2.0
6,758
#requires -Module VstsTaskSdk # VstsTaskSdk is required above for Assert-VstsPath and Get-VstsTaskVariable # defined in ToolFunctions.ps1 and prefixed by VstsTaskSdk.psd1 which specifies DefaultCommandPrefix = 'Vsts' # Existing symbol binary layout # V1 agent # ...\agent\Worker\Tools\Pdbstr\pdbstr.exe # ...\age...
pascalberger/vso-agent-tasks
Tasks/PublishSymbols/SymbolsCommon.psm1
PowerShell
mit
4,405
Configuration InstallExchange { param ( [PSCredential]$Creds ) Import-DscResource -Module xExchange Import-DscResource -Module xPendingReboot Node $AllNodes.NodeName { LocalConfigurationManager { CertificateId = $Node.Thumbprint RebootNo...
phongdly/puppetlabs-dsc
lib/puppet_x/dsc_resources/xExchange/Examples/InstallExchange/InstallExchange.ps1
PowerShell
apache-2.0
2,030
param( [string]$gradleWrapper, # Path to gradle wrapper. Empty if using gradle installation. [string]$gradleProj, # Optional - Root directory of gradle project. Defaults to root of working directory if empty. [string]$gradleArguments, # Gradle arguments [string]$avdName, # Android V...
AArnott/vso-agent-tasks
Tasks/AndroidBuild/AndroidBuild.ps1
PowerShell
mit
3,956
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org...
yoavrubin/azure-powershell
src/ResourceManager/Intune/Commands.Intune.Test/ScenarioTests/IntuneTests.ps1
PowerShell
apache-2.0
2,102
## INFO # find last logged on user of remote computer # https://www.reddit.com/r/PowerShell/comments/448gdx/noob_need_help_getting_a_list_with_all_xp/ # get-ciminstance is the successor, but it doesn't work for me... # http://powershell.com/cs/forums/t/23349.aspx # (gp "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersio...
gangstanthony/PowerShell
Get-User.ps1
PowerShell
mit
2,979
function Invoke-LabSnippet { [CmdletBinding()] param ( [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)] [string[]] $Name, [hashtable] $LabParameter = @{} ) begin { $scriptBlockOrder = @{} try { [AutomatedLab.Lab...
AutomatedLab/AutomatedLab
AutomatedLab.Recipe/Public/Invoke-LabSnippet.ps1
PowerShell
mit
2,459
Function Get-PSMDHelpEx { <# .SYNOPSIS Displays localized information about Windows PowerShell commands and concepts. .DESCRIPTION The Get-PSMDHelpEx function is a wrapper around get-help that allows localizing help queries. This is especially useful when developing modules with help in multiple langua...
FriedrichWeinmann/PSModuleDevelopment
PSModuleDevelopment/functions/help/Get-PSMDHelpEx.ps1
PowerShell
mit
9,504
# Powershell to write to DB Script # Task Scheduler to execute this task every 30 minutes # # Scott Stevenson # # Created: 23-10-2016 # Modified: 12-11-2016 # # # Include influxDB information # . "$PSScriptRoot\InfluxDB-Connection.ps1" $ComputerSystem = Get-WmiObject -class Win32_ComputerSystem | Select Name $Device...
Scott-St/InfluxDB-Stats-Collection
Windows/Desktop/InfluxDB-DataCollection-30m.ps1
PowerShell
mit
3,610
@{ PackageName = 'dotnet-5.0-sdk-4xx' Url = 'https://download.visualstudio.microsoft.com/download/pr/35331d66-9652-4632-b008-fad03a1d7265/6ef6f64049d08afca95135ab84107f4c/dotnet-sdk-5.0.402-win-x86.exe' Checksum = 'ead5aee59bdbc42a0626458413feb7ee5eb2034dca6fa868cc9eb58e6ec3b728a5759c601b07b43d3b68fcc84d60...
jberezanski/dotnetcore-chocolateypackages
dotnet-5.0-sdk-4xx/tools/data.ps1
PowerShell
mit
782
task npminstall { "Restoring node packages" Set-Location "$basePath\$projectName" exec { npm install } exec { npm install -g grunt-cli } }
SeatwaveOpenSource/psakify
psakify/scripts/NpmInstall.ps1
PowerShell
mit
147
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Update the _references.js file Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx # SIG # Begin signature block # MIIdiQYJKoZIhvcNAQcCoIIdejCCHXYCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4...
MicrosoftLearning/20486-DevelopingASPNETMVCWebApplications
Allfiles/20486C/Mod07/LabFiles/PhotoSharingApplication_07_end/packages/Modernizr.2.6.2/Tools/uninstall.ps1
PowerShell
mit
10,810
<# .SYNOPSIS Pulls Data from AWS Local Instance service .DESCRIPTION Pulls miscellaneous data about AWS instances. Only valid for an AWS instance on EC2 (go figure, right). See AWS EC2Launch (Windows 2016): %ProgramData%\Amazon\EC2-Windows\Launch\Module\Scripts\Set-Wallpaper.ps1 See AWS EC2Config (Windows Pre...
brsh/BGInfoConfigs
Scripts/PowerShell/Scripts/Get-AWSInfo.ps1
PowerShell
mit
9,333
# Copyright 2012 Aaron Jensen # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
MattHubble/carbon
Test/Ini/Test-SplitIni.ps1
PowerShell
apache-2.0
5,460
function Describe { <# .SYNOPSIS Creates a logical group of tests. All Mocks and TestDrive contents defined within a Describe block are scoped to that Describe; they will no longer be present when the Describe block exits. A Describe block may contain any number of Context and It blocks. .PARAMETER Name The name of ...
ligershark/psbuild
contrib/pester/Functions/Describe.ps1
PowerShell
apache-2.0
3,660
<# Copyright 2014 ASOS.com Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
POSHChef/POSHChef
dscresources/POSHChef_CookbookFileResource/POSHChef_CookbookFileResource.Tests.ps1
PowerShell
apache-2.0
5,718
C:\Python34\Scripts\initialize_pyJobs_db ../../config/development.ini
Nullpo/PyJobs
startup/windows/initialize_db.ps1
PowerShell
bsd-2-clause
70
<# .DESCRIPTION This example shows how to do the following: 1. Ensure that the database role named ReportViewer is present in the AdventureWorks database on instance sqltest.company.local\DSC. 2. Ensure that users CONTOSO\Barbara and CONTOSO\Fred will never be members ...
johlju/xSQLServer
source/Examples/Resources/SqlDatabaseRole/5-MembersToExcludeFromDatabaseRole.ps1
PowerShell
mit
1,056
import-module au $releases = 'http://www.piriform.com/ccleaner/download/standard' function global:au_SearchReplace { @{ ".\tools\chocolateyInstall.ps1" = @{ "(^[$]url32\s*=\s*)('.*')" = "`$1'$($Latest.URL32)'" "(^[$]checksum32\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'" ...
lennartb-/chocolatey-coreteampackages
automatic/ccleaner/update.ps1
PowerShell
apache-2.0
870
<# Downloads and runs TemplateAnalyzer against the nested templates, the pre requisites template, and the main deployment template, along with their parameters files #> param( [string] $ttkFolder = $ENV:TTK_FOLDER, [string] $templateAnalyzerReleaseUrl = $ENV:TEMPLATE_ANALYZER_RELEASE_URL, [string] $sampl...
Azure/azure-quickstart-templates
test/ci-scripts/Run-TemplateAnalyzer.ps1
PowerShell
mit
3,521
######################################################################## # # Linux on Hyper-V and Azure Test Code, ver. 1.0.0 # Copyright (c) Microsoft Corporation # # All rights reserved. # Licensed under the Apache License, Version 2.0 (the ""License""); # you may not use this file except in compliance with the Lice...
HuijingHei/lis-test
WS2008R2/lisa/setupscripts/ChangeCPU.ps1
PowerShell
apache-2.0
2,946
$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' # Import the ADCS Deployment Resource Common Module. Import-Module -Name (Join-Path -Path $modulePath ` -ChildPath (Join-Path -Path 'FSRMDsc.Common' ` -ChildPath 'FSRMDsc.Common.ps...
PlagueHO/xFSRM
DSCResources/DSR_FSRMQuotaTemplateAction/DSR_FSRMQuotaTemplateAction.psm1
PowerShell
mit
27,518
$SCRIPT:DIRECTORY_PATH_OF_pratom_ATOM_NUCLEUS_NEUTRONS = $PSScriptRoot function RAILS_PATH_CORE { return $SCRIPT:DIRECTORY_PATH_OF_pratom_ATOM_NUCLEUS_NEUTRONS } function RAILS_PATH { return ( Resolve-Path "$SCRIPT:DIRECTORY_PATH_OF_pratom_ATOM_NUCLEUS_NEUTRONS\.." ) } [string]$SCRIPT:rails_path_env ...
pratom/master
nucleus/neutrons/neutrons.psm1.vars.ps1
PowerShell
mit
2,810
BeforeAll { Import-Module (Join-Path (Split-Path $PSScriptRoot -Parent) "\AdmxPolicy\AdmxPolicy.psd1") -Force } Describe "Get-AdmlResource" { It "if the adml file was not found, throw exception." { ( { Get-AdmlResource -FilePath "$PSScriptRoot\admx\notfound.adml" }) | Should -Throw "*not found." ...
stknohg/AdmxPolicy
AdmxPolicy.Tests/AdmxPolicy.Tests.ps1
PowerShell
mit
14,136
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1') if (-not (Test-BuildCategory -Type 'Integration' -Category @('Integration_SQL2016','Integration_SQL2017'))) { return } $script:dscModuleName = 'SqlServerDsc' $script:dscResourceFriendlyName = 'SqlDatabaseUser' $s...
nabrond/xSQLServer
tests/Integration/MSFT_SqlDatabaseUser.Integration.Tests.ps1
PowerShell
mit
23,664
Write-Output "WARNING: DO NOT USE DOCKER IN PRODUCTION WITHOUT TLS" Write-Output "Opening Docker insecure port 2375" if (!(Get-NetFirewallRule | Where-Object {$_.Name -eq "Dockerinsecure2375"})) { New-NetFirewallRule -Name "Dockerinsecure2375" -DisplayName "Docker insecure on TCP/2375" -Protocol tcp -LocalPort 23...
StefanScherer/packer-windows
scripts/docker/open-docker-insecure-port.ps1
PowerShell
mit
355
function Get-TargetResource { [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param ( [parameter(Mandatory = $true)] [System.String] $AuthenticationSite, [parameter(Mandatory = $true)] [System.String] $AdminUri, [para...
PowerShell/xAzurePack
DSCResources/MSFT_xAzurePackResourceProvider/MSFT_xAzurePackResourceProvider.psm1
PowerShell
mit
29,695
$RSHash = [hashtable]::Synchronized(@{}) $jobsList = [system.collections.arraylist]::Synchronized((New-Object System.Collections.ArrayList)) $jobsCleanup = [hashtable]::Synchronized(@{}) $RSHash.host = $host #region Background runspace to clean up jobs $jobsCleanup.Flag = $True $newRunspace =[runspacefactory]::Create...
proxb/Presentations
Tampa - A Look at PowerShell Runspaces/3_2_RunSpacesDemo_ObjectThreadError.ps1
PowerShell
mit
2,078
# MIT License # # Copyright (c) 2016 Joonas Forsberg <joonas.forsberg@iki.fi> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights ...
joonasfo/opennebula
Launch-Contextualization.ps1
PowerShell
mit
2,164
function Set-UnattendedAntiMalware { [CmdletBinding()] param ( [Parameter(Mandatory = $true)] [bool]$Enabled, [switch] $IsKickstart, [switch] $IsAutoYast ) if (-not $script:un) { Write-Error 'No unattended file imported. Please use Import-Unat...
AutomatedLab/AutomatedLab
AutomatedLabUnattended/Public/Set-UnattendedAntiMalware.ps1
PowerShell
mit
588
configuration Sample_IISServerDefaults { param ( # Target nodes to apply the configuration [string[]]$NodeName = 'localhost' ) # Import the module that defines custom resources Import-DscResource -Module xWebAdministration, PSDesiredStateConfiguration Node $NodeName ...
randorfer/RunbookExample
PowerShellModules/xWebAdministration/1.8.0.0/Examples/Sample_xIisServerDefaults.ps1
PowerShell
mit
708
Get-AzureRmLocation | %{ New-AzureRmResourceGroup -Name "rg$($_.Location)" -Location $_.Location -Tag @{Deployment='PowerShell';CreatedBy='Alex Sparkman';Location=$($_.DisplayName)} }
doomjaw87/P0w3rSh3ll
create-azure-resource-group-in-all-locations.ps1
PowerShell
mit
190
$packageName = 'dolphin' $url = 'http://dl.dolphin-emu.org/builds/dolphin-master-5.0-2688-x64.7z' $checksum = '923f8d8eeec352a0acca3ae6b90b27147e21395eb5dc04bdb5259123f37ae6f3' $checksumType = 'sha256' $url64 = $url $checksum64 = $checksum $checksumType64 = $checksumType $toolsDir = "$(Split-Path -parent $MyInvocation...
dtgm/chocolatey-packages
automatic/_output/dolphin/5.0.2688/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
790
<# .SYNOPSIS Add DXA Tridion Custom Resolver to CMS/Publishing Servers. .DESCRIPTION Adds the DXA Custom Resolver to the CMS/Publishing server's GAC and modifies the Tridion.ContentManager.config (suitable for R2 mapping only). .EXAMPLE & .\cms-customresolver.ps1 #> [CmdletBinding(SupportsShouldProcess=$true,...
sdl/dxa-content-management
cms/scripts/cms-customresolver.ps1
PowerShell
apache-2.0
15,489
function Remove-RivetTestDatabase { param( [string] # The name of the database to remove. $Name = $RTDatabaseName ) Set-StrictMode -Version Latest $query = @' if( exists( select name from sys.databases where Name = '{0}' ) ) begin ALTER DA...
RivetDB/Rivet
Test/RivetTest/Functions/Remove-RivetTestDatabase.ps1
PowerShell
apache-2.0
659
# # Copyright (c) Microsoft Corporation. # # 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 THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR AN...
randorfer/RunbookExample
PowerShellModules/PackageManagementProviderResource/1.0.2/DSCResources/MSFT_PackageManagementSource/MSFT_PackageManagementSource.psm1
PowerShell
mit
10,697
$workingDir = 'D:\Temp\ByteSize' if (Test-Path $workingDir) { Remove-Item $workingDir -Force -Recurse } md $workingDir | Out-Null . ../Build/Nuget-Functions.ps1 . ../Build/Version-Functions.ps1 $templateNuspec = 'D:\SourceCode\Naos\Naos.Build\Packaging\NaosNuSpecTemplate.template-nuspec' $packageId = 'Naos.Recipes.B...
NaosProject/Naos.Powershell
RecipeHelpers/ConvertByteSizeRepoToRecipe.ps1
PowerShell
mit
671
 Import-Module -Name AzureRM.Compute #$AzureCredential = Get-Credential -Message 'AzureAdmin' -UserName 'user@irgendwas.onmicrosoft.com' if ($AzureSubscription -eq $null) { Add-AzureRmAccount $AzureSubscription = Get-AzureRMSubscription | Out-GridView -Title 'Select Azure Subscription' -OutputMode Single ...
christophwille/meetupazurewien
Meetup 2016-08-25/TrafficManager-MeetUp-Demo/ImportAzureTemplate.ps1
PowerShell
mit
1,673
function Log-Debug { param( [Parameter(Mandatory=$false,Position=1)] [object]$object, [Parameter(Mandatory=$false,Position=2)] [Exception]$exception, [Parameter(Mandatory=$false,ValueFromPipeline=$true,Position=3)] [log4net.ILog]$logger ) if($logger...
ghostsquad/AetherLog
functions/Log-Debug.ps1
PowerShell
apache-2.0
527
# You should already be logged in to DockerHub when you run this. $ErrorActionPreference = 'Stop' $dockerfileDir = Split-Path $script:MyInvocation.MyCommand.Path docker build --pull -t "ponylang/ponyc:windows" $dockerfileDir docker push "ponylang/ponyc:windows"
ponylang/ponyc
.dockerfiles/latest/x86-64-pc-windows-msvc/build-and-push.ps1
PowerShell
bsd-2-clause
264
param( [Parameter(Mandatory=$true)][string]$StorageAccountName = $null, [Parameter(Mandatory=$true)][string]$subscriptionId = $null, [Parameter(Mandatory=$true)][string]$Configuration = $null, [Parameter(Mandatory=$true)][string]$AzureSdkPath = $null, [Parameter(Mandatory=$true)][string]$AzureP...
mtian/SiteExtensionGallery
tests/Scripts/AutoDeploy.ps1
PowerShell
apache-2.0
3,215
function Clear-CachedDscResource { [cmdletbinding(SupportsShouldProcess=$true)] param() if ($pscmdlet.ShouldProcess($env:computername)) { Write-Verbose 'Stopping any existing WMI processes to clear cached resources.' Get-process -Name WmiPrvSE -erroraction silentlycontinue | stop-proc...
devopsguys/DSC
Tooling/dscbuild/Clear-CachedDscResource.ps1
PowerShell
mit
502
#-------------------------------------------- # Declare Global Variables and Functions here #-------------------------------------------- #Sample function that provides the location of the script function Get-ScriptDirectory { <# .SYNOPSIS Get-ScriptDirectory returns the proper location of the script. .OUTPUTS ...
bwya77/PowerShell-Encryptor
Globals.ps1
PowerShell
mit
695
<# .DESCRIPTION This example will add a Database Mirror endpoint, to two instances, using the default values. #> Configuration Example { param ( [Parameter(Mandatory = $true)] [System.Management.Automation.PSCredential] $SqlAdministratorCredential ) Import-D...
nabrond/xSQLServer
source/Examples/Resources/SqlServerEndpoint/1-CreateEndpointWithDefaultValues.ps1
PowerShell
mit
850
<# The purpose of this script is to allow the automation or ease of implementation for deploying New Relic to Windows Azure Web Sites Requirements: 1. Install the powershell SDK: http://go.microsoft.com/?linkid=9811175&clcid=0x409 2. Add your Publish Profile: https://manage.windowsazure.com >> Web Sites >> [Web Site N...
newrelic/nuget-azure-web-sites-x64
NewRelicAzureAppSettings.ps1
PowerShell
mit
1,039
configuration TestConfig { ##### #Configure locations for downloads and installs of JRE, Elasticsearch, NSSM and Kibana ##### $installRoot = 'c:\elkInstall\' $downloadroot = 'c:\elkTempDownload\' $elasticZipLocation = Join-Path $downloadroot 'elastic.zip' $elasticUnpacked = Join-Path $inst...
PowerShellOrg/GripDevResources
Example-FullElasticKibana.ps1
PowerShell
mit
4,153
param($installPath, $toolsPath, $package, $project) $sourceFile = Split-Path -Path $project.FullName -Parent $sourceFile=$sourceFile+ '\Global.asax.cs' $F = Select-String -Path $sourceFile -Pattern "PreApplicationStartMethod" $v=3 $ex="" $encabezado=0 if($F.count -gt 0 -or -not $project.Type -eq "c#"){ } else{ (Get-C...
zeek888/DeltaGridMVC-Ejemplos
Ejemplos.DeltaUniverse/packages/DeltaUniverse.DeltaGridMVC.1.0.8/tools/install.ps1
PowerShell
mit
1,368
Describe "mapheaders" { $tilesetlist = (Get-Content .\tilesetlist.txt) -split "`n" $dataregex = [regex]"`tdb\s(\w+)" $MapNameDictionary = Import-Csv "$scriptdir\mapnamedictionary.csv" $MapDimensionsTable = Import-Csv "$scriptdir\mapdimensions.csv" Context "Tilesets" { $MapNameDictio...
PatheticFish/pokeredmaps
pokeredmaps.Test.ps1
PowerShell
mit
2,686
<#PSScriptInfo .VERSION 1.0.0 .GUID 2868f85b-b58c-4be1-b2e6-a9da0d1cb2a1 .AUTHOR DSC Community .COMPANYNAME DSC Community .COPYRIGHT Copyright the DSC Community contributors. All rights reserved. .TAGS DSCConfiguration .LICENSEURI https://github.com/dsccommunity/NetworkingDsc/blob/main/LICENSE .PROJECTURI https://githu...
PlagueHO/xNetworking
source/Examples/Resources/IPAddress/1-IPAddress_AddingStaticIP_Config.ps1
PowerShell
mit
1,627
Import-Module Pester BeforeAll { . $PSScriptRoot/../job-matrix-functions.ps1 $matrixConfig = @" { "displayNames": { "--enableFoo": "withfoo" }, "matrix": { "operatingSystem": [ "windows-2019", "ubuntu-18.04", "macOS-10.15" ], "framework...
tg-msft/azure-sdk-tools
eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1
PowerShell
mit
22,608
function Get-EXRContact { [CmdletBinding()] param( [Parameter(Position = 1, Mandatory = $false)] [psobject]$AccessToken, [Parameter(Position = 2, Mandatory = $false)] [string]$MailboxName, [Parameter(Position = 3, Mandatory = $true)] [string]$id, [Parameter(Position = 4, Manda...
gscales/Exch-Rest
functions/contacts/Get-EXRContact.ps1
PowerShell
mit
1,498
$packageName = 'freeplane' $installerType = 'exe' # hack to overcome limitations of Ketarin/chocopkgup when using repos like sf.net $url = 'http://sourceforge.net/projects/freeplane/files/freeplane%20stable/archive/1.6.4/Freeplane-Setup-1.6.4.exe/download' $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' $...
dtgm/chocolatey-packages
automatic/_output/freeplane/1.6.4/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
774
$config.buildFileName="default.ps1" $config.framework = "4.6" $config.taskNameFormat="Executing {0}" $config.verboseError= $true $config.coloredOutput = $true $config.modules=(".\modules\*.psm1") $config.moduleScope="global" $config.taskNameFormat= { param($taskName) "Executing $taskName at $(get-date)" }
dennisdoomen/beacon
Build/psake-config.ps1
PowerShell
apache-2.0
310
$packageName = 'firefox-nightly' $installerType = 'exe' $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' $url = 'https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/firefox-53.0a1.en-US.win32.installer.exe' $checksum = '8be320ae210fb347ac5a9c6eebdd9dfd593f033ffdb73f5ad701670d5c3701f8' $...
dtgm/chocolatey-packages
automatic/_output/firefox-nightly/53.0.1.2016112913/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
1,134
echo "build: Build started" Push-Location $PSScriptRoot if(Test-Path .\artifacts) { echo "build: Cleaning .\artifacts" Remove-Item .\artifacts -Force -Recurse } & dotnet restore --no-cache $branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne ...
serilog/serilog-sinks-datadog
Build.ps1
PowerShell
apache-2.0
1,345
$CurDir = split-path -parent $MyInvocation.MyCommand.Definition $ChocolateyDir = $CurDir + "\chocolatey" $NugetDir = $CurDir + "\nuget" $PackagesDir = $CurDir + "\packages" If (Test-Path $PackagesDir){ Remove-Item $PackagesDir -recurse | Out-Null } New-Item $PackagesDir -type directory | Out-Null New-Item ($Package...
kolonse/redis
msvs/setups/CreatePackages.ps1
PowerShell
bsd-3-clause
873
<#-------------Create Deployment Start------------------#> Import-Module .\TestLibs\RDFELibs.psm1 -Force $Subtests= $currentTestData.SubtestValues $SubtestValues = $Subtests.Split(",") $result = "" $testResult = "" $resultArr = @() $isDeployed = DeployVMS -setupType $currentTestData.setupType -Distro $Distro -xmlCon...
iamshital/azure-linux-automation
remote-scripts/VNET-MYSQL-OPERATIONS.ps1
PowerShell
apache-2.0
9,597
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") . "$here\$sut" Describe "Set-Path" { Context "no existing directories" { BeforeEach { $CurrentLocation = Get-Location Set-Location "TestDrive:\" ...
ansarada/PSAX
Functions/Set-Path.Tests.ps1
PowerShell
mit
2,538
function Get-PSWSUSClientGroupMembership { <# .SYNOPSIS Lists all Target Groups that a client is a member of in WSUS. .DESCRIPTION Lists all Target Groups that a client is a member of in WSUS. .PARAMETER Computer Name of the client to check group membership....
proxb/PoshWSUS
Scripts/Get-PSWSUSClientGroupMembership.ps1
PowerShell
mit
2,076
param($installPath, $toolsPath, $package, $project) #import Module Import-Module (Join-Path (join-path $installPath "tools") EPiServer.Cms.psm1) $projectFilePath = Get-ChildItem $project.Fullname $sitePath = $projectFilePath.Directory.FullName $WebConfigFile = GetWebConfigPath $sitePath $epiConnection = GetEPiS...
anjumrizwi/episerver
alloy/EPiServerAlloySite/packages/EPiServer.CMS.9.7.3/tools/Install.ps1
PowerShell
mit
10,571
<# This is designed for all paths you need configurations for. #> # The default path where dbatools stores persistent data Set-DbaConfig -FullName 'Path.DbatoolsData' -Value "$env:AppData\PowerShell\dbatools" -Initialize -Validation string -Handler { } -Description "The path where dbatools stores persistent data on a...
sqlpadawan/dbatools
internal/configurations/settings/paths.ps1
PowerShell
mit
1,568
###########################################################################" # # NAME: Invoke-WindowsUpdate.ps1 # # AUTHOR: Jan Egil Ring # EMAIL: jan.egil.ring@powershell.no # # COMMENT: Script to download and install updates from Windows Update/WSUS. Reporting and rebooting may be customized. # For more deta...
toddhgardner/dotfiles
powershell/script/Invoke-WindowsUpdate.ps1
PowerShell
mit
6,028
<########################### | USING DYNAMIC PARAMETERS | ############################ ALL VERSIONS Most PowerShell functions use static parameters. They are defined in param() block and are always present. A little-known fact is that you can also add dynamic parameters programmatically on the fly. The big advantage...
doomjaw87/P0w3rSh3ll
Examples/using dynamic parameters.ps1
PowerShell
mit
2,954
cls $tenantName = "[YOUR TENANT]" $tenantAdminAccountName = "[YOUR USER ACCOUNT]" $tenantDomain = $tenantName + ".onMicrosoft.com" $tenantAdminSPN = $tenantAdminAccountName + "@" + $tenantDomain $location = "southcentralus" $resourceGroupName = "lab02" $appServicePlanName = "lab02-plan" $webAppName = "MyWebApp714" $w...
CriticalPathTraining/CBD365
Modules/02_AzureWebApps/Lab/Create-Web-App.ps1
PowerShell
mit
2,137
param ( $location = 'westus', [switch]$csv = $false, [switch]$xlsx = $false ) $start = Get-Date $images = New-Object System.Collections.ArrayList $publishers = ( Get-AzureRmVMImagePublisher -Location $location ).PublisherName $publishers | foreach { $publisher = $_ $offers = ( Get-AzureRmVMImageOffe...
craiglandis/scripts
Get-AzureRmVmImages.ps1
PowerShell
mit
5,328
[CmdletBinding()] Param( [Parameter(Mandatory=$true)] [string]$pathToPictures ) #Only .jpg files are looked at. $fileFilter = "*.jpg" #Maximum file size in bytes : 10KB = 10240 bytes $maxPictureSize = "10240" #Get a list of all the pictures $pictures = Get-ChildItem $pathToPictures -Filter $fileFilter -ErrorAc...
mitchelladams/powershell
ActiveDirectory/ActiveDirectory-Import-Photos.ps1
PowerShell
mit
2,218
#region xDSCResourceDesigner Get-Module xDSCResourceDesigner -ListAvailable Get-Command -Module xDSCResourceDesigner #endregion #region live develop DSC resource (xSMBShare already exists but good example and works on Nano :-) ) New-xDscResource -Name PSConfEU_SMBShare -Path 'C:\Program Files\WindowsPowerShell\Modules...
bgelens/Presentations
042016_PSConfEU_DSCResCreateDebug/Demos/Demo01.ps1
PowerShell
mit
1,602
$packageName = 'manictime.portable' $url = 'https://cdn.manictime.com/setup/v4_0_5_0/ManicTimeUsb.zip' $checksum = '4166009a6f2ab41a3627da8ad1291e74ef60ee1420b8fb96158d868c9e8cedcd' $checksumType = 'sha256' $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" Install-ChocolateyZipPackage -PackageName...
dtgm/chocolatey-packages
automatic/_output/manictime.portable/4.0.5/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
550
function Get-ArtifactFromUrl { param ( [string] $url, [string] $target, [string] $username, [string] $password ) $authInfo = $username + ":" + $password $authInfo = [System.Convert]::ToBase64String([System.Text.Encoding]::Default.GetBytes($authInfo)) ...
ProximoSrl/Jarvis.ConfigurationService
Tools/Setup/teamCity.psm1
PowerShell
apache-2.0
4,111
<############################################################################# The DebugPx module provides a set of commands that make it easier to debug PowerShell scripts, functions and modules. These commands leverage the native debugging capabilities in PowerShell (the callstack, breakpoints, error output and the ...
KirkMunro/DebugPx
functions/Get-CommandDebugMode.ps1
PowerShell
apache-2.0
6,616
# Copyright © 2017 Chocolatey Software, Inc. # Copyright © 2011 - 2017 RealDimensions Software, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # # You may obtain a copy of the License at # # http://www.apache.org/lice...
bazzilic/choco
src/chocolatey.resources/helpers/functions/Get-UninstallRegistryKey.ps1
PowerShell
apache-2.0
5,982
# # Copyright (c) Citrix Systems, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1) Redistributions of source code must retain the above copyright # notice, this list of cond...
agimofcarmen/xen-api-sdk
powershell/samples/AutomatedTestCore.ps1
PowerShell
bsd-2-clause
12,100
# Copyright 2012 Aaron Jensen # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
michael-wolfenden/CodeCampServer
scripts/Carbon/IIS/Get-IisApplication.ps1
PowerShell
bsd-3-clause
2,815
ise -file ".\1Mandatory.ps1, .\2Pipeline.ps1, .\3ParamHelp.ps1,.\4ParamAlias.ps1, .\5ParamSet.ps1, .\6ParamCount.ps1, .\7ParamPattern.ps1"
kidchenko/playground
powershell-advanced-tools-and-scripting-with-powershell/Mod5/_Startup.ps1
PowerShell
mit
141
function Find-DbaTrigger { <# .SYNOPSIS Returns all triggers that contain a specific case-insensitive string or regex pattern. .DESCRIPTION This function search on Instance, Database and Object level. If you specify one or more databases, search on Server level will not be preformed...
wsmelton/dbatools
functions/Find-DbaTrigger.ps1
PowerShell
mit
17,329
<# The MIT License (MIT) Copyright (c) 2015 Objectivity Bespoke Software Specialists Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights t...
Invenis/PSCI
PSCI/Private/deploy/Configuration/Start-DeploymentPlanEntryRemotely.ps1
PowerShell
mit
4,822
Describe "Validate-DeploymentFile" { BeforeAll { $ErrorActionPreference = 'Stop' $dataFolder = "$(Split-Path $PSCommandPath -Parent)/data/validate-deploymentfile-tests" function Validate-DeploymentFile( [string][Parameter(Mandatory = $true)]$SampleFolder, [strin...
takekazuomi/azure-quickstart-templates
test/ci-tests/Validate-DeploymentFile.Tests.ps1
PowerShell
mit
1,483
function Get-TargetResource { [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param ( [parameter(Mandatory = $true)] [ValidateSet("Present","Absent")] [System.String] $Ensure = "Present", [parameter(Mandatory = $true)] [System.String] ...
phongdly/puppetlabs-dsc
lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMAPowerShellSetup/MSFT_xSCSMAPowerShellSetup.psm1
PowerShell
apache-2.0
4,604
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/...
AzureAutomationTeam/azure-powershell
src/StackAdmin/Azs.Subscriptions.Admin/Tests/src/AcquiredPlan.Tests.ps1
PowerShell
apache-2.0
5,185
Configuration ContosoDscConfiguration { Node "TEST-PC1" { WindowsFeature MyFeatureInstance { Ensure = "Present" Name = "RSAT" } WindowsFeature My2ndFeatureInstance { Ensure = "Present" Name = "Bitlocker" } } } ContosoDscConfigur...
AzureAutomationTeam/azure-powershell
src/ResourceManager/Automation/Commands.Automation.Test/ScenarioTests/Resources/ContosoDscConfiguration.ps1
PowerShell
apache-2.0
325
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org...
zhencui/azure-powershell
src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/BatchApplicationTests.ps1
PowerShell
apache-2.0
1,558
exit; param( [Parameter(Mandatory=$False)] [string[]] $InstallGroups=@() ) # Application details $appFilePath = "bin\Debug\RecurringTask.mfappx" $appGuid = "a4c1d909-03f8-4c6d-8d7d-17c38d50f927" # Target vault $vaultName = "Sample Vault" # Connection details $authType = 1 # 1 = MFAuthTypeLoggedOnWindowsU...
M-Files/MFilesSamplesAndLibraries
Samples/VAF/MultiServerMode/RecurringTask/install-application.ps1
PowerShell
mit
4,342
echo '********************************************Executing tests on Docker********************************************' If($IsWindows){ docker-switch-linux } docker info docker build -t ocaramba/selenium -f DockerfileBuild . docker run --rm -dit --name ocaramba_selenium ocaramba/selenium docker p...
ObjectivityBSS/Test.Automation
ExecutingTestsOnDocker.ps1
PowerShell
mit
1,142
# Localized resources for MSFT_SqlServerAgentAlert ConvertFrom-StringData @' GetSqlAlerts = Getting SQL Agent Alerts. SqlAlertPresent = SQL Agent Alert '{0}' is present. SqlAlertAbsent = SQL Agent Alert '{0}' is absent. UpdateSeverity = Updating severity to '{0}' for SQL Agent Alert '{1}'. UpdateMe...
nabrond/xSQLServer
source/DSCResources/MSFT_SqlAgentAlert/en-US/MSFT_SqlAgentAlert.strings.psd1
PowerShell
mit
1,110
#require Unity-Powershell [CmdletBinding()] Param () $Server = '10.44.10.112' $UnityUsername = 'admin' $UnityPassword = 'Password123#' #System $DNS = '10.44.10.101' $DefaultSMTP = 'mail.example.com' $NTP = '10.44.10.101' $UserName = 'User01' $UserPassword = 'Password123#' $UserRole = 'administrator' #Pool $PoolV...
equelin/Unity-Powershell
Tools/Workflows/Unity-Configuration.ps1
PowerShell
mit
5,259
function Get-PASSafeMembers { <# .SYNOPSIS Lists the members of a Safe .DESCRIPTION Lists the members of a Safe. View Safe Members permission is required. .PARAMETER SafeName The name of the safe to get the members of .PARAMETER sessionToken Hashtable containing the session token returned from New-PASSession .PAR...
zshehri/CTU
psPAS/Functions/SafeMembers/Get-PASSafeMembers.ps1
PowerShell
mit
2,625
function Backup-DbaDatabase { <# .SYNOPSIS Backup one or more SQL Sever databases from a single SQL Server SqlInstance. .DESCRIPTION Performs a backup of a specified type of 1 or more databases on a single SQL Server Instance. These backups may be Full, Differential or Transaction log backu...
dsolodow/dbatools
functions/Backup-DbaDatabase.ps1
PowerShell
mit
31,955