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
$ErrorActionPreference = 'Stop' $packageName = 'notepadplusplus.commandline' $url32 = 'https://notepad-plus-plus.org/repository/7.x/7.3.1/npp.7.3.1.bin.7z' $url64 = 'https://notepad-plus-plus.org/repository/7.x/7.3.1/npp.7.3.1.bin.x64.7z' $checksum32 = 'bdbf81074293695b2cc78824d68d0a1b0a2d896df59dfd315b5...
lennartb-/chocolatey-coreteampackages
automatic/notepadplusplus.commandline/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
775
<# .SYNOPSIS Tests Analysis Services server lifecycle (Create, Update, Get, List, Delete). #> function Test-AnalysisServicesServer { param ( $location = "West US" ) try { # Creating server $resourceGroupName = Get-ResourceGroupName $serverName = Get-AnalysisServicesServerName New-AzureRmResourceGro...
yoavrubin/azure-powershell
src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Test/ScenarioTests/AsTests.ps1
PowerShell
apache-2.0
7,787
function New-VSWAFv2IPSet { <# .SYNOPSIS Adds an AWS::WAFv2::IPSet resource to the template. **Note** .DESCRIPTION Adds an AWS::WAFv2::IPSet resource to the template. **Note** This is the latest version of **AWS WAF**, named AWS WAFV2, released in November, 2019. For information, including...
scrthq/Vaporshell
VaporShell/Public/Resource Types/New-VSWAFv2IPSet.ps1
PowerShell
apache-2.0
17,267
echo "reminder - have you done:" echo "NuGet Update -self (to update NuGet.exe)" echo "NuGet SetApiKey Your-API-Key (to make sure you can push)" echo "This script will push FsCheck and FsCheck.Xunit to the public NuGet repo." $choice = "" while ($choice -notmatch "[y|n]"){ $choice = read-host "Sure? (Y/N)" } i...
kimsk/FsCheck
Push-FsCheck-Packages.ps1
PowerShell
bsd-3-clause
460
# Copyright (c) 2010 RightScale Inc # # 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 to use, copy, modify, merge, publish, # di...
rightscale/cookbooks_public_windows
cookbooks/aws/powershell_providers/s3/get.ps1
PowerShell
mit
3,539
# ---------------------------------------------------------------------------------- # # 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/...
ClogenyTechnologies/azure-powershell
src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/ScenarioTests/NHServiceTests.ps1
PowerShell
apache-2.0
33,935
# # Store some parameters as context variables so that they can be picked by other tasks, mainly by the "end task" # function StoreParametersInTaskContext { param( [string]$hostUrl, [string]$bootstrapperPath, [string]$dahsboardUrl, [string]$breakBuild) SetTaskContextVariable "MSBuild.S...
changeworld/vso-agent-tasks
Tasks/SonarQubePreBuild/SonarQubePreBuildImpl.ps1
PowerShell
mit
6,326
$script:dscModuleName = 'FSRMDsc' $script:dscResourceName = 'DSC_FSRMQuotaTemplate' try { Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop' } catch [System.IO.FileNotFoundException] { throw 'DscResource.Test module dependency not found. Please run ".\build.ps1 -Tasks build" first.' } $script:tes...
PlagueHO/FSRMDsc
tests/Integration/DSC_FSRMQuotaTemplate.Integration.Tests.ps1
PowerShell
mit
2,611
# QuickStart # 1. Import module into your PS session # (specify full path to the .psm1 module if module location differs from shell location ) Import-Module .\BombermanAPI.psm1 -Force # 2. Set connection URI (you should have Java websockets game server to be already up and running) [URI]$Global:BombermanURI = ...
igor-voitov/PowershellCodenjoyBot
powershell/BombermanCustomAI.ps1
PowerShell
mit
8,703
#Get Current Directory $Here = Split-Path -Parent $MyInvocation.MyCommand.Path #Get Function Name $FunctionName = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -Replace ".Tests.ps1" #Assume ModuleName from Repository Root folder $ModuleName = Split-Path (Split-Path $Here -Parent) -Leaf if( -not (Get-Module -Name $...
pspete/PoShPACLI
Tests/New-PVSafeFileCategory.Tests.ps1
PowerShell
mit
1,456
Param( [string]$subscriptionId, [string]$resourceGroupName, [string]$asaJobName, [int]$restartThresholdMinute, [int]$stopThresholdMinute, [int]$maxInputBacklog, [int]$maxWatermark ) # Stop on error $ErrorActionPreference = 'stop' # Write an information log with the current time. $cur...
Azure/azure-stream-analytics
Samples/Automation/Auto-pause/runbook.ps1
PowerShell
mit
6,750
Configuration PrinterDriver_Config { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DSCResource -ModuleName PrintManagementDsc Node $NodeName { PrinterDriver Integration_Test { Ensure = $Node.Ensure Name...
limiteddenial/cPrinterManagement
Tests/Integration/PrinterDriver.config.ps1
PowerShell
mit
511
# Set Write-Output used by Include- files to UTF8 encoding to fix copyright character [Console]::OutputEncoding = [Text.UTF8Encoding]::UTF8 $OutputEncoding = [Text.UTF8Encoding]::UTF8 # DaddyCool => daddyCool function ToCamelCase($str) { return $str.Substring(0,1).ToLowerInvariant() + $str.Substring(1) } functi...
BrandonLWhite/UnitsNet
UnitsNet/Scripts/GenerateUnits.ps1
PowerShell
mit
10,823
[CmdletBinding()] param ( [System.String[]] $Format = 'Html', [System.String] $Path = '~\Desktop', [System.Management.Automation.SwitchParameter] $PassThru ) Import-Module PScribo -Force -Verbose:$false $example17 = Document -Name 'PScribo Example 17' { <# To create a multi-row table from has...
iainbrighton/PScribo
Examples/Example17.ps1
PowerShell
mit
1,123
BeforeAll { Import-Module (Join-Path $PSScriptRoot '..\Posh-IBWAPI\Posh-IBWAPI.psd1') # setup fake profiles for mocking with $fakePass1 = ConvertTo-SecureString 'password1' -AsPlainText -Force $fakeCred1 = New-Object PSCredential 'admin1',$fakePass1 $prof1 = @{ WAPIHost = 'gm1' ...
rmbolger/Posh-IBWAPI
Tests/Get-IBConfig.Tests.ps1
PowerShell
mit
7,901
Function Remove-UnityCIFSShare { <# .SYNOPSIS Deletes CIFS share. .DESCRIPTION Deletes CIFS share. You need to have an active session with the array. .NOTES Written by Erwan Quelin under MIT licence - https://github.com/equelin/Unity-Powershell/blob/master/LICENSE .LIN...
equelin/Unity-Powershell
Unity-Powershell/Public/Remove-UnityCIFSShare.ps1
PowerShell
mit
3,840
$PackageName = 'neo4j-community' # Per-package parameters $downloadUrl = 'http://neo4j.com/artifact.php?name=neo4j-community-3.4.11-windows.zip' $md5Checksum = '48154491a270660b2ca07c49c4c9190e' $neozipSubdir = 'neo4j-community-3.4.11' # major.minor.update.build # Build is always 14 $privateJavaVersion = "8.0.131.11" $...
glennsarti/neo4j-community-chocolatey
neo4j-community-3.4.11/tools/chocolateyInstall.ps1
PowerShell
mit
12,024
data localizedData { # culture="en-US" ConvertFrom-StringData @' InvalidWebUriError=Specified URI is not valid: '{0}'. Only http and https paths are accepted. InvalidDestinationPathSchemeError=Specified DestinationPath is not valid: '{0}'. DestinationPath should be an absolute path. DestinationPathParentNotExistsError=...
iainbrighton/cRemoteFile
DSCResources/VE_RemoteFile/VE_RemoteFile.ps1
PowerShell
mit
11,405
<# .SYNOPSIS Displays a message using the colors and verbosity level specified by the user. .DESCRIPTION This function display a message using one of four possible native PowerShell cmdlets using the foreground and background colors specified by the user. This function will use either the Write-Debug, Write-E...
nexocentric/posh-helper-functions
Write-ColorizedMessage.ps1
PowerShell
mit
4,357
$ScriptPath = Split-Path $MyInvocation.MyCommand.Path . "$ScriptPath\0-CommonInit.ps1" # invoke consistency check and observe behavior Invoke-ConsistencyCheck dir "$env:ProgramData\Microsoft\Windows\PowerShell\Configuration\BuiltInProvCache" dir $env:ProgramData\Microsoft\Windows\PowerShell\Configuration\BuiltInPro...
nanalakshmanan/LCMInternals
2-ClearingCache.ps1
PowerShell
mit
859
<############################################################################# The TypePx module adds properties and methods to the most commonly used types to make common tasks easier. Using these type extensions together can provide an enhanced syntax in PowerShell that is both easier to read and self-documenting. T...
KirkMunro/TypePx
functions/Set-TypeAccelerator.ps1
PowerShell
apache-2.0
3,293
function Chef-GetScriptDirectory { $Invocation = (Get-Variable MyInvocation -Scope 1).Value Split-Path $Invocation.MyCommand.Path } $scriptDir = Chef-GetScriptDirectory $chefExtensionRoot = [System.IO.Path]::GetFullPath("$scriptDir\\..") $chefExtensionParent = [System.IO.Path]::GetFullPath("$scriptDir\\..\\..")...
andrewelizondo/azure-chef-extension
ChefExtensionHandler/bin/shared.ps1
PowerShell
apache-2.0
6,823
$packageName = 'awscli' $installerType = 'msi' $silentArgs = '/quiet /qn /norestart' $url = 'https://s3.amazonaws.com/aws-cli/AWSCLI32-1.11.81.msi' $checksum = '18e45261f5c03b850b636ae92734717bdcd47d4aa0ff35df900b427d09a7892b' $checksumType = 'sha256' $url64 = 'https://s3.amazonaws.com/aws-cli/AWSCLI64-1.11.81.msi' $c...
dtgm/chocolatey-packages
automatic/_output/awscli/1.11.81/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
985
function Add-VSMediaLiveChannelInputSpecification { <# .SYNOPSIS Adds an AWS::MediaLive::Channel.InputSpecification resource property to the template. The input specification for this channel. It specifies the key characteristics of the inputs for this channel: the maximum bitrate, the resolution, and t...
scrthq/Vaporshell
VaporShell/Public/Resource Property Types/Add-VSMediaLiveChannelInputSpecification.ps1
PowerShell
apache-2.0
4,690
function Add-VSDMSEndpointDynamoDbSettings { <# .SYNOPSIS Adds an AWS::DMS::Endpoint.DynamoDbSettings resource property to the template. Provides the Amazon Resource Name (ARN of the AWS Identity and Access Management (IAM role used to define an Amazon DynamoDB target endpoint. .DESCRIPTION ...
scrthq/Vaporshell
VaporShell/Public/Resource Property Types/Add-VSDMSEndpointDynamoDbSettings.ps1
PowerShell
apache-2.0
2,623
function Add-VSWAFv2RuleGroupAndStatementTwo { <# .SYNOPSIS Adds an AWS::WAFv2::RuleGroup.AndStatementTwo resource property to the template. Logical AND statement used in statement nesting. .DESCRIPTION Adds an AWS::WAFv2::RuleGroup.AndStatementTwo resource property to the template. Logical...
scrthq/Vaporshell
VaporShell/Public/Resource Property Types/Add-VSWAFv2RuleGroupAndStatementTwo.ps1
PowerShell
apache-2.0
2,420
docker run --rm --interactive --tty --volume "$pwd/.:/app" delta-cli delta ssh:generate-keys
DeltaSystems/delta-cli-tools
bin-docker/delta-docker-generate-ssh-key.ps1
PowerShell
bsd-2-clause
92
function Get-DbaPageFileSetting { <# .SYNOPSIS Returns information on the page file configuration of the target computer. .DESCRIPTION This command uses CIM (or other, related computer management tools) to detect the page file configuration of the target computer(s). Note that thi...
Splaxi/dbatools
functions/Get-DbaPageFileSetting.ps1
PowerShell
mit
5,451
function Test-ComputerTarget { <# .SYNOPSIS Validates wheher the input string can be legally used to target a computer. .DESCRIPTION Validates whether the input string can be legally used to target a computer. It will consider: - Names (NETBIOS/dns) - IPv4 Addresses...
sqlpadawan/dbatools
internal/functions/Test-ComputerTarget.ps1
PowerShell
mit
1,383
#Requires -Modules VagrantMessages param( [Parameter(Mandatory=$true)] [string]$VmId, [Parameter(Mandatory=$true)] [string]$ControllerType, [Parameter(Mandatory=$true)] [string]$ControllerNumber, [Parameter(Mandatory=$true)] [string]$ControllerLocation, [Parameter(Mandatory=$true)] ...
marxarelli/vagrant
plugins/providers/hyperv/scripts/remove_disk_drive.ps1
PowerShell
mit
697
[CmdletBinding()] param() . $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 . $PSScriptRoot\MockVariable.ps1 . $PSScriptRoot\MockModule.ps1 $remotePowershellRunnerPath = "$PSScriptRoot\..\PowerShellOnTargetMachines.ps1" Register-Mock Get-ParsedSessionVariables { } Register-Mock Invoke-PsOnRemote { } Register-M...
grawcho/vso-agent-tasks
Tasks/PowerShellOnTargetMachinesV1/Tests/L0NoHttp(s)AndskipCAProperty.ps1
PowerShell
mit
1,819
#******************************************************************* # # Copyright 2019 Samsung Electronics All Rights Reserved. # # File Name : Ramdump_windows.ps1 # Description: Receive Ramdump using UART # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complia...
sunghan-chang/TizenRT
tools/trap/Ramdump_windows.ps1
PowerShell
apache-2.0
8,511
<# .EXAMPLE extend_datatype_with_method -member_name:$member_name -script_block_get:$script_block_get -type_name:System.DateTime #> Function extend_datatype_with_method { [cmdletbinding()] Param ( [Parameter(Mandatory=$True)]$member_name , [Parameter(Mandatory=$True)]$script_block_get ...
pratom/master
nucleus/protons/extend_datatype/extend_datatype.ps1
PowerShell
mit
1,480
<# .SYNOPSIS Create archive in the specified directory .DESCRIPTION Create archives for the subdirectories of the specified directory asynchronously with jobs .PARAMETER InputPath The path to the directory, containing subdirecrories with the files/directories .PARAMETER 7ZPath The path to the directory...
ktaranov/powershell-kit
Scripts/Create-Async-Multiple-Archives.ps1
PowerShell
mit
3,159
$packageName = 'netfx-4.0.2-devpack' $installerType = 'EXE' $32BitUrl = 'http://download.microsoft.com/download/B/B/3/BB301D35-9D08-4012-B2F6-95823DFD3CEF/netfx_402mtpack.exe' $silentArgs = "/Quiet /NoRestart /Log $($env:temp)\netfx-4.0.2-devpack.log" $validExitCodes = @(0,3010) Install-ChocolateyPackage "$packageName...
patrickmaurer/chocolatey-packages
netfx-4.0.2-devpack/tools/chocolateyInstall.ps1
PowerShell
mit
398
$here = Split-Path -Parent $MyInvocation.MyCommand.Path @{ nugetRepo = "$TestDrive\nugetRepo" nodeDeployRoot = "$TestDrive\deployment_root" deploymentHistoryFolder = "$TestDrive\deployment_history" variables = @{ ENV = "int" PWD ="password" IISRoot = "C:\IIS" DBHost = 'localhost' MyPackageDatabaseName = ...
cwpdevteam/NScaffold
test/test-fixtures/config_multiple/env.config.ps1
PowerShell
mit
518
@{ # Script module or binary module file associated with this manifest. RootModule = 'Profile.psm1' # Version number of this module. ModuleVersion = '0.1.11' # Supported PSEditions # CompatiblePSEditions = @() # ID used to uniquely identify this module GUID = 'b542ffb4-8243-43a2-9aa3-d3cfc890190a' # Author of this...
cdhunt/Profile
Profile.psd1
PowerShell
mit
3,866
function Invoke-DbaDbDbccCheckConstraint { <# .SYNOPSIS Execution of Database Console Command DBCC CHECKCONSTRAINTS .DESCRIPTION Executes the command DBCC CHECKCONSTRAINTS and returns results Reports and corrects pages and row count inaccuracies in the catalog views. These ...
wsmelton/dbatools
functions/Invoke-DbaDbDbccCheckConstraint.ps1
PowerShell
mit
10,132
# # Copyright (c) .NET Foundation and contributors. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. # <# .SYNOPSIS Installs dotnet cli .DESCRIPTION Installs dotnet cli. If dotnet installation already exists in the given directory it ...
alphacloud/Autofac.Extras.Quartz
dotnet-install.ps1
PowerShell
mit
46,783
Trace-VstsEnteringInvocation $MyInvocation try { . $PSScriptRoot\Get-PythonExe.ps1 $setuppy = Get-VstsInput -Name "setuppy" -Default "setup.py" $outputdir = Get-VstsInput -Name "outputdir" -Require $dependencies = Get-VstsInput -Name "dependencies" $python = Get-PythonExe -Name "pythonpath" $wo...
zooba/vsts-python-tasks
BuildSDist/BuildSDist.ps1
PowerShell
mit
817
#Requires -Version 3 function Get-RubrikVCenter { <# .SYNOPSIS Connects to Rubrik and retrieves the current Rubrik vCenter settings .DESCRIPTION The Get-RubrikVCenter cmdlet will retrieve the all vCenter settings actively running on the system. This does require authentication. ...
rubrikinc/PowerShell-Module
Rubrik/Public/Get-RubrikVCenter.ps1
PowerShell
mit
3,964
#Requires -Version 2.0 function Invoke-MsBuild { <# .SYNOPSIS Builds the given Visual Studio solution or project file using MsBuild. .DESCRIPTION Executes the MsBuild.exe tool against the specified Visual Studio solution or project file. Returns a hash table with properties for determining if the build succeeded...
deadlydog/Invoke-MsBuild
src/Invoke-MsBuild/Invoke-MsBuild.psm1
PowerShell
mit
36,112
$packageName = 'firefox-nightly' $softwareVersion = '58.0.1.2017110200-alpha' -Replace "^(\d+)\.(\d+)\.(\d+)[^-]+-([a-z]).*",'$1.$2$4$3' $softwareName = "Nightly $softwareVersion*" $installerType = 'exe' $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' $validExitCodes = @(0) [array]$key = Get-UninstallReg...
dtgm/chocolatey-packages
automatic/_output/firefox-nightly/58.0.1.2017110200/tools/chocolateyUninstall.ps1
PowerShell
apache-2.0
817
function Install-JetBrainsIntellijIdea { param( # JetBrains IntelliJ IDEA Community [switch]$Community, # JetBrains IntelliJ IDEA Ultimate [switch]$Ultimate ) # if($Community) { $Ultimate=$false } if($Ultimate) { $Community=$false } # install int...
AbsCoDes/boxstarter
helpers/install/Install-JetBrainsIntellijIdea.ps1
PowerShell
apache-2.0
462
$packageName = '{{PackageName}}' $packageSearch = "$packageName" $installerType = 'exe' $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' $validExitCodes = @(0) Get-ItemProperty -Path @('HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKLM:\Software\Micr...
maharishi/chocolatey-packages
automatic/icecast/tools/chocolateyUninstall.ps1
PowerShell
apache-2.0
945
$packageName = 'kvrt' $url = 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe' $checksum = 'bb3bbe9304108040150d66fdbbb02b1b0640375d0e88764858a323898989dcdb' $checksumType = 'sha256' $toolsPath = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $installFile = Join-Path $toolsPath "kvr...
dtgm/chocolatey-packages
automatic/_output/kvrt/2017.02.01.1941/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
960
# # Module manifest for module 'AzureRM.AzureStackAdmin' # # Generated by: Microsoft Corporation # # Updated on: 10/27/2015 # @{ # Script module or binary module file associated with this manifest ModuleToProcess = 'Microsoft.AzureStack.Commands.dll' # Version number of this module. ModuleVersion = '0.11.0' # ID u...
nemanja88/azure-powershell
src/ResourceManager/AzureStackAdmin/AzureRM.AzureStackAdmin.psd1
PowerShell
apache-2.0
3,095
copy C:\git\Glyma\Glyma.NodeService\Glyma.NodeService.Search\bin\Glyma.NodeService.Search.dll C:\git\Glyma\Glyma.SharePoint\MappingToolSPDeployment\Assemblies\
chris-tomich/Glyma
Glyma.NodeService/Glyma.NodeService.Search/CopyAssemblies.ps1
PowerShell
apache-2.0
159
$ciPath = (Split-Path $MyInvocation.MyCommand.Path) + "\" # Discover version(s) $versions = & ($ciPath + "discover_version.ps1") if ($versions) { # Build new version string $newVersion = "$($versions.InfoVersion.Major).$($versions.InfoVersion.Minor).$($versions.InfoVersion.Patch)" $package_version = $newVe...
skwasjer/SilentHunter
ci/set_version_from_git.ps1
PowerShell
apache-2.0
1,164
function RemoveRP($name) { if (Get-ADFSRelyingPartyTrust -Name $name) { Remove-ADFSRelyingPartyTrust -TargetName $name } } function AddRP($name) { $metadataFile = get-item ".\$name.xml" Add-ADFSRelyingPartyTrust -Name $name -MetadataFile $metadatafile } function ExercisePassiveWSFed() { $passiveWSFedn...
VFL-IT/AdfsSnapIn
DeploymentTests/testExportImport.ps1
PowerShell
bsd-3-clause
2,854
param ( ) $project_short_name = "ShipStation" $project_name = "$($project_short_name)Access" # Folder structure: # \build - Contains all code during the build process # \build\artifacts - Contains all files during intermidiate bulid process # \build\output - Contains the final result of the build process # \release ...
agileharbor/shipStationAccess
.build.ps1
PowerShell
bsd-3-clause
4,164
#region Initialize Cache if (-not [Sqlcollaborative.Dbatools.TabExpansion.TabExpansionHost]::Cache["servertrigger"]) { [Sqlcollaborative.Dbatools.TabExpansion.TabExpansionHost]::Cache["servertrigger"] = @{ } } #endregion Initialize Cache #region Tepp Data return $ScriptBlock = { param ( $commandName, ...
SirCaptainMitch/dbatools
internal/dynamicparams/servertrigger.ps1
PowerShell
mit
2,069
$CommandName = $MyInvocation.MyCommand.Name.Replace(".Tests.ps1", "") Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan . "$PSScriptRoot\constants.ps1" Describe "$CommandName Unit Tests" -Tag 'UnitTests' { Context "Validate parameters" { <# The $paramCount is adjusted based on t...
sqlpadawan/dbatools
tests/Test-DbaDiskAlignment.Tests.ps1
PowerShell
mit
1,330
<# Copyright (c) 2012-2014 VMware, Inc. 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 to use, copy, modify, merge, publish, distribut...
mingzhang888/webcommander
powershell/AD/adJoinDomain.ps1
PowerShell
mit
3,664
<# Disclaimer This code is provided without copyright and “AS IS”. It is free for you to use and modify under the MIT license. Note: All scripts require WMF 5 or above, and to run from PowerShell using "Run as Administrator" #> #Requires -version 5.0 #Requires -runasadministrator Clear-Host Write-Host -ForegroundC...
jdhitsolutions/PS-AutoLab-Env
Configurations/Archive/Deprecated-POC-StandAlone-Server-GUI/Snapshot-lab.ps1
PowerShell
mit
1,254
# # xComputer: DSC resource to rename a computer and add it to a domain or # workgroup. # function Get-TargetResource { [OutputType([System.Collections.Hashtable])] param ( [parameter(Mandatory)] [string] $Name, [string] $DomainName, [PSCredential] $Credential, [P...
phongdly/puppetlabs-dsc
lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xComputer/MSFT_xComputer.psm1
PowerShell
apache-2.0
7,976
param($installPath, $toolsPath, $package, $project) Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module Add-ApplicationInsights $project; Remove-Module Microsoft.ApplicationInsights; # SIG # Begin signature block # MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJBgUrDgMC...
ncarandini/UsbSniffer
src/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/wpa81/install.ps1
PowerShell
mit
9,823
function Main() { write-host "Running psake build tests" -ForeGroundColor GREEN remove-module psake -ea SilentlyContinue import-module .\psake.psm1 $psake.run_by_psake_build_tester = $true $results = runBuilds remove-module psake "" $results | Sort 'Name' | % { if ($_.Result -eq "Passed") { write-hos...
naasir/qrymancr
vendor/psake.4.2.0.1/tools/psake-buildTester.ps1
PowerShell
mit
2,314
#Add the modules to the profile directory $sourceModules = Get-ChildItem (Resolve-Path -Path (Join-Path -Path $PSScriptRoot -ChildPath '..\Modules')) -Filter *.psm1 foreach ($module in $sourceModules) { Add-ModuleToCustomProfile -ModulePath ($module.FullName) }
Vector241-Eric/MyDevSetup
Scripts/Install-ModulesToProfile.ps1
PowerShell
mit
265
$solutionFile = "C:\Carl\dev\Darecali\Darecali.sln" $sourceRootFolder = "C:\Carl\dev\Darecali\Darecali" $scriptFolder = "$sourceRootFolder.Deployment\Scripts\PowerShell" $sourceTitle = "Darecali" $nugetRepositoryFolder = "c:\nuget\" $progressId = 22100; $progressActivity = "Build and Deploy NuGet Local"; $progressTot...
ZodmanPerth/Darecali
Darecali.Deployment/Scripts/PowerShell/BuildAndDeployNugetLocal.ps1
PowerShell
mit
1,462
function My-FunctionInFileE { }
PowerShell/PowerShellEditorServices
test/PowerShellEditorServices.Test.Shared/References/ReferenceFileE.ps1
PowerShell
mit
32
## PowerShell: Script to Search a File Path For All Files by Name Or Type ## <# " Satnaam WaheGuru Ji" Resource: https://gallery.technet.microsoft.com/scriptcenter/Search-for-Files-Using-340397aa Author : Aman Dhally E-Mail : amandhally@gmail.com website : www.amandhally.net twitter : https://...
borkit/scriptdump
PowerShell/Working/files/FindFilesInDirectory.ps1
PowerShell
mit
1,288
function Get-PSWSUSUpdateFile { <# .SYNOPSIS Gets the files associated with a specific update or updates. .DESCRIPTION Gets the files associated with a specific update or updates. .PARAMETER InputObject Input object that will be used to locate files. Can be ...
proxb/PoshWSUS
Scripts/Get-PSWSUSUpdateFile.ps1
PowerShell
mit
9,345
<# .Synopsis Executes a bulk copy between two connections. .Description Executes a bulk copy operation between two connections. This is highly optimized if the destination has a managed bulkcopy implemenation, otherwise it is only generally optimized. For example, SQL Server has a bulk copy class...
mithrandyr/SimplySql
SimplySql/Cmdlets/Invoke-SqlBulkCopy.ps1
PowerShell
mit
6,139
################################################# # Author: Tim Odell # OCSPUG Demonstration 5/17/2017 # # Tim@TheOdells.org # Twitter: @timodell # # Feel free to use, fork and improve. # These are scripts I use everyday to manage my lab. # ################################################# function Get-AzureCp...
Chiliyago/SharePoint-Lab-Setup-via-ARM-and-DSC
Utility Scripts/Azure Tenant/Get-AzureCpuQuota.ps1
PowerShell
mit
772
function Get-DbaXEObject { <# .SYNOPSIS Gets a list of trace(s) from specified SQL Server instance(s). .DESCRIPTION This function returns a list of Traces on the specified SQL Server instance(s) and identifies the default Trace File .PARAMETER SqlInstance ...
sqlpadawan/dbatools
functions/Get-DbaXEObject.ps1
PowerShell
mit
4,561
function Restore-DbaBackupFromDirectory { <# .SYNOPSIS Restores SQL Server databases from the backup directory structure created by Ola Hallengren's database maintenance scripts. Different structures coming soon. .DESCRIPTION Many SQL Server database administrators use Ola H...
SirCaptainMitch/dbatools
functions/Restore-DbaBackupFromDirectory.ps1
PowerShell
mit
3,576
# Copyright (c) 2002-2015 "Neo Technology," # Network Engine for Objects in Lund AB [http://neotechnology.com] # # This file is part of Neo4j. # # Neo4j is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either v...
glennsarti/spike-Neo4J-Windows-Experiments
posh-neo-cm/packaging/standalone/src/main/distribution/shell-scripts/bin/Neo4j-Management.psd1
PowerShell
mit
1,707
# To run these tests, we have to fake login credentials [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')] param () # Unit Test Template Version: 1.1.0 $script:moduleName = 'xSQLServerHelper' [String] $script:moduleRoot = Split-Path -Parent (Split-Path -Parent $...
PaulFeaser/xSQLServer
Tests/Unit/xSQLServerHelper.Tests.ps1
PowerShell
mit
80,571
$packageName = '{{PackageName}}' $url = '{{DownloadUrl}}' $checksum = '{{Checksum}}' $checksumType = 'sha1' $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $installFile = Join-Path $toolsDir "mweather.exe" Install-ChocolateyZipPackage -PackageName "$packageName" ` -U...
maharishi/chocolatey-packages
automatic/mweather.portable/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
612
function GetUninstallPath() { param( [Parameter(Mandatory = $true)] [string]$product ) $regUninstallDir = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' $regUninstallDirWow64 = 'HKLM:\SOFTWARE\Wow432Node\Microsoft\Windows\CurrentVersion\Uninstall\' $uninstallPaths = $(Get-ChildItem $re...
octomike/chocolatey-coreteampackages
automatic/firefox/tools/helpers.ps1
PowerShell
apache-2.0
3,421
set-variable -name LastExitCode 0 set-strictmode -version 2.0 $ErrorActionPreference="Stop" # If the test runner crashes and doesn't shut down CPC, CPC could fill # the entire disk with ETL traces. try { taskkill /F /IM CPC.exe 2>&1 | Out-Null } catch {} try { taskkill /F /IM msbuild.exe 2>&1 | Out-Null } catc...
balajikris/roslyn
build/scripts/cleanup_perf.ps1
PowerShell
apache-2.0
1,314
<# Implementatation Notes Managing Disposable Objects The types PrincipalContext, Principal, and DirectoryEntry are used througout the code and all are disposable. However, in many cases, disposing the object immediately causes subsequent operations to fail or duplicate disposes c...
puppetlabs/puppetlabs-dsc
lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xGroupResource/MSFT_xGroupResource.psm1
PowerShell
apache-2.0
92,968
# Move to the project root folder (parent from current script folder) function Get-ScriptDirectory { $Invocation = (Get-Variable MyInvocation -Scope 1).Value Split-Path $Invocation.MyCommand.Path } $rootFolder = (Get-Item (Get-ScriptDirectory)).Parent.FullName Set-Location $rootFolder # Functions functio...
OkraFramework/Okra.Data
scripts/Clean.ps1
PowerShell
apache-2.0
700
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. Describe "DotNetAPI" -Tags "CI" { $posh_E = 2.718281828459045 $posh_pi = 3.14159265358979 It "Should be able to use static .NET classes and get a constant" { [System.Math]::E | Should -Match $posh_E.ToString()...
Cowmonaut/PowerShell
test/powershell/Language/Interop/DotNet/DotNetAPI.Tests.ps1
PowerShell
mit
988
function Add-PesterTemplate { <# .SYNOPSIS Add a pester template file for each function or class in the module. .DESCRIPTION Add a pester template file for each function or class in the module. Adds new files only. #> [CmdletBinding()] param ( # BuildInfo is use...
indented-automation/BuildTools
Indented.Build/public/Add-PesterTemplate.ps1
PowerShell
mit
2,706
$packageName = 'webvideocap.install' $installerType = 'exe' $url = 'http://www.nirsoft.net/utils/webvideocap_setup.exe' $checksum = 'e43431eb39d01e9d5be77b3d7bde936e567c968e' $checksumType = 'sha1' $silentArgs = '/S' $validExitCodes = @(0) Install-ChocolateyPackage -PackageName "$packageName" ` ...
dtgm/chocolatey-packages
automatic/_output/webvideocap.install/1.41/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
611
$currentWorkingDir = Split-Path -Parent $MyInvocation.MyCommand.Definition . $currentWorkingDir\env_asm.ps1 function createStorageAccountIfNotExist( [String] $storageAccount, [String] $location) { get-azurestorageaccount -storageaccountname $storageAccount if ($? -eq $False) { new-azurestorageaccoun...
clovertrail/rocket
powershell/BSDPublishImage/frbsd11/createAccountUploadVHD.ps1
PowerShell
apache-2.0
3,157
# DSC configuration for Firewall # configuration Sample_xFirewall_AddFirewallRuleToExistingGroup { param ( [string[]]$NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xFirewall Firewall { Name = "MyFirewa...
JMvanderDuim/PhoneManager
devtestlabdemo/devtestlabdemo/DSC/xNetworking/2.8.0.0/Examples/Sample_xFirewall_AddFirewallRuleToExistingGroup.ps1
PowerShell
mit
829
param($installPath, $toolsPath, $package, $project) function InjectTargets($installPath, $project) { $targetsFile = [System.IO.Path]::Combine([System.IO.Path]::GetDirectoryName($project.FullName), 'Fody.targets') # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Vers...
Ahmadlabib2/Universal-User-Manager
src/packages/Fody.1.19.0.0/Tools/install.ps1
PowerShell
bsd-3-clause
1,626
# ---------------------------------------------------------------------------------- # # 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...
arcadiahlyy/azure-powershell
src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.ps1
PowerShell
apache-2.0
3,207
Param( [string]$SiteCode = 'TST', [string]$SiteName = 'Test Site' ) # Ensure we force use of TLS 1.2 for all downloads. [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 cd $($PSScriptRoot) #Check if System is Domain-Joined if((gwmi win32_computersystem).partofdomain -eq $true) { #...
Azure/azure-devtestlab
Artifacts/windows-ConfigurationManagerTechnicalPreview/setupCMCB.ps1
PowerShell
mit
5,014
enum NSEC3HashAlgorithm { SHA1 = 1 # [RFC5155] }
indented-automation/Indented.Net.Dns
Indented.Net.Dns/enum/NSEC3HashAlgorithm.ps1
PowerShell
mit
55
<################################################################################################## Description =========== - This script does the following - - configures hyper-v - configures minikube - This script generates logs in the following folder - - %ALLUSERSPROFILE%\MinikubeConfigurator-...
markusheiliger/devtestlab-edge
artifacts/windows-minikube/MinikubeConfigurator.ps1
PowerShell
mit
6,560
Param() # import class and function $ScriptPath = $PSScriptRoot $DlibDotNetRoot = Split-Path $ScriptPath -Parent $ScriptPath = Join-Path $DlibDotNetRoot "nuget" | ` Join-Path -ChildPath "BuildUtils.ps1" import-module $ScriptPath -function * $OperatingSystem="win" # Store current directory $...
takuya-takeuchi/DlibDotNet
nuget/BuildUniversalWindowsPlatform.ps1
PowerShell
mit
1,124
$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' Import-Module -Name $script:SPDscUtilModulePath function Get-TargetResource { [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param ( [Parameter(Mandatory = $true)] [...
PowerShell/xSharePoint
SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1
PowerShell
mit
32,539
# VsizTools # Version 1.0 # Copyright (c) Dave Kerr 2014 [Reflection.Assembly]::LoadWithPartialName( "System.IO.Compression.FileSystem" ) # Unzips a zip file at $path to the folder $destination. function Unzip($path, $destination) { [System.IO.Compression.ZipFile]::ExtractToDirectory($path, $destination) } # Gi...
SolidEdgeCommunity/Templates
src/vs2012/SolidEdgeCommunity.VSIX/VsixTools.ps1
PowerShell
mit
9,779
# makes sure all lines end CRLF (ASCII code 13 and 10) & { # makes sure all lines end CRLF (ASCII code 13 and 10) & { # get access to editor: $Editor = Get-SteroidsEditor # RegEx pattern for various types of line endings: $pattern = '(?m)\`\s{1,}$' # find these line endings and ...
nylyst/Powershell
Modules/ISESteroids/Fixer/Character Operations/BacktickPlusSpace/BacktickSpace.ps1
PowerShell
mit
11,252
<# .SYNOPSIS VMs creation. .DESCRIPTION Create multiple VMs on the vCenter. .NOTES File name : Create-VM.ps1 Author : Pierre JACQUOT Date : 20/06/2017 Version : 1.0 .LINK Website : https://www.pierrejacquot.go.yo.fr Reference : https://www.pierrejacquot.go.yo.fr/index.php/scripts/42-scri...
pierre-jacquot/Scripts
PowerCLI/Create-VM/Create-VM.ps1
PowerShell
mit
18,927
Login-AzureRMAccount $spParams = @{ DisplayName = exampleapp Password = "{provide-password}" } $sp = New-AzureRmADServicePrincipal @spParams $SleepParams = @{ Seconds = 20 } Start-Sleep @SleepParams $AzureRoleAssignmentParams = @{ RoleDefinitionName = Contributor ServicePrincipalName = $...
krjhitch/ARMandDSCDeploy
Templates/SupportingCode/CreateServicePrincipalwPassword.ps1
PowerShell
mit
949
#region HEADER # Integration Test Config Template Version: 1.2.0 #endregion $configFile = [System.IO.Path]::ChangeExtension($MyInvocation.MyCommand.Path, 'json') if (Test-Path -Path $configFile) { <# Allows reading the configuration data from a JSON file, for real testing scenarios outside of the C...
PowerShell/xActiveDirectory
tests/Integration/MSFT_ADUser.config.ps1
PowerShell
mit
12,009
. $PSScriptRoot\Init.ps1 function Describe($name, $script) { $init = $false Pester\Describe $name { BeforeAll { StartupSafe $name $init = $true LogTest "Running safe test '$name'" } AfterAll { if($init) { ...
lordmilko/PrtgAPI
src/PrtgAPI.Tests.IntegrationTests/Support/PowerShell/IntegrationTestSafe.ps1
PowerShell
mit
454
# Import the Networking Resource Helper Module Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) ` -ChildPath (Join-Path -Path 'StorageDsc.ResourceHelper' ` -ChildPath 'StorageDsc.ResourceHelper.psm1')) # Im...
MS-MatthewWalker/xStorage
Modules/xStorage/Modules/StorageDsc.Common/StorageDsc.Common.psm1
PowerShell
mit
4,011
function Save-LabRecipe { [CmdletBinding(SupportsShouldProcess)] param ( [Parameter(Mandatory, ValueFromPipeline)] [pscustomobject] $Recipe ) $recipeFileName = Join-Path -Path $HOME -ChildPath "automatedLab\recipes\$($Recipe.Name).json" if ($PSCmdlet.ShouldProcess($rec...
AutomatedLab/AutomatedLab
AutomatedLab.Recipe/Public/Save-LabRecipe.ps1
PowerShell
mit
455
param( [switch]$KeepNupkg ) Import-Module .\constants.psm1 Import-Module .\internal\utils.psm1 $Global:ErrorActionPreference = "Stop" $currentVersion = Get-PackageVersion -NuspecPath $NuspecPath $newVersion = Format-Version -Major ($currentVersion.Major + 1) -Minor 0 -Patch 0 .\publish_version.ps1 -...
manisero/NugetTest
scenarios/multiple_projects/scripts/publish_new_major.ps1
PowerShell
mit
373
function New-CredStore { <# .SYNOPSIS Creates a credstore to store PSCredentials .DESCRIPTION Creates a store of credentials associated with a "friendly-name"(credname), each credential in the store is then accessible by calling the storename and appending the credname Credentials are stored as PSCredent...
heidarj/Powershell
credstore.psm1
PowerShell
mit
2,889
<# .SYNOPSIS Tests to confirm that a supplied HTTP Status Code is valid .DESCRIPTION Tests to confirm that a supplied HTTP Status Code is valid .PARAMETER StatusCode StatusCode to test is valid .EXAMPLE C:\PS>"404" | Test-StatusCakeHelperStatusCode Test if the value 404 is a valid status code .OUTP...
Oliver-Lii/statuscake-helpers
StatusCake-Helpers/Private/ParameterValidation/Test-StatusCakeHelperStatusCode.ps1
PowerShell
apache-2.0
728
<# .SYNOPSIS This PowerShell script module file contains common, reusable functions that are intended to be included in all PowerShell scripts that reside within the automation framework. .DESCRIPTION Note: This script module is NOT intended to be executed independent of another PowerShell script referencing and using...
ChrisJaehnen/dev-tools-script-console
Modules/Invoke/Invoke-ProcessByRef.psm1
PowerShell
apache-2.0
11,277
#requires -Modules Pester, Cisco.UcsManager [CmdletBinding()] Param( # Optionally fix all config drift that is discovered. Defaults to false (off) [switch]$Remediate = $false, # Optionally define a different config file to use. [string]$ConfigName ) Process { # Tests Describe -Name 'Comprehen...
FooBartn/Ucs-Puptr
Ucs-Puptr/Diagnostics/3. Comprehensive/PowerRedundancy.Tests.ps1
PowerShell
apache-2.0
2,583
function Add-VSWAFv2RuleGroupSingleQueryArgument { <# .SYNOPSIS Adds an AWS::WAFv2::RuleGroup.SingleQueryArgument resource property to the template. .DESCRIPTION Adds an AWS::WAFv2::RuleGroup.SingleQueryArgument resource property to the template. .LINK http://docs.aws.amazon....
scrthq/Vaporshell
VaporShell/Public/Resource Property Types/Add-VSWAFv2RuleGroupSingleQueryArgument.ps1
PowerShell
apache-2.0
2,266