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
<# .SYNOPSIS Autonance DSL maintenance container. .DESCRIPTION The Maintenance container is part of the Autonance domain-specific language (DSL) and is used to define a maintenance container block. The maintenance container block is always the topmost block and contains all ...
claudiospizzi/Autonance
Autonance/Functions/Container/Maintenance.ps1
PowerShell
mit
2,714
param ( [string]$query = "", [int32]$limit = 100000, [switch]$debug = $false, [datetime]$start = 0, [datetime]$end = 0, [int32]$top = 0, [switch]$summary = $false, [string]$timesort = [asc, dsc] ) [Reflection.Assembly]::LoadWithPartialName("System.Web") | Out-Null $stopwatch = [Diagnostics.Stopwat...
amol9/scripts
firefox/firefox.ps1
PowerShell
mit
2,785
# # Module manifest for module 'Format-Pester' # # Generated by: Erwan Quélin # # Generated on: 24/05/2016 # @{ # Script module or binary module file associated with this manifest. RootModule = 'Format-Pester.psm1' # Version number of this module. # If you are increasing ModuleVersion please change also the values o...
equelin/Format-Pester
Format-Pester/Format-Pester.psd1
PowerShell
mit
3,688
Function _FixAreaIterationValues([hashtable] $Fields, $ProjectName) { if ($Fields.ContainsKey('System.AreaPath') -and ($Fields['System.AreaPath'] -notmatch "'\\?$ProjectName\\.+'")) { $Fields['System.AreaPath'] = ("$ProjectName\$($Fields['System.AreaPath'])" -replace '\\', '\') } if ($Fields.ContainsKey('System....
egomesbrandao/tfscmdlets
src/PS/WorkItem/_Helpers.ps1
PowerShell
mit
543
#Enable the Policy Set-ItemProperty -Path $FireFoxBasePolicyRegKey -Name 'SupressUpdatePage' -Value 1 -ea SilentlyContinue
DBHeise/VM_Setup
03_Firefox/DisableWhatsNew.ps1
PowerShell
mit
125
. (Join-Path $PSScriptRoot SemVer.ps1) $SDIST_PACKAGE_REGEX = "^(?<package>.*)\-(?<versionstring>$([AzureEngSemanticVersion]::SEMVER_REGEX))" # Posts a github release for each item of the pkgList variable. SilentlyContinue function CreateReleases($pkgList, $releaseApiUrl, $releaseSha) { foreach ($pkgInfo in $pkgLis...
hyonholee/azure-sdk-for-net
eng/common/scripts/artifact-metadata-parsing.ps1
PowerShell
mit
16,560
<# Usage Update-TfsCommentWithMigratedId -SourceCollectionUri "http://localhost:8080/tfs/defaultcollection" -TargetCollectionUri "http://localhost:8080/tfs/defaultcollection" -SourceTeamProject "Old team project" #> function Update-TfsCommentWithMigratedId { <# .SYNOPSIS This funct...
rfennell/VSTSPowershell
DOTNET/Update-TfsCommentWithMigratedId.ps1
PowerShell
mit
3,823
function Reset-DbaAdmin { <# .SYNOPSIS This function allows administrators to regain access to SQL Servers in the event that passwords or access was lost. Supports SQL Server 2005 and above. Windows administrator access is required. .DESCRIPTION This function allows administrators ...
kozloski/dbatools
functions/Reset-DbaAdmin.ps1
PowerShell
mit
25,712
#Test for script analyzer write-output "hello world" get-service bits write-output "finish"
gabrielpowershell/jenkins
test.ps1
PowerShell
apache-2.0
93
InModuleScope Watchmen { describe 'EventLog' { Mock -CommandName Assert-InWatchmen -MockWith {} it 'Returns a [Watchmen.Notifier.EventLog] object' { $e = @{ EventType = 'Error' EventId = 1 } ...
devblackops/watchmen
Tests/Public/EventLog.tests.ps1
PowerShell
apache-2.0
657
#requires -runasadministrator param( [Parameter(Mandatory=$true,ParameterSetName="External Database")] [string]$ConnectionString, [ValidateSet("sqlserver2014")] [Parameter(Mandatory=$false,ParameterSetName="External Database")] [string]$DbType="sqlserver2014", [Parameter(Mandatory=$true,Parame...
beutepa/ISHBootstrap
Source/Builders/Initialize-ISH.Instance.ps1
PowerShell
apache-2.0
26,952
$packageName = 'firefox-nightly' $softwareVersion = '58.0.1.2017111000-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.2017111000/tools/chocolateyUninstall.ps1
PowerShell
apache-2.0
817
# Copyright © 2017 Chocolatey Software, Inc. # Copyright © 2015 - 2017 RealDimensions Software, LLC # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not...
bazzilic/choco
src/chocolatey.resources/helpers/functions/Install-ChocolateyPackage.ps1
PowerShell
apache-2.0
14,400
<# DISKSPD - VM Fleet Copyright(c) Microsoft Corporation All rights reserved. MIT License 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 ri...
microsoft/diskspd
Frameworks/VMFleet1.0/test-clusterhealth.ps1
PowerShell
mit
25,363
<# Request and Accept a certificate from an Active Directory Root Certificate Authority. This example is allowing storage of credentials in plain text by setting PSDscAllowPlainTextPassword to $true. Storing passwords in plain text is not a good practice and is presented only for simplicity and demonstration purpos...
SteelCrusaders/xCertificate
Examples/Sample_xCertReq_RequestSSLCert.ps1
PowerShell
mit
1,888
function Get-TargetResource { [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param ( [parameter(Mandatory = $true)] [System.String] $Name, [parameter(Mandatory = $true)] [System.String] $ApplicationPool, [parameter(Mandatory = $false)] [ValidateSet("Present","Absent...
BrianFarnhill/SharePointDsc
Modules/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/MSFT_SPExcelServiceApp.psm1
PowerShell
mit
5,270
Start-AutoRestCodeGeneration -ResourceProvider "resources/resource-manager" -AutoRestVersion "latest"
shahabhijeet/azure-sdk-for-net
src/SDKs/Resource/Management.ResourceManager/generate.ps1
PowerShell
mit
102
# Tested in PowerShell 5.1 & PowerShell Core 6.0.2 on Windows 10 # Usecase: trigger BigFix UI with desktop shortcut, but if done too soon, BigFix won't be started and an error will be displayed without this script. # Uncomment following line to disable write-host output to console: # function global:Write-Host()...
jgstew/tools
powershell/OpenBigFixUI_WaitForStatus.ps1
PowerShell
mit
2,595
Describe "Set-LogonWallpaper" { $scriptFile = Join-Path -Path $PSScriptRoot -ChildPath "..\Set-LogonWallpaper.ps1" $imagePath = "TestDrive:\wallpaper.png" Mock Set-ItemProperty {} Mock Remove-Item {} Mock New-Item {} Mock Copy-Item {} Set-Content -Value "" -Path $imagePath It "Should ...
mbsj/PowerShell
Scripts/Tests/Set-LogonWallpaper.Tests.ps1
PowerShell
mit
979
$packageName = 'zerobrane-studio.install' $zipFileName = 'zerobrane-studio.installInstall.zip' try { UnInstall-ChocolateyZipPackage $packageName $zipFileName # Also remove the shortcut we added $shortcutPath = join-path $env:appdata "Microsoft\Windows\Start Menu\Programs" $shortcutName = "ZeroBrane Stud...
beforan/zerobrane-studio-chocolatey
zerobrane-studio.install/tools/chocolateyUninstall.ps1
PowerShell
mit
453
Task 'build-examples' ` -requiredVariables ExamplesDir, ModuleName, ReleaseDir, Version ` -precondition { BuildOutputExists -and ModuleIsImported } ` { Write-Host "Creating new Psst.Example module" New-PsstGeneratorModule -Name "Example" -OutputPath $ExamplesDir -Version $Version }
Cobster/psst
psake/build-examples.task.ps1
PowerShell
mit
298
@{ # Script module or binary module file associated with this manifest. RootModule = 'ImageHelpers.psm1' # Version number of this module. ModuleVersion = '0.0.1' # Supported PSEditions # CompatiblePSEditions = @() # ID used to uniquely identify this module GUID = 'c9334909-16a1-48f1-a94a-c7baf1b961d9' ...
mattgwagner/New-Machine
.github-actions/images/win/scripts/ImageHelpers/ImageHelpers.psd1
PowerShell
mit
3,604
function Edit-ConfigurationData([string]$path) { PowerShell_ise.exe -File $path } $path = "Configuration\ConfigurationData\ConfigurationData.ps1" Edit-ConfigurationData -path $path
guitarrapc/DSCSample
PowerShellSessionVol3/Edit-ConfigurationData.ps1
PowerShell
mit
188
# # Swaggy Jenkins # Jenkins API clients generated from Swagger / Open API specification # Version: 1.1.2-pre.0 # Contact: blah@cliffano.com # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Class No description a...
cliffano/swaggy-jenkins
clients/powershell/generated/src/PSOpenAPITools/Model/Hudson.ps1
PowerShell
mit
9,418
# TODO: Invoke-VultrServerGet_App_Info.ps1
sdsalyer/PSVultrAPI
PSVultrAPI/Public/server/Invoke-VultrServerGet_App_Info.ps1
PowerShell
mit
42
# Convert the objects returned from Foil into Software Identities (SWIDs). # Chocolatey (and therefore Foil) doesn't return source information in its packge output, so we have to inject source information based on what the user requested. # If a custom source isn't specified, default to using Chocolatey.org. function C...
jianyunt/ChocolateyGet
src/private/ConvertTo-SoftwareIdentity.ps1
PowerShell
mit
1,047
[CmdletBinding()] param( [Parameter()] [string] $SharePointCmdletModule = (Join-Path -Path $PSScriptRoot ` -ChildPath "..\Stubs\SharePoint\15.0.4805.1000\Microsoft.SharePoint.PowerShell.psm1" ` -Resolve) ) Import-Module -Name...
ykuijs/xSharePoint
Tests/Unit/SharePointDsc/SharePointDsc.SPSitePropertyBag.Tests.ps1
PowerShell
mit
6,345
function Flow { param( [Parameter(Position=0)][string]$Category = "", [Parameter(Position=1)][string]$NameOrAction = "", [Parameter(Position=2)][string]$Action = "", [Parameter(Position=3)][string]$Arg1 = "" ) $DefaultBranch = "master"; $DevelopBranch = "develop"; $F...
csim/posh-gitflow
posh-gitflow.psm1
PowerShell
mit
10,700
Function Set-DotNetSdkVersion { [CmdletBinding()] param( [string]$version, [string]$folder = $pwd ) if(Test-Path "global.json") { $globalJsonPath = (Resolve-Path 'global.json').Path $globalJsonContent = Get-Content $globalJsonPath -raw | ConvertFrom-Json } else { $globalJsonPath = J...
IntelliTect/PSToolbox
Functions/DotNetCore.ps1
PowerShell
mit
647
#requires -modules BuildHelpers #requires -modules @{ ModuleName = "Pester"; ModuleVersion = "4.4.0" } Describe "ConvertTo-JiraPriority" -Tag 'Unit' { BeforeAll { Remove-Item -Path Env:\BH* $projectRoot = (Resolve-Path "$PSScriptRoot/../..").Path if ($projectRoot -like "*Release") { ...
AtlassianPS/JiraPS
Tests/Functions/ConvertTo-JiraPriority.Unit.Tests.ps1
PowerShell
mit
2,305
function Optimize-PowerShellConsoleFiles { try { Push-Location $ProfileConfig.Module.InstallPath $librariesPath = Join-Path $ProfileConfig.Module.InstallPath "Libraries" Write-Host -ForegroundColor Green "Removing excess ConEmu Files..." & (Join-Path $librariesPath "ConEmu\R...
paulmarsy/Console
Custom Consoles/PowerShell/Exports/Functions/Customisation Helpers/Optimize-PowerShellConsoleFiles.ps1
PowerShell
mit
637
<# .Synopsys The Get-TargetResource cmdlet. #> function Get-TargetResource { param ( [ValidateSet("Present", "Absent")] [System.String] $Ensure = "Present", [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [System.String] $Name, [System....
brianehlert/PoSh.org-DSC
Resources/Craig-Martin/DSCResources/GlobalAssemblyCache/GlobalAssemblyCache.psm1
PowerShell
mit
2,727
function Get-ADSISchema { <# .SYNOPSIS The Get-ADSISchema function gather information about the current Active Directory Schema .DESCRIPTION The Get-ADSISchema function gather information about the current Active Directory Schema .PARAMETER PropertyType Specify the type of property to return .PARAMETER ...
lazywinadmin/AdsiPS
src/public/Get-ADSISchema.ps1
PowerShell
mit
4,391
Import-Module ActiveDirectory $userpath = '<UNC-Path-to-User-Folder>' $mappedpath = '<Drive Letter>' $OU = '<OU DN>' $adusers = get-aduser -Filter * -SearchBase $OU -SearchScope OneLevel foreach ($user in $adusers) { $sam = "$($user.SamAccountName.ToString())" New-Item -Path $userpath$sam -ItemType Directory -Force...
natesubra/POSH
Create-ADUserFolder.ps1
PowerShell
mit
634
$packageName = 'kvrt' $url = 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe' $checksum = 'd33bc0c2aaf777c5303c617cb1dd5d3af77733e6e68cfcb69e7bb7c8315404be' $checksumType = 'sha256' $toolsPath = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $installFile = Join-Path $toolsPath "kvr...
dtgm/chocolatey-packages
automatic/_output/kvrt/2017.03.23.1220/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
960
#Requires -RunAsAdministrator #Requires -Module PowerShellGet <#PSScriptInfo .VERSION 2.0 .GUID ad9d9052-dd2e-42ef-8b4d-4119a3e62cbd .AUTHOR Christos Gkantsidis .COMPANYNAME .COPYRIGHT .TAGS .LICENSEURI https://raw.githubusercontent.com/gkantsidis/WindowsPowerShell/master/LICENSE .PROJECTURI https://github.com...
gkantsidis/WindowsPowerShell
ModuleHelper.psm1
PowerShell
apache-2.0
9,124
function Uninstall-CPerformanceCounterCategory { <# .SYNOPSIS Removes an entire performance counter category. .DESCRIPTION Removes, with extreme prejudice, the performance counter category `CategoryName`. All its performance counters are also deleted. If the performance counter category ...
pshdo/Carbon
Carbon/Functions/Uninstall-PerformanceCounterCategory.ps1
PowerShell
apache-2.0
1,233
function Add-VSGlueCrawlerCatalogTarget { <# .SYNOPSIS Adds an AWS::Glue::Crawler.CatalogTarget resource property to the template. Specifies an AWS Glue Data Catalog target. .DESCRIPTION Adds an AWS::Glue::Crawler.CatalogTarget resource property to the template. Specifies an AWS Glue Data C...
scrthq/Vaporshell
VaporShell/Public/Resource Property Types/Add-VSGlueCrawlerCatalogTarget.ps1
PowerShell
apache-2.0
2,737
function Add-VSECSTaskDefinitionTaskDefinitionPlacementConstraint { <# .SYNOPSIS Adds an AWS::ECS::TaskDefinition.TaskDefinitionPlacementConstraint resource property to the template. The TaskDefinitionPlacementConstraint property specifies an object representing a constraint on task placement in the tas...
scrthq/Vaporshell
VaporShell/Public/Resource Property Types/Add-VSECSTaskDefinitionTaskDefinitionPlacementConstraint.ps1
PowerShell
apache-2.0
4,294
<# .EXAMPLE This example shows how to install a named instance of SQL Server on a single server, from an UNC path. .NOTES Assumes the credentials assigned to SourceCredential have read permission on the share and on the UNC path. The media will be copied locally, using impersonation with...
Blankf/xSQLServer
Examples/Resources/xSQLServerSetup/3-InstallNamedInstanceSingleServerFromUncPathUsingSourceCredential.ps1
PowerShell
mit
4,214
function Start-Negotiate { param($s,$SK,$UA='Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko') function ConvertTo-RC4ByteStream { Param ($RCK, $In) begin { [Byte[]] $S = 0..255; $J = 0; 0..255 | ForEach-Object { $J = ($J +...
frohoff/Empire
data/agent/stagers/http_com.ps1
PowerShell
bsd-3-clause
7,943
$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" { [object[]]$params = (Get-Command $CommandName).Parame...
alevyinroc/dbatools
tests/Remove-DbaTrace.Tests.ps1
PowerShell
mit
5,767
Function CreateAdApp_Test { $adDisplayName = "TestAdAppForNodeCliTestCase" $subId = '2c224e7e-3ef5-431d-a57b-e71f4662e3a6' Create-ServicePrincipal -ADAppDisplayName "MyModTestApp1" -SubscriptionId 2c224e7e-3ef5-431d-a57b-e71f4662e3a6 -TenantId 72f988bf-86f1-41af-91ab-2d7cd011db47 -createADAppIfNotFound $t...
devigned/azure-powershell
tools/Modules/Tests/RepoModuleTests.ps1
PowerShell
apache-2.0
622
# # INIT # Task 'init' `` -description "Creates the release directory if it doesn't already exist." `` -RequiredVariable OutputDir `` { if (-not (Test-Path `$OutputDir)) { New-Item `$OutputDir -ItemType Directory | Out-Null } }
Cobster/psst
src/PsstGeneratorModule/Psst.$($Model.Name)/psake/init.task.ps1
PowerShell
mit
254
 function Get-BashOnWindows { $shell = if ([Environment]::Is64BitProcess) { [ShellShifterInfomation]::new( 'bow', "$env:SystemRoot\System32\bash.exe", '' ) } else { [ShellShifterInfomation]::new( 'bow', "$env:SystemRoot\sysnati...
m5knt/ShellShifter
BashOnWindows.ps1
PowerShell
mit
1,111
<# .SYNOPSIS Get-ExchangeDatabaseQuotas.ps1 - Exchange Database Storage Quota Report Script .DESCRIPTION Generates a report of the storage quota configurations for Exchange Server databases .OUTPUTS Outputs to CSV files .EXAMPLE .\StorageQuotas.ps1 Reports storage quota configuration for all Exchange mailbox and ...
cunninghamp/Powershell-Exchange
DatabaseQuotas/Get-ExchangeDatabaseQuotas.ps1
PowerShell
mit
3,912
param ( [string]$Taskaction = $(throw "Taskaction is Missing"), [string]$Taskname = $(throw "Taskname is Missing") ) # Get the ID and security principal of the current user account $myWindowsID = [System.Security.Principal.WindowsIdentity]::GetCurrent(); $myWindowsPrincipal = New-Object System.Security.Principal...
roozbehk/til
powershell/releasemanagement/ScheduledTasks/Scheduled_Task_End_Run.ps1
PowerShell
mit
1,752
$databaseName = "Twitta" $base_dir = resolve-path . $source_dir = "$base_dir\source" $databaseScripts = "$source_dir\Database.Twitta" $SqlPackage = "C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin\SqlPackage.exe" $AliaSQL = "$base_dir\lib\AliaSQL\AliaSQL.exe" $databaseName_Original = "$databaseName" + "_Origina...
jdehlin/Twitta
schema_compare.ps1
PowerShell
mit
1,085
param ($Task = 'Default') $global:VerbosePreference = "SilentlyContinue" # Grab nuget bits, install modules, set build variables, start build. Get-PackageProvider -Name NuGet -ForceBootstrap | Out-Null # Install modules if required $ModNames = @('Psake', 'PSDeploy', 'BuildHelpers', 'PSScriptAnalyzer', 'VMware.VimAut...
adamrushuk/PSvCloud
build.ps1
PowerShell
mit
1,227
function Get-EXRUsers { [CmdletBinding()] param( [Parameter(Position = 0, Mandatory = $false)] [string]$MailboxName, [Parameter(Position = 1, Mandatory = $false)] [psobject]$AccessToken, [Parameter(Position = 2, Mandatory = $false)] [psobject]$filter, [Parameter(Position = 3, Ma...
gscales/Exch-Rest
functions/users/Get-EXRUsers.ps1
PowerShell
mit
1,741
<# .SYNOPSIS Return a SharePoint resource as a JSON string .PARAMETER Url The Url of the JSON resource. .EXAMPLE PS> Get-JsonObject -Url 'http://contoso.intranet.com/_vti_bin/listdata.svc/TheList(1)'' .OUTPUT Json-formatted string #> function Get-JsonObject { Param( [Parameter(Mandatory=$True,Position=1...
craibuc/PsSharePoint
Functions/Get-JsonObject.ps1
PowerShell
mit
753
# # Adaptive BI Framework 3.0 # # # Setup Objects # # Target Server/Instance $targetServer = "localhost"; # Execute setup scripts & sqlcmd -i setup-views-1.sql -S $targetServer
SolidQIT/ABI-Solution
support/sample/setup/setup-views-1.ps1
PowerShell
mit
183
function Get-SslRegValue { <# .SYNOPSIS Gets the registry value for an SSL component. .DESCRIPTION Gets the registry value for an SSL component. .OUTPUTS [uint32] [string] Registry value. .EXAMPLE $Element = $Elements | where {$_.Nam...
fsackur/SslRegConfig
Private/Get-SslRegValue.ps1
PowerShell
mit
907
function Sync-RubrikOptionsFile { <# .SYNOPSIS Syncs a users options file with the template and creates the global rubrikOptions variable .DESCRIPTION This function will check the default options file provided with the module and copy any new key/values to the users options file, maintaini...
rubrikinc/PowerShell-Module
Rubrik/Private/Sync-RubrikOptionsFile.ps1
PowerShell
mit
2,886
<# .SYNOPSIS Deploys a Service Fabric application type to a cluster. .DESCRIPTION This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. .NOTES WARNING: This script file is invoked by Visual Studio. Its parame...
larrywa/blogpostings
SFContainerLogs/SFContainerLogs/Scripts/Deploy-FabricApplication.ps1
PowerShell
mit
9,834
# # Module manifest for module 'IntelliTect.Common' # # Generated by: Mark Michaelis # # Generated on: 6/24/2021 # @{ # Script module or binary module file associated with this manifest. RootModule = './IntelliTect.Common.psm1' # Version number of this module. ModuleVersion = '0.2.0.7' # Supported P...
IntelliTect/PSToolbox
Modules/IntelliTect.Common/IntelliTect.Common.psd1
PowerShell
mit
4,725
. $PSScriptRoot\variables.ps1 dotnet pack $projectRoot\src\GravatarHelper\GravatarHelper.csproj -c Release -o $packageOutputDirectory dotnet pack $projectRoot\src\GravatarHelper.Common\GravatarHelper.Common.csproj -c Release -o $packageOutputDirectory dotnet pack $projectRoot\src\GravatarHelper.AspNetCore\GravatarHelp...
jkommer/GravatarHelper
build/scripts/create-packages.ps1
PowerShell
cc0-1.0
378
# # Module manifest for module 'PSGet_AzureRM.Sql' # # Generated by: Microsoft Corporation # # Generated on: 1/22/2018 # @{ # Script module or binary module file associated with this manifest. # RootModule = '' # Version number of this module. ModuleVersion = '4.2.0' # Supported PSEditions # CompatiblePSEditions = ...
devigned/azure-powershell
src/ResourceManager/Sql/AzureRM.Sql.psd1
PowerShell
apache-2.0
12,699
function Get-Role { <# .SYNOPSIS Retrieves one or more entities from the Role entity set. .DESCRIPTION Retrieves one or more entities from the Role entity set. You can retrieve one ore more entities from the entity set by either specifying Id, Name or RoleType. .INPUTS The Cmdlet can either return all available e...
dfensgmbh/biz.dfch.PS.Appclusive.Client
src/Get-Role.ps1
PowerShell
apache-2.0
10,027
$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 = '664243ff3fea25fbc38736a0fdfad910b81d1e2db25d919cc0af0c59286e7bf9' $...
dtgm/chocolatey-packages
automatic/_output/firefox-nightly/53.0.1.2016122914/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
1,134
$settingsFile = "$($env:APPDATA)\Notepad++\themes\MyObsidian.xml" $packageFile = "$PSScriptRoot\MyObsidian.xml" if (Test-Path $packageFile) { Remove-Item -Path $packageFile -Force } Copy-Item -Path $settingsFile -Destination $packageFile
dcjulian29/choco-packages
mysettings-notepadplusplus/tools/updateStyle.ps1
PowerShell
apache-2.0
244
import-module au $releases = 'https://www.telerik.com/download/fiddler' function global:au_SearchReplace { @{ ".\tools\chocolateyInstall.ps1" = @{ "(?i)(^\s*url\s*=\s*)('.*')" = "`$1'$($Latest.URL32)'" "(?i)(^\s*checksum\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'" ...
lennartb-/chocolatey-coreteampackages
automatic/fiddler4/update.ps1
PowerShell
apache-2.0
663
function Add-Include { <# .SYNOPSIS Adds the transform function "AWS::Include" to a Vaporshell template .DESCRIPTION You can use the AWS::Include transform to work with template snippets that are stored separately from the main AWS CloudFormation template. When you specify Name: 'AWS::I...
scrthq/Vaporshell
VaporShell/Public/Transform/Add-Include.ps1
PowerShell
apache-2.0
4,663
function Get-WmiEventConsumer { [CmdletBinding()] Param( #region CommonParameters [Parameter(ParameterSetName = 'ByComputerName')] [ValidateNotNullOrEmpty()] [string[]] $ComputerName = 'localhost', [Parameter(ParameterSetName = 'ByComputerName')] [Manag...
Invoke-IR/WmiEvent
Cmdlets/Get-WmiEventConsumer.ps1
PowerShell
bsd-3-clause
2,046
Register-DbaConfigValidation -Name "timespan" -ScriptBlock { Param ( $Value ) $Result = New-Object PSObject -Property @{ Success = $True Value = $null Message = "" } try { [timespan]$timespan = $Value } catch { $Result.Message = "Not a Timespan: $Valu...
SirCaptainMitch/dbatools
internal/configurations/validation/timespan.ps1
PowerShell
mit
439
# Localized resources for DSC_DnsConnectionSuffix ConvertFrom-StringData @' PropertyMismatch = Property '{0}' does NOT match. Expected '{1}', actual '{2}'. CheckingConnectionSuffix = Checking connection suffix matches '{0}'. ResourceInDesiredState = Resource is in the desired state. Resour...
PowerShell/xNetworking
source/DSCResources/DSC_DnsConnectionSuffix/en-US/DSC_DnsConnectionSuffix.strings.psd1
PowerShell
mit
552
param( [Parameter(Mandatory=$true)] [string] $repoUrl, [Parameter(Mandatory=$true)] [string] $repoKey ) $NUGET_EXE_URL = 'https://dist.nuget.org/win-x86-commandline/v3.4.4/NuGet.exe' Invoke-WebRequest -Uri $NUGET_EXE_URL -OutFile NuGet.exe $nugetPackages = Get-ChildItem -Recurse | Where { $_.P...
ChocoPacker/ChocoPacker.SevenZip
publishNuGet.ps1
PowerShell
mit
680
#!/usr/bin/env pwsh Set-StrictMode -Version Latest Set-Location (Split-Path $PSScriptRoot) tool/clean.ps1 npm publish --registry=https://registry.npmjs.org
cedx/gulp-david
tool/publish.ps1
PowerShell
mit
157
function Check-Output { param( [bool]$success ) if (!$success) { $host.SetShouldExit(-1) Exit -1 } } # unify environment variable for Azure DevOps and AppVeyor if (Test-Path env:APPVEYOR) { $env:APPVEYOR = "true" } if ($env:TASK -eq "r-package") { & $env:BUILD_SOURCESDIRECTORY\.ci\test_r_package_win...
henry0312/LightGBM
.ci/test_windows.ps1
PowerShell
mit
5,677
$script:dscModuleName = 'ComputerManagementDsc' $script:dscResourceName = 'DSC_PendingReboot' 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.' } $...
PlagueHO/xComputerManagement
tests/Integration/DSC_PendingReboot.Tests.ps1
PowerShell
mit
6,928
Function GetUsingVariablesV2 { Param ([scriptblock]$ScriptBlock) $errors = [System.Management.Automation.PSParseError[]] @() $Results = [Management.Automation.PsParser]::Tokenize($ScriptBlock.tostring(), [ref] $errors) $Results | Where-Object { $_.Content -match '^Using:' -AND $_.Type -eq 'Varia...
codykonior/PoshRSJob
PoshRSJob/Private/GetUsingVariablesV2.ps1
PowerShell
mit
332
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
zhreshold/mxnet
ci/windows/test_py3_cpu.ps1
PowerShell
apache-2.0
3,015
Describe "Tests conversion of deserialized types to original type using object properties." -Tags "CI" { BeforeAll { # Create new types and test functions. $type1,$type2,$type3,$type4 = Add-Type -PassThru -TypeDefinition @' public class test1 { public string name; ...
KarolKaczmarek/PowerShell
test/powershell/Language/Scripting/DeserializedTypeConversion.Tests.ps1
PowerShell
mit
8,513
<# Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See License.txt in the project root for license information. Code generated by Microsoft (R) PSSwagger Changes may cause incorrect behavior and will be lost if the code is regenerated. #> <# .SYNOPSIS Create a new compute...
AzureAutomationTeam/azure-powershell
src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/New-AzsComputeQuota.ps1
PowerShell
apache-2.0
5,771
Describe "Get-Host DRT Unit Tests" -Tags "CI" { It "Should works proper with get-host" { $results = Get-Host $results | Should Be $Host $results.GetType().Name | Should Be InternalHost } } Describe "Get-Host" -Tags "CI" { It "Should return a type of InternalHost for Get-Host cmdlet...
bingbing8/PowerShell
test/powershell/Modules/Microsoft.PowerShell.Utility/Get-Host.Tests.ps1
PowerShell
mit
495
# ---------------------------------------------------------------------------------- # # 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/...
enavro/azure-powershell
src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/RoleAssignmentTests.ps1
PowerShell
apache-2.0
10,296
# ## File: workflowmailer.ps1 ## Purpose: sends an email while a workflow is running param([string]$destemail = $null,[string]$mailserver = $null,[string]$fromaddr = $null) # This is here in case we need to log # $VerbosePreference = "Continue" # $LogPath = "C:\program files\actifio\scripts\ps.log" # Start-Transcri...
Actifio/powershell
workflow_email_notifications/mail.ps1
PowerShell
mit
2,325
[CmdletBinding(SupportsShouldProcess=$true)] param ( [parameter(Mandatory=$true)] [ValidateScript({ (.\Test-RemoteGitRepository -RemoteRepositoryAddress $_) -eq $true })] [string]$RemoteRepositoryAddress, [parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string]$ReleaseName, [parameter(Mandatory=$true)]...
nexocentric/posh-github-deployment-automator
Install-LatestRelease.ps1
PowerShell
mit
1,921
# # OEML - REST API # This section will provide necessary information about the `CoinAPI OEML REST API` protocol. <br/> This API is also available in the Postman application: <a href=""https://postman.coinapi.io/"" target=""_blank"">https://postman.coinapi.io/</a> <br/><br/> Implemented Standards: * [HTTP1.0](h...
coinapi/coinapi-sdk
oeml-sdk/powershell/src/PSOpenAPITools/Private/Out-DebugParameter.ps1
PowerShell
mit
1,493
choco install -y vagrant -version 1.9.1
SharePointOscar/packer-windows
hyperv/scripts/install-vagrant.ps1
PowerShell
mit
40
<# Notes: Authors: Jason Helmick and Melissa (Missy) Januszko The bulk of this DC, DHCP, ADCS config is authored by Melissa (Missy) Januszko and Jason Helmick. Currently on her public DSC hub located here: https://github.com/majst32/DSC_public.git Additional contributors of note: Jeff Hicks Disclaimer This...
jdhitsolutions/PS-AutoLab-Env
Configurations/TEST-SingleDC/VMConfigurationData.psd1
PowerShell
mit
9,692
<# .EXAMPLE This example shows how to deploy a Business Connectivity Services application to the local SharePoint farm. #> Configuration Example { param( [Parameter(Mandatory = $true)] [PSCredential] $SetupAccount ) Import-DscResource -ModuleN...
ykuijs/xSharePoint
Modules/SharePointDsc/Examples/Resources/SPBCSServiceApp/1-CreateServiceApp.ps1
PowerShell
mit
760
$projects = @( "./src/AspNetSeo/AspNetSeo.csproj", "./src/AspNetSeo.CoreMvc/AspNetSeo.CoreMvc.csproj") dotnet restore "./AspNetSeo.sln" dotnet build "./AspNetSeo.sln" -c Release --no-restore foreach ($project in $projects) { dotnet pack $project --no-build --no-restore -c Release --output '../..' }
sebnilsson/AspNetSeo
MyGet.ps1
PowerShell
mit
313
# HstWB Installer Setup # --------------------- # # Author: Henrik Noerfjand Stengaard # Date: 2022-01-03 # # A powershell script to setup HstWB Installer run for an Amiga HDF file installation. Using module .\modules\packages.psm1 Param( [Parameter(Mandatory=$false)] [string]$settingsDir ) Impo...
henrikstengaard/hstwb-installer
setup.ps1
PowerShell
mit
62,455
<#PSScriptInfo .VERSION 1.0.0 .GUID a36423e1-e828-4079-a0d7-91d7069ee80f .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/WinsServerAddress/2-WinsServerAddress_PrimaryAndSecondary_Config.ps1
PowerShell
mit
968
$newVersion = "4.0.0-beta3" $versionPattern = "(<version)>((\d\.\d\.\d)-(alpha|beta)(\d))(</version>)" $dependencyPattern = "(<dependency\s+id=`"MvvmCross[^`"]+`"\s+version=)`"(\d\.\d\.\d-(alpha|beta)\d)(`"\s*/>)" $files = Get-ChildItem ".\" -Filter *.nuspec for($i=0; $i -lt $files.Count; $i++) { $content = Get-...
MatthewSannes/MvvmCross-Plugins
nuspec/update-nuspec-versions.ps1
PowerShell
mit
647
Install-Module xHyper-V,xDismFeature -Force Configuration testbox { Import-DscResource -module xHyper-V, xDismFeature Node localhost { xDismFeature HyperV { Ensure = 'Present' Name = 'Microsoft-Hyper-V-All' } xDismFeature HyperVPSModule ...
mgreenegit/NanoVHD
NanoVMConfig.ps1
PowerShell
mit
1,861
Function New-TfsGlobalList { Param ( [Parameter(Mandatory=$true)] [string] $Name, [Parameter(Mandatory=$true)] [string[]] $Items, [Parameter()] [switch] $Force, [Parameter()] [object] $Collection ) ...
GersonDias/tfscmdlets
TfsCmdlets/TfsCmdlets/GlobalList/New-TfsGlobalList.ps1
PowerShell
mit
1,576
# # 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, software # distributed under ...
duckback00/dxapikit
API_Powershell/jetstream_container_refresh.ps1
PowerShell
apache-2.0
8,298
# Trigger LCM pull using the CIM Method. function TriggerLCMByCallingCimMethod { param([ValidateSet(1,2,3)] [system.uint32]$flag = 1) Invoke-CimMethod -Namespace root/microsoft/windows/desiredstateconfiguration -class MSFT_DSCLocalConfigurationManager -name PerformRequiredConfigurationChecks -arg...
cyberious/puppetlabs-dsc
lib/puppet_x/dsc_resources/xSafeHarbor/ConfigurationData/VMData/ConfigureFSVM.ps1
PowerShell
apache-2.0
389
# Copyright 2017 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
DinoChiesa/Edge-Powershell-Admin
PSApigeeEdge/Public/UnDeploy-EdgeSharedFlow.ps1
PowerShell
apache-2.0
1,712
$packageName = 'whoistd.install' $packageSearch = 'Nirsoft whoistd' $installerType = 'exe' $silentArgs = '/S' $validExitCodes = @(0) Get-ItemProperty -Path @( 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\...
dtgm/chocolatey-packages
automatic/_output/whoistd.install/2.28/tools/chocolateyUninstall.ps1
PowerShell
apache-2.0
915
$packageName = '{{PackageName}}' $url = '{{DownloadUrl}}' $checksum = '{{Checksum}}' $checksumType = 'sha256' $url64 = "$url" $checksum64 = "$checksum" $checksumType64 = "$checksumType" $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" Install-ChocolateyZipPackage -PackageName "$packageName" ` ...
dtgm/chocolatey-packages
automatic/pyexiftoolgui/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
999
$os = [Environment]::OSVersion.VersionString if ($os.StartsWith("Unix")) { dotnet restore src/HtmlGenerator/HtmlGenerator.csproj dotnet build src/HtmlGenerator/HtmlGenerator.csproj -o $PWD/bin --no-restore --no-dependencies --force $agent="transport=dt_socket,server=y,address=127.0.0.1:55555" ...
akrisiun/SourceBrowser
dotnet-build.ps1
PowerShell
apache-2.0
625
$packageName = 'truecrypt' $regSearch = 'TrueCrypt' $installerType = 'exe' $silentArgs = '/u' $validExitCodes = @(0) Get-ItemProperty -Path @( 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*', ...
maharishi/chocolatey-packages
automatic/_output/truecrypt/7.1.20150620/tools/chocolateyUninstall.ps1
PowerShell
apache-2.0
898
<# This script install all the chocolatey packages and configure them. #> Import-Module (Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) 'Provisioning.psm1') -Force $chocolatey = "$env:ChocolateyInstall\bin\choco.exe" -f $env:SystemDrive $nodePath = "C:\Program Files (x86)\nodejs" $nodeVersion = "6.9.1"...
minogian/windows
provisioning/Chocolatey.ps1
PowerShell
bsd-3-clause
1,212
function Get-DbaRepDistributor { <# .SYNOPSIS Gets the information about a replication distributor for a given SQL Server instance. .DESCRIPTION This function locates and enumerates distributor information for a given SQL Server instance. .PARAMETER SqlInstance The target SQL S...
Splaxi/dbatools
functions/Get-DbaRepDistributor.ps1
PowerShell
mit
3,852
param($installPath, $toolsPath, $package, $project) $exists = Get-ItemProperty "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" | where {$_.DisplayVersion -match "14.2.3"} | select DisplayName if (-Not $exists) { throw "We have determined that you haven't installed the proper version of De...
donwibier/DXCloudProviders
DXCloudProviders.Services.DropBox/Install.ps1
PowerShell
mit
369
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. Describe 'OutputRendering tests' { BeforeEach { if ($null -ne $PSStyle) { $oldOutputRendering = $PSStyle.OutputRendering } } AfterEach { if ($null -ne $PSStyle) { $PSStyle.OutputRenderi...
daxian-dbw/PowerShell
test/powershell/engine/Formatting/OutputRendering.Tests.ps1
PowerShell
mit
3,221
$CommandName = $MyInvocation.MyCommand.Name.Replace(".Tests.ps1", "") Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan . "$PSScriptRoot\constants.ps1" Describe "$CommandName Unit Tests" -Tags 'UnitTests' { Context "Validate parameters" { <# The $paramCount is adjusted based on...
sqlpadawan/dbatools
tests/Get-DbaDbRole.Tests.ps1
PowerShell
mit
2,452