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 |
|---|---|---|---|---|---|
# load up the global.json so we can find the DNX version
$globalJson = Get-Content -Path $PSScriptRoot\global.json -Raw -ErrorAction Ignore | ConvertFrom-Json -ErrorAction Ignore
if($globalJson) {
$dnxVersion = $globalJson.sdk.version
} else {
Write-Warning "Unable to locate global.json to determine using '1.0... | ChristopherHaws/Lucene.Net.FluentApi | RunTests.ps1 | PowerShell | apache-2.0 | 460 |
[cmdletbinding()]
param()
function Get-ScriptDirectory
{
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
Split-Path $Invocation.MyCommand.Path
}
$scriptDir = ((Get-ScriptDirectory) + "\")
function Ensure-PathExists{
param([Parameter(Position=0)][System.IO.DirectoryInfo]$path)
process{
... | ligershark/pecan-waffle | tests/z.install.tests.ps1 | PowerShell | apache-2.0 | 972 |
<#
.SYNOPSIS
Get the DNS zone aging settings.
.PARAMETER Name
Name of the DNS forward or reverse loookup zone.
.PARAMETER Enabled
Option to enable scavenge stale resource records on the zone.
#>
function Get-TargetResource
{
[CmdletBinding()]
[OutputType([System.Collection... | puppetlabs/puppetlabs-dsc | lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerZoneAging/MSFT_xDnsServerZoneAging.psm1 | PowerShell | apache-2.0 | 5,371 |
import-module $PSScriptRoot/WSL-K8S.psm1
invoke-kubectl get csr --sort-by='{.metadata.creationTimestamp}'
Write-Warning "
==> Approve csr by EXEC:
$ Import-Module ./wsl2/bin/WSL-K8S.psm1
$ invoke-kubectl certificate approve <CSR_NAME(csr-xxxxx)>
"
| khs1994-docker/lnmp | kubernetes/wsl2/bin/kubectl-get-csr.ps1 | PowerShell | apache-2.0 | 250 |
# Powershell script for running the vktrace trace/replay auto test
# To run this test:
# cd <this-dir>
# powershell C:\src\LoaderAndValidationLayers\vktracereplay.ps1 [-Debug]
$exitstatus = 0
if ($args[0] -eq "-Debug") {
$dPath = "Debug"
} else {
$dPath = "Release"
}
write-host -background b... | sashinde/VulkanTools | tests/_vktracereplay.ps1 | PowerShell | apache-2.0 | 4,256 |
[CmdletBinding(PositionalBinding=$false)]
param (
[switch]$test64 = $false,
[switch]$testDeterminism = $false,
[switch]$testBuildCorrectness = $false,
[switch]$testPerfCorrectness = $false,
[switch]$testPerfRun = $false,
[switch]$testVsi = $false,
[switch]$testVsiNetCore = $false,
[switc... | akrisiun/roslyn | build/scripts/cibuild.ps1 | PowerShell | apache-2.0 | 8,052 |
#requires -Version 3.0
#region Info
<#
Support: https://github.com/jhochwald/NETX/issues
#>
#endregion Info
#region License
<#
Copyright (c) 2016, Quality Software Ltd.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the fol... | jhochwald/NETX | Profile/functions/FirewallExceptionTools.ps1 | PowerShell | bsd-3-clause | 14,344 |
param([string]$apiKey="", [string]$outputDirectory="..\..\vowpalwabbit\x64\Release")
$version = Get-Content version.txt
..\..\vowpalwabbit\packages\gitlink.2.2.0\lib\net45\GitLink.exe ..\.. -f vowpalwabbit\vw.sln -p x64 -c Release -d ..\..\vowpalwabbit\x64\Release
..\..\vowpalwabbit\.nuget\nuget pack cs.nuspec -Versi... | digitalreasoning/vowpal_wabbit | cs/nuget/CreateNuGet.ps1 | PowerShell | bsd-3-clause | 972 |
# Usage: concfg help <command>
# Summary: Show help for a command
param($cmd)
. "$psscriptroot\..\lib\core.ps1"
. "$psscriptroot\..\lib\commands.ps1"
. "$psscriptroot\..\lib\help.ps1"
function print_help($cmd) {
$file = gc ("$psscriptroot\$cmd.ps1") -raw
$usage = usage $file
$summary = summary $file
$help = help... | stanleystl/concfg | libexec/help.ps1 | PowerShell | mit | 1,001 |
docker run `
-e USER=$env:USERNAME `
-e CLOUDSTACK_API_KEY=$env:CLOUDSTACK_API_KEY `
-e CLOUDSTACK_SECRET_KEY=$env:CLOUDSTACK_SECRET_KEY `
-e CLOUDSTACK_HOST=$env:CLOUDSTACK_HOST `
-e ZONE_NAME=$env:ZONE_NAME `
-e SERVICE_OFFERING_NAME=$env:SERVICE_OFFERING_NAME `
-e VPC_PUBLIC_IP=$env:VPC_PUBLIC_IP `
-e VPC_TIER_NAME=... | MissionCriticalCloud/vagrant-cloudstack | Docker/vac.ps1 | PowerShell | mit | 1,248 |
Data LocalizedData
{
# culture="en-US"e
ConvertFrom-StringData @'
GettingHotfixMessage=Getting the hotfix patch with ID {0}.
ValidatingPathUri=Validating path/URI.
ErrorPathUriSpecifiedTogether=Hotfix path and Uri parameters cannot be specified together.
ErrorInvalidFilePathMsu=F... | robotechredmond/301-gpfs-s2d-md | dsc/prep-s2d.ps1/xWindowsUpdate/DscResources/MSFT_xWindowsUpdate/MSFT_xWindowsUpdate.psm1 | PowerShell | mit | 14,112 |
<#
.SYNOPSIS
This is a Powershell script to bootstrap a Cake build.
.DESCRIPTION
This Powershell script will download NuGet if missing, restore NuGet tools (including Cake)
and execute your Cake build script with the parameters you provide.
.PARAMETER Target
The build script target to run.
.PARAMETER Configuration
The ... | nunit/nunit.xamarin | build.ps1 | PowerShell | mit | 4,605 |
$packageName = 'stunnel'
$packageVersion = '5.07'
$packageSearch = $packageName + "*"
$silentArgs = '/S'
$validExitCodes = @(0)
try {
$unFile = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like $packageSearch -and ($_.Version -eq $packageVersion) }
#$uninstallResults = $uninstallPackage.Uninstall()
... | dtgm/chocolatey-packages | automatic/_output/stunnel/5.07/tools/chocolateyUninstall.ps1 | PowerShell | apache-2.0 | 562 |
<#
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 | functions/Miscellaneous/Assert-PSRemoting.ps1 | PowerShell | apache-2.0 | 1,318 |
Import-Module PSScriptAnalyzer
Set-Alias ctss ConvertTo-SecureString
$clearHostMessage = "File 'AvoidUsingClearHostWriteHost.ps1' uses Clear-Host. This is not recommended because it may not work in some hosts or there may even be no hosts at all."
$clearHostName = "PSAvoidUsingClearHost"
$directory = Split-Path -Paren... | daviwil/PSScriptAnalyzer | Tests/DisabledRules/AvoidUsingClearHost.tests.ps1 | PowerShell | mit | 1,075 |
Register-DbatoolsConfigValidation -Name "bool" -ScriptBlock {
param (
$Value
)
$Result = New-Object PSObject -Property @{
Success = $True
Value = $null
Message = ""
}
try {
if ($Value.GetType().FullName -ne "System.Boolean") {
$Result.Message = ... | dsolodow/dbatools | internal/configurations/validation/bool.ps1 | PowerShell | mit | 593 |
param([Parameter(mandatory=$true)][string] $MinGWPath)
#SCRIPT CONSTANTS
$pwd = Get-Location
$REPO_LOCATION = "$pwd\opencv"
$OPENCV_VERSION_TAG = "3.4.0"
$COMPILER = "mingw"
$CMAKE_CONFIG_GENERATOR = "MinGW Makefiles"
$OPENCV_BUILD_DIR = "$pwd\artifacts\$COMPILER\build\opencv";
$OPENCV_DIR = "$pwd\artifacts\$COMPILER\i... | nebgnahz/cv-rs | .windows/mingw_build_OCV.ps1 | PowerShell | mit | 2,516 |
<#PSScriptInfo
.VERSION 1.0.0
.GUID 80d306fa-8bd4-4a8d-9f7a-bf40df95e661
.AUTHOR DSC Community
.COMPANYNAME DSC Community
.COPYRIGHT DSC Community contributors. All rights reserved.
.TAGS
.LICENSEURI https://github.com/dsccommunity/SharePointDsc/blob/master/LICENSE
.PROJECTURI https://github.com/dsccommunity/S... | PowerShell/xSharePoint | SharePointDsc/Examples/Resources/SPWebAppAuthentication/2-KerberosExample.ps1 | PowerShell | mit | 1,635 |
function Get-DbaSuspectPage {
<#
.SYNOPSIS
Returns data that is stored in SQL for Suspect Pages on the specified SQL Server Instance
.DESCRIPTION
This function returns any records that were stored due to suspect pages in databases on a SQL Server Instance.
.PARAMETER SqlInstance
... | alevyinroc/dbatools | functions/Get-DbaSuspectPage.ps1 | PowerShell | mit | 3,986 |
param (
# The path to the source directory. Default $Env:BUILD_SOURCESDIRECTORY is set by TFS.
[Parameter(Mandatory=$false, Position=0)]
[ValidateNotNullOrEmpty()]
[string]$SourceDirectory = $Env:BUILD_SOURCESDIRECTORY,
# The build number. Default $Env:BUILD_BUILDNUMBER is set by TFS and must be c... | SkillsFundingAgency/vacancy-register-api | build/powershell/Set-AssemblyVersion.ps1 | PowerShell | mit | 1,498 |
git clone git@github.com:daptiv/Daptiv.Services.ResourceManagement C:/src/Daptiv.Services.ResourceManagement
cd C:/src/Daptiv.Services.ResourceManagement
bundle install
bundle exec rake
chef-client -j rm.json -o "daptiv_services_resourcemanagement::default,minitest-handler"
| hernandezgustavo/boxenTest | modules/daptiv/files/windows-init/vm-scripts/setup-rm.ps1 | PowerShell | mit | 275 |
[CmdletBinding()]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")]
param
(
[Parameter()]
[string]
$SharePointCmdletModule = (Join-Path -Path $PSScriptRoot `
-ChildPath "..\Stubs\SharePoint\15.0.4805.1000\Microsoft.SharePoint.PowerShell.psm... | PowerShell/xSharePoint | tests/Unit/SharePointDsc/SharePointDsc.SPDistributedCacheService.Tests.ps1 | PowerShell | mit | 35,072 |
. '.\inc\Config.ps1'
. '.\inc\Params.ps1'
. '.\inc\Functions.ps1'
# Main Program
MountWim $wim_file $mount_dir $wim_image_name
AddTools $tools_dir $mount_dir
# Commit only on successful update
if ($lastexitcode -ne 0)
{
Write-Host "Errors found, NOT committing any changes"
UnmountWim $mount_dir "n"
Write-Error ... | kireevco/wimaging | Add-Tools.ps1 | PowerShell | mit | 429 |
function New-VsResultObject {
[CmdletBinding()]
Param (
[Parameter(Mandatory=$True,Position=0)]
[ValidateSet("clioutput","parser")]
[string]$AppType,
[Parameter(Mandatory=$True,Position=1)]
[array]$Results,
[Parameter(Mandatory=$False,Position=2)]
... | LockstepGroup/VigilantSpoon | src/powershell/cmdlets/New-VsResultObject.ps1 | PowerShell | mit | 602 |
function Stop-PseudoService
{
[CmdletBinding(SupportsShouldProcess=$true)]
param (
[ValidateNotNullOrEmpty()]
[parameter(Mandatory=$true)]
[ValidateScript({((Test-PseudoService -Name $_) -eq $true) -and (Test-PseudoServiceRegistrantIsAdministrator)})]
[string]$PseudoServiceName
)
Stop-ScheduledTask -TaskN... | nexocentric/posh-pseudo-service-management | functions/Stop-PseudoService.ps1 | PowerShell | mit | 532 |
Function Send-ExceptionNotifications
{
[CmdletBinding()]
Param(
[hashtable]$PoShMonConfiguration,
[System.Exception]$Exception,
[ValidateSet("Monitoring", "Repairing")]
[string]$Action = "Monitoring"
)
$bodyAction = if ($Action -eq "Monitoring") { "monitor" } ... | HiltonGiesenow/PoShMon | src/Functions/PoShMon.Notifications.Core/Send-ExceptionNotifications.ps1 | PowerShell | mit | 1,949 |
function GetItemsFromRabbitMQApi
{
[CmdletBinding()]
Param
(
[parameter(Mandatory=$true, Position = 0)]
[alias("ComputerName", "cn")]
[string]$BaseUri = $defaultComputerName,
[parameter(Mandatory=$true, Position = 1)]
[PSCredential]$cred = $defaultCredentials,
... | Jakauppila/RabbitMQTools | Private/GetItemsFromRabbitMQApi.ps1 | PowerShell | mit | 730 |
function Set-RSHost {
<#
.SYNOPSIS
Update a host object on RedSeal
.PARAMETER HostObject
Host object to update. May be an array of hosts.
.PARAMETER XML
Display generated XML, but do not post
.INPUTS
Full host object.
.OUTPUTS
One result object.
#>
[c... | SCH-CISM/RedSeal | PSRedSeal/public/Set-RSHost.ps1 | PowerShell | mit | 4,662 |
Describe $($PSCommandPath -Replace '.Tests.ps1') {
BeforeAll {
#Get Current Directory
$Here = Split-Path -Parent $PSCommandPath
#Assume ModuleName from Repository Root folder
$ModuleName = Split-Path (Split-Path $Here -Parent) -Leaf
#Resolve Path to Module Directory
$ModulePath = Resolve-Path "$Here\..\... | pspete/psPAS | Tests/New-PASSession.Tests.ps1 | PowerShell | mit | 23,196 |
[CmdletBinding()]
param(
[Parameter()]
[string]
$ResourceGroupName,
[Parameter(Mandatory)]
[string]
$SubscriptionId,
[Parameter(Mandatory)]
[string]
$TenantId,
[Parameter(Mandatory)]
[string]
$ClientId,
[Parameter(Mandatory)]
[string]
$ClientSecret,
... | powershellorguk/SouthCoast | Meetups/2019/November/code/RealDeployment/modules/Storage_CDN/Scripts/Update-StorageCORS.ps1 | PowerShell | mit | 1,990 |
@{
# Script module or binary module file associated with this manifest.
RootModule = 'PSPushBullet'
# Version number of this module.
ModuleVersion = '0.2.1'
# ID used to uniquely identify this module
GUID = 'a60db87a-478f-479e-958a-156b6cdbf0c0'
# Author of this module
Author = 'Scott Evtuch'
# Compa... | ScottEvtuch/PSPushBullet | PSPushBullet.psd1 | PowerShell | mit | 3,472 |
Function Get-Office365Roadmap {
<#
.Synopsis
Get-Office365Roadmap
.DESCRIPTION
Get-Office365Roadmap retrieves Office 365 information
.EXAMPLE
Get-Office365Roadmap
Retrieves the complete Office 365 roadmap information
.EXAMPLE
Get-Office365Roadmap -Stats
Count Name
----- ---- ... | alexverboon/posh | Office365/roadmap/get-office365roadmap.ps1 | PowerShell | mit | 1,028 |
##############################################################################
##
## New-ZipFile
##
## From Windows PowerShell Cookbook (O'Reilly)
## by Lee Holmes (http://www.leeholmes.com/guide)
##
##############################################################################
<#
.SYNOPSIS
Create a Zip file from an... | canadix/ch.canadix.PS.Scriplets | src/PowerShellCookbookModule/New-ZipFile.ps1 | PowerShell | apache-2.0 | 2,196 |
param ($numerator = 1, $denominator = 2)
Write-Verbose "Divide: Numerator=$numerator, Denominator=$denominator"
$sum = $numerator + $denominator
Write-Verbose "#PSTEST# Sum=$sum"
Write-Verbose 'after'
$divide = $numerator / $denominator
@{
Sum=$sum
Divide=$divide
} | padisetty/PSModules | PSTest/SampleTest/Add and Divide.ps1 | PowerShell | apache-2.0 | 280 |
# The authentication key (API Key).
# Get your own by registering at https://app.pdf.co
$API_KEY = "***********************************"
# Input url file
$InputUrl = "https://www.wikipedia.org"
# Result file name
$ResultFile = ".\result.png"
$resultFileName = [System.IO.Path]::GetFileName($ResultFile)
$query = "htt... | bytescout/ByteScout-SDK-SourceCode | PDF.co Web API/Render Url As Png/PowerShell/Render Url To Png/RenderUrlToPng.ps1 | PowerShell | apache-2.0 | 1,282 |
<#
DESCRIPTION:
Check services and ensure all services set to start automatically are running (NetBackup Bare Metal Restore Boot Server,
NetBackup SAN Client Fibre Transport Service and .NET4.0 are all expected to be Automatic but not running).
REQUIRED-INPUTS:
IgnoreTheseServices - L... | My-Random-Thoughts/Server-QA-Checks | checks/system/c-sys-03-services-not-started.ps1 | PowerShell | apache-2.0 | 2,993 |
function Add-VSDataPipelinePipelinePipelineTag {
<#
.SYNOPSIS
Adds an AWS::DataPipeline::Pipeline.PipelineTag resource property to the template. A list of arbitrary tags (key-value pairs to associate with the pipeline, which you can use to control permissions. For more information, see Controlling Acces... | scrthq/Vaporshell | VaporShell/Public/Resource Property Types/Add-VSDataPipelinePipelinePipelineTag.ps1 | PowerShell | apache-2.0 | 3,855 |
# Helper script for those who want to run psake without importing the module.
# Example run from PowerShell:
# .\psake.ps1 "default.ps1" "BuildHelloWord" "4.0"
# Must match parameter definitions for psake.psm1/invoke-psake
# otherwise named parameter binding fails
param(
[Parameter(Position=0,Mandatory=0)... | jdaigle/FriendsOfDT | psake.ps1 | PowerShell | mit | 1,880 |
function WaitForSuccess([ScriptBlock] $script, [int]$seconds = 10,
[string]$description = 'operation to complete')
{
$skip = $false
Write-Host "Waiting up to $($seconds)s for $description..."
$result = 0..($seconds * 2) |
% {
if ($skip) { return $true }
$status = &$script
if ($sta... | Iristyle/ChocolateyPackages | core/WaitForSuccess.ps1 | PowerShell | mit | 541 |
$ErrorActionPreference = 'STOP'
$packageArgs = @{
packageName = 'absolute-uninstaller'
url = 'https://download.glarysoft.com/ausetup.exe'
fileType = 'exe'
softwareName = 'Absolute Uninstaller*'
checksum = 'b5216b701f2a3c4a3d89a7d66cd56879e8f50aa0e38f6101c394fead3f0c18d5'
checks... | jberezanski/chocolatey-coreteampackages | automatic/absolute-uninstaller/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 585 |
@{
Gallery = 'PSGallery'
AllowPrerelease = $false
WithYAML = $true # Will also bootstrap PowerShell-Yaml to read other config files
}
| mgreenegit/UpdateServicesDsc | Resolve-Dependency.psd1 | PowerShell | mit | 153 |
<# 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 | Standalone/POC-MultiRole/VMConfigurationData.psd1 | PowerShell | mit | 9,647 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
Describe "Test trap" -Tags "CI" {
Context "Trap with flow control" {
It "Line after exception should NOT be continued when it's from a nested script block" {
$a = . {trap {"trapped"; continue;}; . {"he... | Cowmonaut/PowerShell | test/powershell/Language/Scripting/Trap.Tests.ps1 | PowerShell | mit | 1,464 |
$packageName = 'adrestore'
$url = 'https://download.sysinternals.com/files/ADRestore.zip'
$checksum = '72c06392a989656e467e8ec0e22375f1392d5689'
$checksumType = 'sha1'
$url64 = "$url"
$checksum64 = "$checksum"
$checksumType64 = "checksumType"
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
Instal... | dtgm/chocolatey-packages | automatic/_output/adrestore/1.10/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 1,180 |
# Export functions that start with capital letter, others are private
# Include file names that start with capital letters, ignore others
$ScriptRoot = Split-Path $MyInvocation.MyCommand.Definition
$pre = Get-ChildItem Function:\*
Get-ChildItem "$ScriptRoot\*.ps1" | Where-Object { $_.Name -cmatch '^[A-Z]+' } | ForEach... | jberezanski/chocolatey-coreteampackages | extensions/chocolatey-vscode.extension/extensions/chocolatey-vscode.psm1 | PowerShell | apache-2.0 | 603 |
# ----------------------------------------------------------------------------------
#
# 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/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup.Test/ScenarioTests/IaasVm/PolicyTests.ps1 | PowerShell | apache-2.0 | 2,673 |
# ----------------------------------------------------------------------------------
#
# 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/... | antonba/azure-sdk-tools | WindowsAzurePowershell/src/Management.SqlDatabase.Test/TestScripts/Database/CreateAndGetDatabase.ps1 | PowerShell | apache-2.0 | 4,286 |
#*********************************************************
#
# Copyright (c) Microsoft. All rights reserved.
# THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
# ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
# IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
# PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
#
#*****... | williamsrz/Windows-universal-samples | websocket/cs/server/setupserver.ps1 | PowerShell | mit | 3,762 |
Import-Module PwdMaker -Force
Describe "Get-NumericContent" {
Context "When content is returned" {
$results = Get-NumericContent
foreach ($number in "0123456789".ToCharArray())
{
It "Contains the number `'$number`'" {
$results -ccontains $number | Should Be ... | tjchester/PwdMaker | Tests/Get-NumericContent.Tests.ps1 | PowerShell | mit | 448 |
enum DigestType {
SHA1 = 1 # MANDATORY [RFC3658]
SHA256 = 2 # MANDATORY [RFC4059]
GOST = 3 # OPTIONAL [RFC5933]
SHA384 = 4 # OPTIONAL [RFC6605]
} | indented-automation/Indented.Net.Dns | Indented.Net.Dns/enum/DigestType.ps1 | PowerShell | mit | 191 |
function Set-TVGroup
{
[CmdletBinding(
SupportsShouldProcess = $true
)]
param(
[Parameter(
Mandatory = $true
)]
[string] $Token,
[Parameter(
Mandatory = $true,
ValueFromPipeline = $true,
ParameterSetName = 'ByInputObj... | Marcuzzo/PSTeamViewer | PSTeamViewer/public/Set-TVGroup.ps1 | PowerShell | mit | 2,649 |
# Launcher
# --------
#
# Author: Henrik Noerfjand Stengaard
# Date: 2022-01-16
#
# A powershell script to launch HstWB Installer.
Param(
[Parameter(Mandatory=$false)]
[string]$settingsDir
)
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
Import-Module (Resol... | henrikstengaard/hstwb-installer | launcher.ps1 | PowerShell | mit | 9,110 |
#requires -modules VMware.VimAutomation.Core,VMware.VimAutomation.Storage
Function Get-StoragePolicyFromTag {
[CmdletBinding()]
param (
# VM Name or Object
[Parameter(Mandatory=$False,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True,HelpMessage='VM Name or Object')]
$VM = (... | equelin/vmware-powercli-workflows | Scripts/SPBMFromTag/Functions/Get-StoragePolicyFromTag.ps1 | PowerShell | mit | 3,011 |
<#
.SYNOPSIS
Return object with API connection information to the ConnectWise server.
.PARAMETER Domain
Fully qualify domain name of the ConnectWise (API) server
.PARAMETER CompanyName
ConnectWise company name
.PARAMETER PublicKey
ConnectWise API public key
.PARAMETER PrivateKey
ConnectWise API priv... | sgtoj/PSConnectWise | PSConnectWise/Public/CWSession.ps1 | PowerShell | mit | 2,787 |
Param(
[string]$arch,
[string]$mixinPassword,
[string]$vsoPAT
)
. .\build\tfs\win32\node.ps1
. .\scripts\env.ps1
. .\build\tfs\win32\lib.ps1
# Create a _netrc file to download distro dependencies
# In order to get _netrc to work, we need a HOME variable setup
$env:HOME = $env:USERPROFILE
"machine monacotools.visua... | gagangupt16/vscode | build/tfs/win32/smoketest.ps1 | PowerShell | mit | 1,277 |
#Requires -Version 3.0
<#
.SYNOPSIS
Test ACL from selected source path.
.DESCRIPTION
You can Test ACL information to selected source path.
This is same logic as gACLResource.
.NOTES
Author: guitarrapc
Created: 3/Sep/2014
.EXAMPLE
Test-ValentiaACL -Path c:\Deployment -Account Users -Rights Modify -Ensure Present ... | guitarrapc/valentia | valentia/Functions/Helper/ACL/Test-ValentiaACL.ps1 | PowerShell | mit | 2,578 |
Import-Module ServerManager
Write-Host "Installing MSMQ-Server"
Add-WindowsFeature MSMQ-Server | Out-Null | abix-/powershell-practical | random scripts/vcommander/vC-Install-MSMQ.ps1 | PowerShell | mit | 106 |
@{
# Version number of this module.
moduleVersion = '12.4.0.0'
# ID used to uniquely identify this module
GUID = '693ee082-ed36-45a7-b490-88b07c86b42f'
# Author of this module
Author = 'Microsoft Corporation'
# Company or vendor of this module
CompanyName = 'Microsoft Corporation'
# Copyright stat... | PowerShell/xSQLServer | SqlServerDsc.psd1 | PowerShell | mit | 6,771 |
# Generated by: Tetsuo Miyahara (temiyaha)
#
# Copyright © Microsoft Corporation. All Rights Reserved.
# This code released under the terms of the
# Microsoft Public License (MS-PL, http://opensource.org/licenses/ms-pl.html.)
# Sample Code is provided for the purpose of illustration only and is not intended to be use... | temiyaha/Microsoft.Pfe.SharePointSupportPowerShell | CreateFields/CreateFields.ps1 | PowerShell | mit | 2,976 |
if($scope -eq ''){restart-computer -computername $computername -force -confirm:$false}
else{restart-computer -computername $computername -credential $creds -force -confirm:$false} | micelshima/Deploy | DEPLOY/ScriptRepository/Power Options_Restart Now.ps1 | PowerShell | mit | 180 |
function Get-TargetResource
{
[CmdletBinding()]
[OutputType([System.Collections.Hashtable])]
param
(
[parameter(Mandatory = $true)]
[System.String]
$Name,
[parameter(Mandatory = $true)]
[System.String]
$Zone,
[parameter(Mandatory = $true)]
... | cowofevil/puppetlabs-dsc | lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsARecord/MSFT_xDnsARecord.psm1 | PowerShell | apache-2.0 | 2,717 |
[CmdletBinding(PositionalBinding=$True)]
Param(
[Parameter(Mandatory = $true)]
[String]$ClusterUrl, # required
[Parameter(Mandatory = $true)]
[String]$TopologyName, # required
[Parameter(Mandatory = $true)]
[String]$TopologyAction, ... | hdinsight/hdinsight-storm-examples | scripts/storm/ManageStormTopologyOnClusterLocally.ps1 | PowerShell | apache-2.0 | 3,941 |
$packageName = 'dolphin'
$url = 'https://dl.dolphin-emu.org/builds/dolphin-master-5.0-5146-x64.7z'
$checksum = 'af97230715126850877a53138c7499e98771228cc30ea14eebadfadb33909732'
$checksumType = 'sha256'
$url64 = $url
$checksum64 = $checksum
$checksumType64 = $checksumType
$toolsDir = "$(Split-Path -parent $MyInvocation... | dtgm/chocolatey-packages | automatic/_output/dolphin/5.0.5146/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 788 |
$FlashArray = New-PfaArray -EndPoint 0.0.0.0 -Credentials (Get-Credential) -IgnoreCertificateError
Write-Host "=================================================="
Write-Host "Pure Storage Directory Services Configuration"
Write-Host "=================================================="
Get-PfaDirectoryServiceConfigura... | PureStorage-OpenConnect/powershell-scripts | Get-ADMembers.ps1 | PowerShell | apache-2.0 | 8,187 |
$packageName = 'sumo'
$installerType = 'exe'
$silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-'
$url = 'http://www.kcsoftwares.com/files/sumo_lite.exe'
$checksum = '85028ef75e3600d4f87b125bb0e8ba7fe9b6bc0d517583198a23e0e9e16bb602'
$checksumType = 'sha256'
$validExitCodes = @(0)
$scriptPath = $(Split-Path -p... | dtgm/chocolatey-packages | automatic/_output/sumo/5.1.0.349/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 851 |
$packageName = 'dolphin'
$url = 'http://dl.dolphin-emu.org/builds/dolphin-master-5.0-2051-x64.7z'
$checksum = 'b5b8df34be3c21ea7dfc58cdcadbdf621619ae4018f179ab8fb333ab155e1e07'
$checksumType = 'sha256'
$url64 = $url
$checksum64 = $checksum
$checksumType64 = $checksumType
$toolsDir = "$(Split-Path -parent $MyInvocation... | dtgm/chocolatey-packages | automatic/_output/dolphin/5.0.2051/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 790 |
function New-SourceTree {
[CmdletBinding()]
param (
[string]$companyName,
[string]$productName,
[string]$srcPath = "src",
[string]$artifactsPath = "artifacts",
[string]$toolsPath = "tools",
[string]$bootstrapscript = "run.ps1",
[string]$buildScript = "defa... | dotnetzero/script | src/functions/New-SourceTree.ps1 | PowerShell | mit | 4,125 |
param(
[int]$buildNumber = 0,
[string]$task = "default"
)
if(Test-Path Env:\APPVEYOR_BUILD_NUMBER){
$buildNumber = [int]$Env:APPVEYOR_BUILD_NUMBER
Write-Host "Using APPVEYOR_BUILD_NUMBER"
}
"Build number $buildNumber"
$packageConfigs = Get-ChildItem . -Recurse | where{$_.Name -eq "packages.config"}
foreach($pack... | Jonne/OwinHttpMessageHandler | build.ps1 | PowerShell | mit | 641 |
$platform = 'win32-x64'
. "$PSScriptRoot\..\win32-shared\build.ps1" -platform $platform
| octoblu/gateblu-forever | .installer/win32-x64/build.ps1 | PowerShell | mit | 89 |
# for debugging
# wait until a file has been removed from desktop
$file = "C:\users\vagrant\Desktop\delete-to-continue.txt"
if (-Not (Test-Path $file)) {
Write-Host "Remove me" | Out-File $file
}
Write-Host "Wait until someone removes $file"
while (Test-Path $file) {
Sleep 1
}
Write-Host "Done waiting!"
| SharePointOscar/packer-windows | scripts/wait-for-desktop-file.ps1 | PowerShell | mit | 313 |
function Should-FileContentMatch($ActualValue, $ExpectedContent, [switch] $Negate, $Because) {
<#
.SYNOPSIS
Checks to see if a file contains the specified text.
This search is not case sensitive and uses regular expressions.
.EXAMPLE
Set-Content -Path TestDrive:\file.txt -Value 'I am a file.'
PS C:\>'TestDrive:\fi... | ChrisLGardner/vNextBuild | Extensions/Pester/task/4.6.0/Functions/Assertions/FileContentMatch.ps1 | PowerShell | mit | 12,830 |
Function Test-ServiceNowURL {
<#
.SYNOPSIS
For use in testing ServiceNow Urls.
.DESCRIPTION
For use in testing ServiceNow Urls. The test is a simple regex match in an attempt to validate that users use a 'tenant.domain.com' pattern.
.EXAMPLE
Test-ServiceNowURL -Url tenant.domain.com
... | Sam-Martin/servicenow-powershell | ServiceNow/Private/Test-ServiceNowURL.ps1 | PowerShell | apache-2.0 | 823 |
$packageName = 'electrum.install'
$installerType = 'exe'
$silentArgs = '/S'
$url = 'https://download.electrum.org/electrum-2.2-setup.exe'
$checksum = '0a3aa1fbc9b50a49a582aca4f43415b91ce0f8a1'
$checksumType = 'sha1'
$validExitCodes = @(0)
Install-ChocolateyPackage -PackageName "$packageName" `
... | dtgm/chocolatey-packages | automatic/_output/electrum.install/2.2/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 610 |
$packageName = 'macaddressview'
$url = 'http://www.nirsoft.net/utils/macaddressview.zip'
$checksum = 'b718210afbbec5694f0863f3374ecd7e38f6783c'
$checksumType = 'sha1'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$installFile = Join-Path $toolsDir "$($packageName).exe"
Install-ChocolateyZipPac... | dtgm/chocolatey-packages | automatic/_output/macaddressview/1.30/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 678 |
#
# Get-NestedVirtStatus
#
# Checks a virtualization host and VM for compatibility with Nested Virtualization
#
# Author: Allen Marshall, Theo Thompson
#
# Need to run elevated. Do that here.
#
# Get the ID and security principal of the current user account
$myWindowsID = [System.Security.Principal.WindowsIdentity... | mebersol/Virtualization-Documentation | hyperv-tools/Nested/Get-NestedVirtStatus.ps1 | PowerShell | mit | 11,832 |
function Get-TargetResource
{
[CmdletBinding()]
[OutputType([System.Collections.Hashtable])]
param
(
[parameter(Mandatory = $true)]
[System.String]
$Name,
[parameter(Mandatory = $false)]
[System.String]
$DatabaseServer,
[parameter... | ferventcoder/puppetlabs-dsc | lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPContentDatabase/MSFT_SPContentDatabase.psm1 | PowerShell | apache-2.0 | 12,867 |
Describe "Serialization Tests" -tags "CI" {
BeforeAll {
$testfileName="SerializationTest.txt"
$testPath = Join-Path $TestDrive $testfileName
$testfile = New-Item $testPath -Force
function SerializeAndDeserialize([PSObject]$inputObject)
{
$xmlSerializer = Ne... | bingbing8/PowerShell | test/powershell/enginecore/Serialization.Tests.ps1 | PowerShell | mit | 4,078 |
function Remove-BoxstarterError {
<#
.SYNOPSIS
Removes errors from the error collection that occur within a block.
#>
param([ScriptBlock]$block)
$currentErrorAction=$ErrorActionPreference
$currentErrorCount = $Global:Error.Count
try{
$ErrorActionPreference = "SilentlyContinue"
... | fhchina/boxstarter | BoxStarter.Common/Remove-BoxstarterError.ps1 | PowerShell | apache-2.0 | 543 |
Properties {
$x = 1
}
Task default -Depends RunNested1, RunNested2, CheckX
Task RunNested1 {
Invoke-psake .\nested\nested1.ps1
}
Task RunNested2 {
Invoke-psake .\nested\nested2.ps1
}
Task CheckX{
Assert ($x -eq 1) '$x was not 1'
} | AMCN41R/Harness | tools/build_tools/pSake/specs/nested_builds_should_pass.ps1 | PowerShell | mit | 255 |
#requires -version 2
<#
PowerSploit File: PowerView.ps1
Author: Will Schroeder (@harmj0y)
License: BSD 3-Clause
Required Dependencies: None
#>
########################################################
#
# PSReflect code for Windows API access
# Author: @mattifestation
# https://raw.githubusercontent.com/mattifest... | EmpireProject/Empire | data/module_source/situational_awareness/network/powerview.ps1 | PowerShell | bsd-3-clause | 769,757 |
trap {
&$TrapHandler
}
Function Install-RoleSecondaryDomainController
{
<#
.SYNOPSIS
Install additional (secondary) domain controller.
#>
param
(
[String]
# Domain name to join to.
$DomainName,
[String]
# Domain user who is allowed to join computer to domain.
$UserName,
[String]
# User's... | sajuptpm/murano | murano/tests/functional/api/v1/DummyTestApp/Resources/scripts/Install-RoleSecondaryDomainController.ps1 | PowerShell | apache-2.0 | 1,465 |
function Get-EXREmailHeaders
{
[CmdletBinding()]
param (
[Parameter(Position = 0, Mandatory = $true)]
[string]
$MailboxName,
[Parameter(Position = 1, Mandatory = $false)]
[psobject]
$AccessToken,
[Parameter(Position = 2, Mandatory = $false)]
[psobject]
$ItemRESTURI
)
Begin
{
if($AccessToken... | gscales/Exch-Rest | functions/mailItems/Get-EXREmailHeaders.ps1 | PowerShell | mit | 965 |
BeforeAll {
. $PSScriptRoot\Setup.ps1
. $PSScriptRoot\..\src\Resolve-XLRange.ps1
}
Describe "Resolve-XLRange/Range" {
BeforeAll {
$path = Join-Path $TestDrive 'test.xlsx'
Copy-Item -Path $PSScriptRoot\data\WithNamedRange.xlsx -Destination $path
$xlFile = Get-XLFile -Path $path
... | redoz/ExtraLarge | test/Resolve-XLRange.Tests.ps1 | PowerShell | mit | 22,844 |
<#
.SYNOPSIS
Queries servers for disk sizes.
.DESCRIPTION
Uses CIM to query the list of servers for drive volumes and returns the size and free space.
If no list of servers are supplied, will check the local machine.
.EXAMPLE
.\Get-DiskSize.ps1
Returns disk information from the local machine.
.EXAM... | mbsj/PowerShell | Scripts/Get-DiskSize.ps1 | PowerShell | mit | 1,406 |
$script:resourceModulePath = Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent
$script:modulesFolderPath = Join-Path -Path $script:resourceModulePath -ChildPath 'Modules'
$script:localizationModulePath = Join-Path -Path $script:modulesFolderPath -ChildPath 'xWebAdministration.Common'
Import-Module -Nam... | remcoeissing/xWebAdministration | source/DSCResources/MSFT_xIisLogging/MSFT_xIisLogging.psm1 | PowerShell | mit | 18,348 |
param($installPath, $toolsPath, $package, $project)
$analyzerPath = join-path $toolsPath "analyzers"
$analyzerFilePath = join-path $analyzerPath "Analyzer_CS.dll"
$project.Object.AnalyzerReferences.Add("$analyzerFilePath") | DotNetAnalyzers/DotNetAnalyzers | Analyzer_Constructor_Mis-Assignment/Analyzer_CS/Analyzer_CS/tools/install.ps1 | PowerShell | mit | 227 |
$resourceModulePath = Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent
$modulesFolderPath = Join-Path -Path $resourceModulePath -ChildPath 'Modules'
$aDCommonModulePath = Join-Path -Path $modulesFolderPath -ChildPath 'ActiveDirectoryDsc.Common'
Import-Module -Name $aDCommonModulePath
$dscResourceComm... | PowerShell/xActiveDirectory | source/DSCResources/MSFT_ADDomainDefaultPasswordPolicy/MSFT_ADDomainDefaultPasswordPolicy.psm1 | PowerShell | mit | 10,896 |
<#
.SYNOPSIS
This sample automation runbook creates a weekly update deployment each Sunday for VMs in a specific Azure resource group
or an individual VM in a resource group. It assumes that the VM's are already onboarded to Update Management in the automation
account that this runbook runs in.
.DESCRIP... | azureautomation/runbooks | Utility/ARM/New-WeeklyUpdateDeployment.ps1 | PowerShell | mit | 6,320 |
function Install-LabHyperV
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseCompatibleCmdlets", "", Justification="Not relevant on Linux")]
[CmdletBinding()]
param
( )
Write-LogFunctionEntry
$vms = Get-LabVm -Role HyperV
Write-ScreenInfo -Message 'Exposing virtualization extensi... | AutomatedLab/AutomatedLab | AutomatedLab/AutomatedLabHyperV.psm1 | PowerShell | mit | 3,621 |
Import-Module AzureRM
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
function Set-CredentialsFromEnvFile {
if (Test-Path "${here}\env.ps1") {
. "${here}\env.ps1"
} else {
Throw "ERROR: Could not find ${here}\env.ps1 file to source credentials. Please create it."
}
}
function Co... | ionutbalutoiu/mesos-jenkins | DCOS/scalability-testing/Scalability.Tests.ps1 | PowerShell | apache-2.0 | 14,186 |
$packageName = 'byteball'
$installerType = 'exe'
$silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-'
$url = 'https://github.com/byteball/byteball/releases/download/v1.9.1/Byteball-win32.exe'
$checksum = 'bef31aa65927999f20722b5260b20226508b5deb8fa7c2e602274bb17f7a09d3'
$checksumType = 'sha256'
$url64 = 'https... | dtgm/chocolatey-packages | automatic/_output/byteball/1.9.1/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 1,062 |
$i=(Get-WmiObject -Class Win32_NetworkAdapterConfiguration -ComputerName . | where {$_.IPAddress.length -gt 1}).ipaddress[0]
switch -wildcard ($i)
{
"192.168.51.*" {"VS: $i"; (Get-WmiObject -Class Win32_Printer -ComputerName . -Filter "Name='VS Physicians Xerox WorkCentre 3550 Class Driver'").SetDefaultPri... | rkiriakos/JcPSh | LocationRun.ps1 | PowerShell | apache-2.0 | 712 |
# The authentication key (API Key).
# Get your own by registering at https://app.pdf.co
$API_KEY = "***********************************"
# Source DOC or DOCX file
$SourceFile = ".\sample.docx"
# Destination PDF file name
$DestinationFile = ".\result.pdf"
# 1. RETRIEVE THE PRESIGNED URL TO UPLOAD THE FILE.
# * If you... | bytescout/ByteScout-SDK-SourceCode | PDF.co Web API/DOC To PDF API/PowerShell/Convert DOC To PDF From Uploaded File/ConvertDocToPdfFromUploadedFile.ps1 | PowerShell | apache-2.0 | 2,899 |
$BIN_DIR = Split-Path -Parent $MyInvocation.MyCommand.Definition
python3 ${BIN_DIR}\svn-local-recur-clone $args
| wybosys/wybosys | bin/svn-local-recur-clone.ps1 | PowerShell | bsd-3-clause | 116 |
configuration SharepointService
{
Service Started
{
Name = “Spooler”,“AudioSrv”, "TabletInputService"
State = "Stopped"
StartupType = "Manual“
}
Service Stopped
{
Name = "WerSvc"
State = "Stopped"
StartupType = "Disabled"
... | nanalakshmanan/nDemos_BRK4452 | Progression/Backup/DSCSharepointService.ps1 | PowerShell | mit | 348 |
# This script takes care of packaging the build artifacts that will go in the
# release zipfile
$SRC_DIR = $PWD.Path
$STAGE = [System.Guid]::NewGuid().ToString()
Set-Location $ENV:Temp
New-Item -Type Directory -Name $STAGE
Set-Location $STAGE
$ZIP = "$SRC_DIR\$($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:... | leesdolphin/cobalt.rs | ci/before_deploy.ps1 | PowerShell | mit | 527 |
$packageName = 'kvrt'
$url = 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe'
$checksum = 'acec89a5a0494da4836ad05887503bc079e23ad0'
$checksumType = 'sha1'
$toolsPath = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$installFile = Join-Path $toolsPath "kvrt.exe"
try {
Get-Chocolat... | dtgm/chocolatey-packages | automatic/_output/kvrt/2015.11.13/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 925 |
$packageName = 'armory'
$installerType = 'exe'
$silentArgs = '/S'
$validExitCodes = @(0)
Get-ItemProperty -Path @( 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*',
'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*',
'HKCU:\Softwa... | dtgm/chocolatey-packages | automatic/_output/armory/0.96/tools/chocolateyUninstall.ps1 | PowerShell | apache-2.0 | 891 |
function Get-TargetResource
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")]
[CmdletBinding()]
[OutputType([System.Collections.Hashtable])]
param
(
[parameter(Mandatory = $true)]
[System.String]
$Identity,
[parameter(Ma... | ConclusionMC/puppetlabs-dsc | lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchExchangeServer/MSFT_xExchExchangeServer.psm1 | PowerShell | apache-2.0 | 9,982 |
[T4Scaffolding.ViewScaffolder("Razor", Description = "Adds an ASP.NET MVC view using the Razor view engine", IsRazorType = $true, LayoutPageFilter = "*.cshtml,*.vbhtml|*.cshtml,*.vbhtml")][CmdletBinding()]
param(
[parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, Position = 0)][string]$Co... | kissarat/dandy | packages/MvcScaffolding.1.0.6/tools/RazorView/MvcScaffolding.RazorView.ps1 | PowerShell | bsd-3-clause | 2,413 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.