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 |
|---|---|---|---|---|---|
$env:PATH += ";.\thirdparty\nant\bin\;.\thirdparty\nunit\bin\" | asipe/Nucs | scripts/set_paths.ps1 | PowerShell | mit | 65 |
function ZipFiles( $zipfilename, $sourcedir )
{
Add-Type -Assembly System.IO.Compression.FileSystem
$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal
[System.IO.Compression.ZipFile]::CreateFromDirectory($sourcedir,
$zipfilename, $compressionLevel, $false)
}
dotnet restore
dotnet pu... | barfet/solar-system | services/logging/build.ps1 | PowerShell | mit | 639 |
Function path_is_valid
{
[cmdletbinding()] Param ( [Parameter(Mandatory=$False)][string]$to_check = "" )
Write-Debug "path_is_valid `$to_check=[$to_check]"
if ( $to_check -eq "" -or $to_check -eq $null )
{
return($false)
}
else {
return ( Test-Path -LiteralPath:$to_check -IsValid ... | pratom/master | nucleus/protons/file_system/path/path_is_valid.ps1 | PowerShell | mit | 332 |
<#
.SYNOPSIS
SCCM Uninstall program for Adobe After Effects Creative Cloud
.DESCRIPTION
Remove the following component(s) from Window 7 x64 systems:
- Adobe After Effects CC
.NOTES
FileName: AdobeCC_AfterEffects_Uninstall.ps1
Author: Jerry Senff
Updated: 12/11/2016
... | jrsenff/Sccm-PowerShell-Scripts | Adobe Creative Cloud - After Effects/AdobeCC_AfterEffects_Uninstall.ps1 | PowerShell | mit | 2,336 |
# from https://stefanscherer.github.io/protecting-a-windows-2016-docker-engine-with-tls/
$externalIp = "1.2.3.4" # eg. edge gateway IP / public IP address
if (!(Test-Path $env:USERPROFILE\.docker)) {
mkdir $env:USERPROFILE\.docker
}
$ips = ((Get-NetIPAddress -AddressFamily IPv4).IPAddress) -Join ','
Write-Host "Cre... | StefanScherer/docker-windows-box | scripts/dockertls.ps1 | PowerShell | mit | 1,274 |
$sonarBuildId = "com:github:$($env:APPVEYOR_REPO_NAME.Replace("/", ":"))"
$branchParam = ""
if ($env:APPVEYOR_REPO_BRANCH -ne "master") { $branchParam = "/d:sonar.branch=$env:APPVEYOR_REPO_BRANCH" }
Write-Host "SONARQUBE: set branch parameter to '$branchParam'"
MSBuild.SonarQube.Runner.exe begin `
/k:"$sonarBuild... | serialseb/ConsulStructure | build/funcs/Begin-SonarQube.ps1 | PowerShell | mit | 615 |
Function Import-RepairScripts
{
[CmdletBinding()]
Param(
[string[]]$RepairScripts
)
Begin
{
$repairFunctionNames = @()
}
Process
{
foreach ($repairScript in $RepairScripts)
{
if (Test-Path $repairScript)
{
... | HiltonGiesenow/PoShMon | src/Functions/PoShMon.SelfHealing.Core/Import-RepairScripts.ps1 | PowerShell | mit | 736 |
[CmdletBinding(DefaultParameterSetName = 'None')]
param
(
[String] [Parameter(Mandatory = $true)]
$ConnectedServiceName,
[String] [Parameter(Mandatory = $true)]
$ReleaseDefinitionName
)
Function Find-ReleaseDefinition {
param([Parameter(Mandatory = $true)] $TfsUri)
$url = [string]::Format("{0}{1}/_apis/relea... | aquiladev/vsts-trigger | Tasks/ReleaseTrigger/ReleaseTrigger.ps1 | PowerShell | mit | 6,643 |
$gitCommand = Get-Command -Name git -ErrorAction SilentlyContinue
if ($gitCommand -eq $null) {
Write-Error -Message "Cannot find git command; some functionality may not work."
}
. $PSScriptRoot/Repo.ps1
. $PSScriptRoot/Commands.ps1 | gkantsidis/WindowsPowerShell | Modules/Repo/Repo.psm1 | PowerShell | apache-2.0 | 236 |
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[string]$DomainNetBIOSName,
[Parameter(Mandatory=$true)]
[string]$WSFCNodePrivateIP2,
[Parameter(Mandatory=$true)]
[string]$ClusterName,
[Parameter(Mandatory=$true)]
[string]$AdminSecret,
[Parameter(Mandatory=$true)]
[str... | aws-quickstart/quickstart-microsoft-sql | scripts/AdditionalNodeConfig.ps1 | PowerShell | apache-2.0 | 3,714 |
$packageName = 'bitcoin.install'
$installerType = 'exe'
$silentArgs = '/S'
$url = 'https://bitcoin.org/bin/bitcoin-core-0.16.0/bitcoin-0.16.0-win32-setup.exe'
$checksum = '7558249b04527d7d0bf2663f9cfe76d6c5f83ae90e513241f94fda6151396a29'
$checksumType = 'sha256'
$url64 = 'https://bitcoin.org/bin/bitcoin-core-0.16.0/bit... | dtgm/chocolatey-packages | automatic/_output/bitcoin.install/0.16.0/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 1,014 |
trap { Write-Error $_; Exit 1 }
$downloadDir = "C:/Downloads"
New-Item -ItemType Directory -Force -Path $downloadDir
if (![System.IO.File]::Exists("$downloadDir\install-utils.ps1")) {
Write-Host "Download install-utils.ps1"
$url = "https://raw.githubusercontent.com/scikit-build/scikit-ci-addons/master/windows/ins... | scikit-build/scikit-ci-addons | windows/install-miniconda3-4-5-4.ps1 | PowerShell | apache-2.0 | 806 |
#==============================================================================
#
# FILE: QIP-ServiceManagement.psm1
# USAGE: Import-Module QIP-ServiceManagement.psm1
# DESCRIPTION: Address management functions for QIP
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# ... | cws-khuntly/powershell | WindowsPowerShell/QIP/Modules/QIP-ServiceMaintenance/QIP-ServiceMaintenance.psm1 | PowerShell | apache-2.0 | 5,043 |
<#############################################################################
The DoPx module provides a rich set of commands that extend the automation
capabilities of the DigitalOcean (DO) cloud service. These commands make it
easier to manage your DigitalOcean environment from Windows PowerShell. When
used with th... | KirkMunro/DoPx | functions/Get-DoPxKernel.ps1 | PowerShell | apache-2.0 | 4,458 |
# generated vars
$packageName = '{{PackageName}}'
$url = '{{DownloadUrlx64}}'
$checksum = '{{Checksum}}'
# static vars
$checksumType = 'sha256'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$installFile = Join-Path $toolsDir "{{PackageName}}.jar"
try {
# $Env:ChocolateyInstall\helpers\func... | dtgm/chocolatey-packages | automatic/regexpeditor/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 1,519 |
function Add-VSS3BucketS3KeyFilter {
<#
.SYNOPSIS
Adds an AWS::S3::Bucket.S3KeyFilter resource property to the template. A container for object key name prefix and suffix filtering rules.
.DESCRIPTION
Adds an AWS::S3::Bucket.S3KeyFilter resource property to the template.
A container for obj... | scrthq/Vaporshell | VaporShell/Public/Resource Property Types/Add-VSS3BucketS3KeyFilter.ps1 | PowerShell | apache-2.0 | 2,523 |
$packageName = 'fossil.portable'
$url = 'https://www.fossil-scm.org/download/fossil-w32-1.33.zip'
$checksum = '6201536163d7ff59817da8b13574e2ad139e2132'
$checksumType = 'sha1'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
Install-ChocolateyZipPackage -PackageName "$packageName" `
... | dtgm/chocolatey-packages | automatic/_output/fossil.portable/1.33/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 518 |
$packageName = 'duplicatecleaner'
$installerType = 'exe'
$silentArgs = '/S'
$url = 'http://www.digitalvolcano.co.uk/download/DuplicateCleaner_setup.exe'
$validExitCodes = @(0)
$checksum = 'B5C2077084B67A26FFD090D29F649D0C'
$checksumType = 'md5'
Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "... | dtgm/chocolatey-packages | automatic/_output/duplicatecleaner/3.2.6/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 411 |
# Copyright 2012 Aaron Jensen
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | michael-wolfenden/CodeCampServer | scripts/Carbon/WindowsFeatures/Uninstall-WindowsFeature.ps1 | PowerShell | bsd-3-clause | 4,770 |
#requires -RunAsAdministrator
# Test-xDscResource requires administrator privileges, so we may as well enforce that here.
end
{
Remove-Module [x]DscResourceDesigner -Force
Import-Module $PSScriptRoot\xDscResourceDesigner.psd1 -ErrorAction Stop
Describe Test-xDscResource {
Context 'A module with a ... | devopsteamberlin/xDSCResourceDesigner | xDscResourceDesigner.Tests.ps1 | PowerShell | mit | 3,366 |
function Resolve-DbaNetworkName {
<#
.SYNOPSIS
Returns information about the network connection of the target computer including NetBIOS name, IP Address, domain name and fully qualified domain name (FQDN).
.DESCRIPTION
Retrieves the IPAddress, ComputerName from one computer.
The ob... | dsolodow/dbatools | functions/Resolve-DbaNetworkName.ps1 | PowerShell | mit | 12,909 |
Param(
$RootSuffix = "TestLinker",
$Version = "9999.0.0"
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
Set-Location $PSScriptRoot
. ".\settings.ps1"
$UserProjectXmlFile = "$SourceBasePath\$PluginId\$PluginId.csproj.user"
if (!(Test-Path "$UserProjectXmlFile")) {
# Get versions from P... | matkoch/TestLinker | runVisualStudio.ps1 | PowerShell | mit | 4,442 |
function Get-TargetResource
{
[CmdletBinding()]
[OutputType([System.Collections.Hashtable])]
param
(
[parameter(Mandatory = $true)] [System.String] $ServiceAppName,
[parameter(Mandatory = $true)] [ValidateSet("Administrators","SharingPermissions")] [System.String] $SecurityType,
... | camiloborges/xSharePoint | Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/MSFT_SPServiceAppSecurity.psm1 | PowerShell | mit | 13,968 |
Param([string]$preRelease,[string]$major,[string]$minor)
$children = gci ./ -recurse *.nuspec
foreach( $child in $children)
{
$nuspecFile = gi $child.fullName
[xml] $content = Get-Content $nuspecFile
$end = Get-Date
$end = $end.ToUniversalTime()
$start = Get-Date "12/1/2016"
$today = Get-Date
... | LagoVista/DeviceAdmin | UpdateNuspecVersion.ps1 | PowerShell | mit | 1,147 |
param([String]$key,[String]$version)
function setProjectionVersion([String]$fileName, [String]$version) {
$content = (Get-Content $fileName) -join "`n" | ConvertFrom-Json
$content.version = $version
$newContent = ConvertTo-Json -Depth 10 $content
Set-Content $fileName $newContent
}
if ($version -ne ""... | folkelib/Folke.Logger.Elm | build.ps1 | PowerShell | mit | 621 |
<#
.SYNOPSIS
Invokes a PowerShell command
.DESCRIPTION
Invokes a PowerShell command with the option to
elevate to an admin process to execute.
.EXAMPLE
PS> Invoke-PSCommand -Command 'dir C:\'
Attempts to execute the given command in the current session
.EXAMPLE
PS> Invoke-PSCommand -Command 'dir C:\' -Eleva... | hobelinm/PsxUtility | Main/Invoke-PSCommand.ps1 | PowerShell | mit | 2,935 |
## =====================================================================
## Title : Get-IADObjectSID
## Description : Retrieve AD object's SID.
## Author : Idera
## Date : 8/11/2009
## Input : Get-IADObjectSID [[-InputObject] <Object>]
##
## Output : System.String
## Us... | borkit/scriptdump | PowerShell/Working/IderaPowerShellScripts/Idera_ADPowerShellScripts/Get-IADObjectSID.ps1 | PowerShell | mit | 1,453 |
$packageName = 'exiftool'
$url = 'http://owl.phy.queensu.ca/~phil/exiftool/exiftool-10.71.zip'
$checksum = 'b32c30ae8beef407c63aed7a29cf7f0f8672b668'
$checksumType = 'sha1'
$url64 = "$url"
$checksum64 = "$checksum"
$checksumType64 = "$checksumType"
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"... | dtgm/chocolatey-packages | automatic/_output/exiftool/10.71/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 869 |
$packageName = 'dropit.install'
$installerType = 'exe'
$silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-'
$url = 'https://sourceforge.net/projects/dropit/files/DropIt/v8.5.1/DropIt_v8.5.1_Setup.exe/download'
$checksum = '642b509fd8919a3c8be3275089bd7cd1bf086f2449ad292473a66beccf0f8a8e'
$checksumType = 'sha25... | dtgm/chocolatey-packages | automatic/_output/dropit.install/8.5.1/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 717 |
function Add-VSIoTAnalyticsDatasetDatasetContentDeliveryRule {
<#
.SYNOPSIS
Adds an AWS::IoTAnalytics::Dataset.DatasetContentDeliveryRule resource property to the template. When dataset contents are created, they are delivered to destination specified here.
.DESCRIPTION
Adds an AWS::IoTAnal... | scrthq/Vaporshell | VaporShell/Public/Resource Property Types/Add-VSIoTAnalyticsDatasetDatasetContentDeliveryRule.ps1 | PowerShell | apache-2.0 | 3,060 |
$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... | wsmelton/dbatools | tests/Install-DbaMaintenanceSolution.Tests.ps1 | PowerShell | mit | 2,220 |
[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.SPPasswordChangeSettings.Tests.ps1 | PowerShell | mit | 4,094 |
Start-AutoRestCodeGeneration -ResourceProvider "datafactory/resource-manager" -AutoRestVersion "latest"
| DheerendraRathor/azure-sdk-for-net | src/SDKs/DataFactory/Management.DataFactory/generate.ps1 | PowerShell | mit | 104 |
<#
.Synopsis
Downloads a file from a specified URL on the Internet.
.DESCRIPTION
Function will download a single file from the Internet. This cmdlet requires that an explicit URI is entered and that the destination file name and location is specified as well
.PARAMETER URL
Target location to download a specif... | darkoperator/Posh-SecMod | Utility/utility.psm1 | PowerShell | apache-2.0 | 12,151 |
Param(
[Parameter(Mandatory=$True)]
[string]$serviceUsername,
[Parameter(Mandatory=$True)]
[string]$servicePassword
)
$scriptLocation = [System.IO.Path]::GetDirectoryName($myInvocation.MyCommand.Definition)
. "$scriptLocation\config.ps1"
. "$scriptLocation\utils.ps1"
$cinderServiceName = "cinder-volum... | rbuzatu90/cinder-ci | windows/scripts/EnsureOpenStackServices.ps1 | PowerShell | apache-2.0 | 606 |
#
# Module manifest for module 'Azure'
#
# Generated by: Microsoft Corporation
#
# Generated on: 5/23/2012
#
@{
# Version number of this module.
ModuleVersion = '0.9.5'
# ID used to uniquely identify this module
GUID = 'D48CF693-4125-4D2D-8790-1514F44CE325'
# Author of this module
Author = 'Microsoft Corporation'
... | enavro/azure-powershell | src/ServiceManagement/Services/Commands.Utilities/Azure.psd1 | PowerShell | apache-2.0 | 7,313 |
function New-SourceCodeFolder {
param(
[string]
$FolderName
)
$sourceCodeFolder = $FolderName
if (Test-Path env:\BoxStarter:SourceCodeFolder) {
$sourceCodeFolder = $env:BoxStarter:SourceCodeFolder
}
if ([System.IO.Path]::IsPathRooted($sourceCodeFolder)) {
... | AddedInnovation/developer-setup | scripts/SystemSettings.ps1 | PowerShell | mit | 1,638 |
# Copyright (c) 2020 Microsoft Corporation. All Rights Reserved.
# Licensed under the MIT License (MIT)
function Get-RsRestFolderContent
{
<#
.SYNOPSIS
This function fetches data sources related to a catalog item from the Report Server.
.DESCRIPTION
This function fetches dat... | SQLvariant/ReportingServicesTools | ReportingServicesTools/Functions/CatalogItems/Rest/Get-RsRestFolderContent.ps1 | PowerShell | mit | 5,855 |
param(
[Parameter(Mandatory=$true)]
[string]$OfficeDeploymentPath,
[Parameter(Mandatory=$true)]
[String]$ConfigFileName = $NULL,
[Parameter()]
[bool]$WaitForInstallToFinish = $true,
[Parameter()]
[bool]$InstallProofingTools = $false,
[Parameter()]
[bool]$InstallLanguagePack = $... | OfficeDev/Office-IT-Pro-Deployment-Scripts | Office-ProPlus-Deployment/Setup-GPOOfficeInstallation/DeploymentFiles/DeployConfigFile.ps1 | PowerShell | mit | 2,796 |
function Get-PSWSUSContentDownloadProgress {
<#
.SYNOPSIS
Retrieves the progress of currently downloading updates. Displayed in bytes downloaded.
.DESCRIPTION
Retrieves the progress of currently downloading updates. Displayed in bytes downloaded.
.NOTES
Name: G... | proxb/PoshWSUS | Scripts/Get-PSWSUSContentDownloadProgress.ps1 | PowerShell | mit | 1,016 |
<#
.SYNOPSIS
Short description
.DESCRIPTION
Long description
.EXAMPLE
Example of how to use this cmdlet
.EXAMPLE
Another example of how to use this cmdlet
.INPUTS
Inputs to this cmdlet (if any)
.OUTPUTS
Output from this cmdlet (if any)
.NOTES
General notes
.COMPONENT
The component this c... | juniinacio/Barracuda.WAF | Barracuda.WAF/Public/Update-Service.ps1 | PowerShell | mit | 7,135 |
$Here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace('.Tests.', '.')
. "$here\$sut"
"$here\$sut"
Import-Module PSScriptAnalyzer
$Rules = Get-ScriptAnalyzerRule
$Name = $sut.Split('.')[0]
Describe 'Script Analyzer Tests' {
Context 'Testin... | SQLDBAWithABeard/Functions | Archived/Get-SQLInstancesPort.Tests.ps1 | PowerShell | mit | 4,718 |
[cmdletbinding()]
param(
[string]$vsTestVersion,
[string]$testAssembly,
[string]$testFiltercriteria,
[string]$runSettingsFile,
[string]$codeCoverageEnabled,
[string]$pathtoCustomTestAdapters,
[string]$overrideTestrunParameters,
[string]$otherConsoleOptions,
[string]$testRunTitle,
... | grawcho/vso-agent-tasks | Tasks/VsTestV1/VSTest.ps1 | PowerShell | mit | 14,617 |
echo '********************************************Update Chrome********************************************'
#$LocalTempDir = $env:TEMP; $ChromeInstaller = "ChromeInstaller.exe";
#(new-object System.Net.WebClient).DownloadFile('http://dl.google.com/chrome/install/375.126/chrome_installer.exe', "$LocalTempDir\$Chrom... | ObjectivityLtd/Test.Automation | ExecutingTestsOnWindows.ps1 | PowerShell | mit | 13,460 |
[CmdletBinding(PositionalBinding=$false)]
Param(
[Parameter(Mandatory = $true)]
[string] $destination,
[ValidateSet('Debug','Release')]
[string] $configuration = "Debug"
)
function Copy-WithBackup ($origin) {
$destinationPath = Join-Path -Path $destination -ChildPath (Split-Path $origin -leaf)
if (Tes... | jeffkl/msbuild | scripts/Deploy-MSBuild.ps1 | PowerShell | mit | 2,038 |
function Get-ShareAudit
{
<#
.Synopsis
Get-ShareAudit will pull size information, NTFS permissions, and Share permissions for all non-system and non-printer shares on the local computer or a remote server.
With no parameters, it will pull information from the local computer.
.EXAMPLE
Get-ShareAudit -Comp... | engrmtm/APCS-STR0 | File Management/FS_ShareAudit.ps1 | PowerShell | mit | 7,775 |
<#
.SYNOPSIS
Lists the wireless interfaces and their state.
#>
function Get-WiFiInterface
{
[CmdletBinding()]
[OutputType([WiFi.ProfileManagement+WLAN_INTERFACE_INFO])]
param ()
$interfaceListPtr = 0
$clientHandle = New-WiFiHandle
try
{
[void] [WiFi.Profi... | jcwalker/WiFiProfileManagement | Private/Get-WiFiInterface.ps1 | PowerShell | mit | 840 |
<#
.Synopsis
Generate markdown readme with module descriptions and usage examples
.EXAMPLE
Generate-Readme
#>
function Generate-Readme
{
[OutputType([string])]
Param (
)
Begin
{
$Modules = Get-Module -ListAvailable | Where-Object Path -Like "$env:USERPROFILE\Documents\Windows... | mac2000/WindowsPowerShell | Modules/Generate-Readme/Generate-Readme.psm1 | PowerShell | mit | 2,232 |
<#
.SYNOPSIS
Overwrites node registration entries (LCMv2) in a Pull Server Database.
.DESCRIPTION
LCMv2 (WMF5+ / PowerShell 5+) pull clients send information
to the Pull Server which stores their data in the registrationdata table.
This function will allow for manual overwrites of registrations... | bgelens/DSCPullServerAdmin | DSCPullServerAdmin/public/Set-DSCPullServerAdminRegistration.ps1 | PowerShell | mit | 7,140 |
Get-Module -Name Barracuda.WAF | Remove-Module -Force
Import-Module $(Join-Path -Path $PSScriptRoot -ChildPath '../Barracuda.WAF/Barracuda.WAF.psd1') -Force
InModuleScope Barracuda.WAF {
Describe "New-BarracudaWAFServer" {
It "should accept pipeline input" {
Mock Invoke-Api {}
$i... | juniinacio/Barracuda.WAF | tests/New-BarracudaWAFServer.Tests.ps1 | PowerShell | mit | 3,003 |
[CmdletBinding(DefaultParameterSetName = 'None')]
param (
[String] [Parameter(Mandatory = $false)]
$OutputFile,
[String] [Parameter(Mandatory = $true)]
$CreateMdFile,
[String] [Parameter(Mandatory = $true)]
$IncludeLinks,
[String] [Parameter(Mandatory = $true)]
$AppendMdFile,
[Strin... | kirkone/vsts-dnx-tasks | VSTS.DNX.Tasks.GenerateChangeLog/GenerateChangeLog.ps1 | PowerShell | mit | 3,589 |
$here = Split-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -Parent
$module = 'PSRegistry'
$function = 'Mount-RemoteRegistryHive'
Describe "$function" {
Context "Should throw errors" {
It "when computer name is not valid, it should throw" {
{ Mount-RemoteRegistryHive -Computer ... | MSAdministrator/PSRegistry | Tests/Public/Mount-RemoteRegistryHive.tests.ps1 | PowerShell | mit | 1,493 |
$packageName = 'scite'
$installerType = 'msi'
$silentArgs = '/quiet /qn /norestart'
$url = 'http://www.ebswift.com/uploads/7/0/4/0/70403747/scite-3.7.0x86.msi'
$checksum = 'a06b0022fd877f38199b35f479ef5cb8731613f18cda2de74894f88e69a74733'
$checksumType = 'sha256'
$url64 = 'http://www.ebswift.com/uploads/7/0/4/0/704037... | dtgm/chocolatey-packages | automatic/_output/scite/3.7.0/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 1,010 |
# Copyright (c) 2002-2018 "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... | HuangLS/neo4j | packaging/standalone/src/main/distribution/shell-scripts/bin/Neo4j-Management/Stop-Neo4jServer.ps1 | PowerShell | apache-2.0 | 3,063 |
. 'C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe' .\X\X.sln
cp .\X\bin\Debug\X.dll .
$compilers = @(
@{ 'compiler' = $env:windir + '\Microsoft.NET\Framework64\v2.0.50727\csc.exe'; 'color' = 'DarkCyan' }
@{ 'compiler' = $env:windir + '\Microsoft.NET\Framework64\v3.5\csc.exe' ; 'color' = 'DarkMagenta'... | ufcpp/UfcppSample | Scribble/OverloadResolutionWithDefaultParameter/Run.ps1 | PowerShell | apache-2.0 | 929 |
$packageName = 'mylastsearch'
$url = 'http://www.nirsoft.net/utils/mylastsearch.zip'
$checksum = '1c9ac237f092c9a9c420993b39e1ec57af88be13b9bffe87d6c6fac82b3277e1'
$checksumType = 'sha256'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$installFile = Join-Path $toolsDir "$($packageName).exe"
In... | dtgm/chocolatey-packages | automatic/_output/mylastsearch/1.65/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 656 |
. .\Helpers.ps1
function Test-ScriptReference
{
[PSycheTest.Test()]
param()
Assert-Equal "Hello, World!" $(Get-TestString)
}
| mthamil/PSycheTest | Tests.Integration/TestScripts/HasScriptReferences.ps1 | PowerShell | apache-2.0 | 137 |
# Invoke-CypherStuff
################################################################################## Node
<#
.Synopsis
Retrieve Bloodhound Node Data
.DESCRIPTION
Query BloodHound API to retrieve Node Data
Specify Node type and Target Name
Also used to refresh Node Lists
.EXAMPLE
Node -U... | SadProcessor/EmpireDog | Modules/CypherDog1.3/CypherDog1.3.ps1 | PowerShell | bsd-3-clause | 72,656 |
Function Get-UnitynfsShareCreate {
<#
.SYNOPSIS
Parameters used for creating an NFS share when creating or modifying a file system. <br/> <br/> This resource type is embedded in the storageResource resource type.
.DESCRIPTION
Parameters used for creating an NFS share when creating or modify... | equelin/Unity-Powershell | Tools/Functions/Result_UnityVSA_41/Get-UnitynfsShareCreate.ps1 | PowerShell | mit | 2,281 |
$user = Read-Host "Enter username"
$getuser = get-ADUser -Identity $user -Properties *
$pls = (get-ADUser $user -properties PasswordLastSet).PasswordLastSet
$date = Get-Date -Format G
$begin = [datetime]$pls
$end = [datetime]$date
$passwordAge = ((New-TimeSpan -End $end -Start $pls).Days).toString()
$pwdAge = (((New-T... | drewmilizia/PowerShell_Work | ActiveDirectory/Password_Age.ps1 | PowerShell | mit | 841 |
$packageName = 'dolphin'
$url = 'http://dl.dolphin-emu.org/builds/dolphin-master-4.0-7962-x64.7z'
$checksum = '8d56621e9d4e30293578a58626d2eac8834f130b'
$checksumType = 'sha1'
$url64 = $url
$checksum64 = $checksum
$checksumType64 = $checksumType
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
In... | dtgm/chocolatey-packages | automatic/_output/dolphin/4.0.7962/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 761 |
#
# Module manifest for module 'Microsoft.Azure.Commands.Batch'
#
# Generated by: Microsoft Corporation
#
# Generated on: 9/19/2015
#
@{
# Version number of this module.
ModuleVersion = '1.0.4'
# ID used to uniquely identify this module
GUID = 'a8f00f40-1c1a-49b5-9db3-24076b75c3cf'
# A... | dulems/azure-powershell | src/ResourceManager/AzureBatch/AzureRM.Batch.psd1 | PowerShell | apache-2.0 | 2,642 |
function Build() {
Restore-Dependencies
Compile-Solution
}
function Compile-Solution() {
Run-Command {
& msbuild
}
}
function Install-NuGet() {
Write-Host "Installing nuget.exe..."
if (Test-Path $settings.NuGetPath) {
Write-Host "NuGet already installed."
return
}
... | croquet-australia/website-application | scripts/AppVeyor/appveyor-build.ps1 | PowerShell | mit | 2,434 |
# This script will invoke pester tests
# It should invoke on PowerShell v2 and later
# We serialize XML results and pull them in appveyor.yml
#If Finalize is specified, we collect XML output, upload tests, and indicate build errors
param(
[switch]$Finalize,
[switch]$Test,
[string]$ProjectRoot = $ENV:APPVEY... | beni55/PoshRSJob | Tests/appveyor.pester.ps1 | PowerShell | apache-2.0 | 2,764 |
# Publishes our build assets to nuget, Azure DevOps, dotnet/versions, etc ..
#
# The publish operation is best visioned as an optional yet repeatable post build operation. It can be
# run anytime after build or automatically as a post build step. But it is an operation that focuses on
# build outputs and hence can't re... | AlekseyTs/roslyn | eng/publish-assets.ps1 | PowerShell | mit | 5,417 |
Start-AutoRestCodeGeneration -ResourceProvider "logz/resource-manager" -AutoRestVersion "v2"
| Azure/azure-sdk-for-net | sdk/logz/Microsoft.Azure.Management.Logz/src/generate.ps1 | PowerShell | mit | 93 |
$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... | kozloski/dbatools | tests/Get-DbaAgListener.Tests.ps1 | PowerShell | mit | 1,560 |
Set-Location $PSScriptRoot
$console = $host.UI.RawUI
$console.ForegroundColor = "white"
$console.BackgroundColor = "black"
$buffer = $console.BufferSize
$buffer.Width = 400
$buffer.Height = 2000
$console.BufferSize = $buffer
Clear-Host
Set-Location $PSScriptRoot
echo "Lancement programme"
. ".\Data\Adventure.ps1"
| Lokionze/Emvs-Adventure | EMVS adventure.ps1 | PowerShell | mit | 315 |
# Functions
# return CLI usage if missing arguments
function usage {
$err = @"
Usage :
[Interactive Mode] :
Get-O365Session `
-samAccountName <samAccountName (required for interactive mode)> `
-domain <O365 domain name>
[Non-Interactive Mode] :
Get-O365Session -credObject <creden... | swys/Get-O365Session | Get-O365Session.psm1 | PowerShell | mit | 2,666 |
$vaultSubscriptionId = '[ID HERE]'
Remove-Module -Name DevOpsFlex.Environments.PowerShell -ErrorAction SilentlyContinue -Verbose
Import-Module $PSScriptRoot\..\DevOpsFlex.Environments.PowerShell.psd1 -Force -Verbose
$azureAdApplication = New-AzurePrincipalWithCert -SystemName 'djfr' `
... | sfa-gov-uk/devopsflex | src/DevOpsFlex.Environments.PowerShell/DevOpsFlex.Environments.PowerShell/Debug/AzurePrincipalWithCert.ps1 | PowerShell | mit | 976 |
function Add-JIRAIssue {
<#
.SYNOPSIS
Creates a new JIRA issue
.DESCRIPTION
The Add-JIRAIssue cmdlet gets a specified JIRAIssue object or performs a search to get multiple JIRAIssue objects.
.PARAMETER Project
Specifies the JIRAProject in which the issue should be created.
.PARAMETER ProjectKey
Sp... | Invoke-Automation/AtlassianCLI | AtlassianCLI/Public/JIRA/Add-JIRAIssue.ps1 | PowerShell | mit | 7,867 |
. "$(Split-Path -Parent $MyInvocation.MyCommand.Path)\..\_TestSetup.ps1"
InModuleScope 'TfsCmdlets' {
Describe '_ParseRestApiSample' {
Context 'When supplying an invalid parameter' {
$expected = [Ordered] @{ Operation = ''; Host = ''; Path = ''; QueryParameters = @{}; ApiVersion = ''; Scope ... | igoravl/tfscmdlets | Tests/_Private/ParseRestApiSample.Tests.ps1 | PowerShell | mit | 5,453 |
$host.ui.RawUI.WindowTitle = "DenyTOR - Server Protection"
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(`
[Security.Principal.WindowsBuiltInRole] "Administrator"))
{
cls
Write-Host "╔═══════════════════════════════════════════════════════... | danialonso/DenyTor | DenyTor.ps1 | PowerShell | mit | 17,383 |
# .ExternalHelp psPAS-help.xml
Function Get-PASPTARemediation {
[CmdletBinding()]
param( )
BEGIN {
Assert-VersionRequirement -RequiredVersion 10.4
}#begin
PROCESS {
#Create request URL
$URI = "$Script:BaseURI/API/pta/API/Settings"
#Send request to web service
$result = Invoke-PASRestMethod -Uri $URI ... | pspete/psPAS | psPAS/Functions/EventSecurity/Get-PASPTARemediation.ps1 | PowerShell | mit | 541 |
<#
The MIT License (MIT)
Copyright (c) 2015 Objectivity Bespoke Software Specialists
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to... | ObjectivityLtd/Test.Automation | scripts/set_AppConfig_for_tests.ps1 | PowerShell | mit | 3,763 |
$scriptpath = $MyInvocation.MyCommand.Path
$path = Split-Path $scriptpath
Set-Location $path
$computers = get-content ..\computers.txt
$computers = get-content ..\computers_all.txt
$computers | where{test-connection $_ -quiet -count 1} | ForEach-Object{
Write-Host "Computer: $_"
Invoke-Command -Compute... | roozbehk/til | windows/scripts/uninstall_onedrive/uninstall_onedrive.ps1 | PowerShell | mit | 946 |
$ProgressPreference = "SilentlyContinue"
$ErrorActionPreference = "Stop"
function New-AppveyorPackage
{
[CmdletBinding()]
param(
[Parameter(Position = 0)]
[switch]$IsCore = $script:APPEYOR_BUILD_CORE
)
Write-LogHeader "Building NuGet Package (Core: $IsCore)"
$config = [PSCustomObj... | lordmilko/PrtgAPI | build/CI/Appveyor/New-AppveyorPackage.ps1 | PowerShell | mit | 25,535 |
<#
.Synopsis
Configure iTerm for this Dotfiles configuration
#>
[CmdletBinding()]
#Requires -Version 5
param()
begin {
Import-Module -Name (Resolve-Path (Join-Path $PSScriptRoot ../powershell-modules/Dotfiles/Dotfiles.psm1))
Set-StrictMode -Version latest
}
process {
if (-Not (Test-OSPlatform 'D... | DustinVenegas/dotfiles | iTerm2/bootstrap.ps1 | PowerShell | mit | 1,523 |
#### Prerequisites not performed here ###
# $key = Get-Content C:\key.txt -raw
# Bump the version
explorer $ENV:USERPROFILE\Documents\GitHub\PSSlack
# Publish a module
Publish-Module -Path $ENV:USERPROFILE\Documents\GitHub\PSSlack -NuGetApiKey $Key
# Auto deploy!
# http://ramblingcookiemonster.github.io/PSDeplo... | BosPSUG/PresentationMaterials | 2016-07-oneget/2-gallery-extras.ps1 | PowerShell | mit | 816 |
function Get-CurrentDirectory
{
$thisName = $MyInvocation.MyCommand.Name
[IO.Path]::GetDirectoryName((Get-Content function:$thisName).File)
}
Import-Module (Join-Path (Get-CurrentDirectory) 'build.psm1') -DisableNameChecking
Describe "Set-ConfigAppSettings" {
$testAppSettings = 'TestDrive:\app.config'
... | flimble/edamame | scripts/build.tests.ps1 | PowerShell | mit | 1,328 |
$packageName = 'dolphin'
$url = 'https://dl.dolphin-emu.org/builds/dolphin-master-5.0-5931-x64.7z'
$checksum = '9e2f497351638252d9494e6535ab621b5a0773f8345c650ed1a29257bd6ffe72'
$checksumType = 'sha256'
$url64 = $url
$checksum64 = $checksum
$checksumType64 = $checksumType
$toolsDir = "$(Split-Path -parent $MyInvocation... | dtgm/chocolatey-packages | automatic/_output/dolphin/5.0.5931/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 788 |
$ResolutionStateMapJSON = @'
{
"Pending": 200,
"Assigned": 249,
"Closed": 255,
"In Progress": 150,
"Resolved": 207,
"SendToRemedy": 252,
"RemediationInProgress": 151,
"SendToRemediation": 152,
"New": 0
}
'@
$StatusMessagesJSON = @'
{
"SCOMAssigned": "Assign... | randorfer/SCOrchDev-AlertConnector | SCOrchDev-AlertConnector.psm1 | PowerShell | apache-2.0 | 40,617 |
$packageName = 'dolphin'
$url = 'https://dl.dolphin-emu.org/builds/dolphin-master-5.0-3969-x64.7z'
$checksum = '0422994decbb6045335b52cdec63ae199319c96c607f17e35636155c812aeab3'
$checksumType = 'sha256'
$url64 = $url
$checksum64 = $checksum
$checksumType64 = $checksumType
$toolsDir = "$(Split-Path -parent $MyInvocation... | dtgm/chocolatey-packages | automatic/_output/dolphin/5.0.3969/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 788 |
# powershell v2 compatibility
$psVer = $PSVersionTable.PSVersion.Major
if ($psver -ge 3) {
function Get-ChildItemDir {Get-ChildItem -Directory $args}
} else {
function Get-ChildItemDir {Get-ChildItem $args}
}
$warningPreference = "Continue"
$chocoLib = Join-Path $env:ChocolateyInstall "lib"
if (Test-Path -PathType ... | dtgm/chocolatey-packages | automatic/_output/manictime/3.5.1/tools/chocolateyUninstall.ps1 | PowerShell | apache-2.0 | 948 |
Import-Module au
Import-Module "$PSScriptRoot\..\..\scripts\au_extensions.psm1"
$releases = 'https://release.tinymediamanager.org/'
function global:au_SearchReplace {
@{
".\legal\VERIFICATION.txt" = @{
"(?i)(^\s*url(32)?\:\s*).*" = "`${1}<$($Latest.URL32)>"
"(?i)(^\s*checksum(32)?\:\s*).*" ... | JourneyOver/chocolatey-packages | automatic/tinymediamanager/update.ps1 | PowerShell | apache-2.0 | 2,040 |
<#
.Example
Get-AssemblyFile -Path 'D:\amirhosseinab\Documents\Projects\Core\Tralus\Framework\Source' | ft
Get-AssemblyFile -Path 'C:\Work\Core\Tralus\Shell\Source\Source\Mahan.Tralus.Framework.BusinessModel\Properties'
#>
function Get-AssemblyFile {
[CmdletBinding()]
Param (
[Pa... | mehrandvd/Tralus | Scripts/BuildScript/PreBuildScript.ps1 | PowerShell | apache-2.0 | 4,667 |
$packageName = '{{PackageName}}'
$validExitCodes = @(0)
$inPath = Join-Path $Env:ProgramFiles "ip2"
$unPath = Join-Path $inPath "Uninstaller"
$unBin = Join-Path $unPath "uninstaller.jar"
$installArgs = "java -jar `'$($unBin)`'"
$scriptPath = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$ahkFile = Join-Pa... | maharishi/chocolatey-packages | automatic/i2p/tools/chocolateyUninstall.ps1 | PowerShell | apache-2.0 | 804 |
ise -file ".\1SimpleTemp.ps1, .\2testparamStart.ps1, .\3testparamEnd.ps1, .\4MainCodeStart.ps1, .\5MainCodeEnd.ps1, .\6MakeObjects.ps1" | kidchenko/playground | powershell-advanced-tools-and-scripting-with-powershell/Mod4/_Startup.ps1 | PowerShell | mit | 138 |
$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... | wsmelton/dbatools | tests/Remove-DbaAgentJob.Tests.ps1 | PowerShell | mit | 4,969 |
$packageName = 'sandboxie.beta'
$installerType = 'EXE'
$url = 'http://www.sandboxie.com/SandboxieInstall32-413-3.exe'
$url64 = 'http://www.sandboxie.com/SandboxieInstall64-413-3.exe'
$silentArgs = '/install /S /D=C:\Program Files\Sandboxie'
Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$ur... | dtgm/chocolatey-packages | automatic/_output/sandboxie.beta/4.13.3/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 333 |
#
# Module manifest for module 'Microsoft.Azure.Commands.SiteRecovery'
#
# Generated by: Microsoft Corporation
#
# Generated on: 9/19/2015
#
@{
# Version number of this module.
ModuleVersion = '1.1.0'
# ID used to uniquely identify this module
GUID = 'd1de7560-48e1-48f3-bc8c-4eea3af2bbe1'
... | DeepakRajendranMsft/azure-powershell | src/ResourceManager/SiteRecovery/AzureRM.SiteRecovery.psd1 | PowerShell | apache-2.0 | 2,601 |
<##################################################################################################
Usage Example
=============
Login-AzureRmAccount
Import-Module .\Cmdlets.DevTestLab.ps1
Get-AzureDtlLab
Help / Documentation
====================
- To view a cmdlet's he... | kirpasingh/azure-quickstart-templates | 101-dtl-create-lab/Cmdlets.DevTestLab.ps1 | PowerShell | mit | 23,924 |
<#
.SYNOPSIS
Entry point script for installing native tools
.DESCRIPTION
Reads $RepoRoot\global.json file to determine native assets to install
and executes installers for those tools
.PARAMETER BaseUri
Base file directory or Url from which to acquire tool archives
.PARAMETER InstallDirectory
Directory to install na... | zenos-os/zenos | vendor/corert/eng/common/init-tools-native.ps1 | PowerShell | mit | 3,751 |
Import-Module ActiveDirectory
# This script creates an Active Directory user and an hMailServer user
# (C) 2015 Patrick Lambert provided under MIT license - http://dendory.net
#
# The Active Directory domain to use:
#
$domain = Get-ADDomain
#
# The base DN for accounts (DC=example,DC=com):
#
$dn = $domain.Distinguished... | dendory/scripts | adhmailadd.ps1 | PowerShell | mit | 3,003 |
# If script can't be started: Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process
# Define file locations
$snapshotFileName = 'D:\Temp\1.snapshot'
$excelFileName = 'd:\Temp\Test.xlsx'
$solutionFolder = '..\..\..\..\'
# Create the scripting host of ResXManager:
Add-Type -Path 'ResXManager.Scripti... | tom-englert/ResXResourceManager | src/ResXManager.Scripting/Sample.ps1 | PowerShell | mit | 3,278 |
#Requires -Version 3.0
Param(
[string] [Parameter(Mandatory=$true)] $ResourceGroupLocation,
[string] [Parameter(Mandatory=$true)] $ResourceGroupName,
[switch] $UploadArtifacts,
[string] $StorageAccountName,
[string] $StorageAccountResourceGroupName,
[string] $StorageContainerName = $ResourceGroupName.ToLo... | michaelsrichter/azure.owasp | PublishScripts/Scripts/Deploy-AzureResourceGroup-2.ps1 | PowerShell | mit | 6,736 |
Function New-Desktop {
[OutputType('System.PoshDesktop.Desktop')]
[cmdletbinding()]
Param(
[parameter(ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)]
[string]$Name
)
Write-Verbose "Creating desktop: $($Name)"
$Handle = [PoshDesktop]::CreateDesktop(
$Name... | proxb/PoshDesktop | Scripts/New-Desktop.ps1 | PowerShell | mit | 1,554 |
Describe "[$($Lab.Name)] SQLServer2008R2" -Tag SQLServer2008R2 {
Context "Role deployment successful" {
It "[SQLServer2008R2] Should return the correct amount of machines" {
(Get-LabVm -Role SQLServer2008R2).Count | Should -Be $(Get-Lab).Machines.Where({$_.Roles.Name -contains 'SQLServer2008R2'}).Co... | AutomatedLab/AutomatedLab | AutomatedLabTest/internal/tests/SQLServer2008R2.tests.ps1 | PowerShell | mit | 1,176 |
##
# editors.psm1
#
# Copyright(c) Ethan Goh
# MIT Licensed
##
# Default Editor
function Open-DefaultEditor { Open-SublimeText $args}
# Editors
function Open-SublimeText{& "$env:ProgramFiles\Sublime Text 3\sublime_text.exe" $args}
function Open-NPP{& "$env:ProgramFiles(x86)\Notepad++\notepad++.exe" $args}
function ... | yhgoh88/hodgepodge | powershell/env/modules/editors.psm1 | PowerShell | mit | 655 |
$hostname = "navex-basic-securepwd"
# Create AES key to encrypt the password:
$KeyFile = ".\my\myAES.key"
$Key = New-Object Byte[] 16 # You can use 16, 24, or 32 for AES
[Security.Cryptography.RNGCryptoServiceProvider]::Create().GetBytes($Key)
$Key | out-file $KeyFile
$passsec = Read-Host 'Input the user`s password... | Koubek/nav-docker-examples | basic-securepwd/run.ps1 | PowerShell | mit | 717 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.