code stringlengths 2 1.05M | repo_name stringlengths 5 101 | path stringlengths 4 991 | language stringclasses 3
values | license stringclasses 5
values | size int64 2 1.05M |
|---|---|---|---|---|---|
$ErrorActionPreference = 'Stop'
if (Test-Path('debug')) {
remove-item 'debug' -Recurse -Verbose
}
| asipe/snarfz | scripts/clean.ps1 | PowerShell | mit | 106 |
<#MIT License
Copyright (c) 2017 Rodolfo Castelo Méndez
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, ... | dostshell/RevolverCorp | RevoModules/Cmdlets/RevoAzure.psm1 | PowerShell | mit | 22,213 |
$desktopPath = [Environment]::GetFolderPath("Desktop")
$lnkPath = $desktopPath + "\WindowsSpyBlocker.lnk"
if (Test-Path $lnkPath)
{
Write-Output "WindowsSpyBlocker: Removing Desktop shortcut file"
Remove-Item $lnkPath
}
| crazy-max/WindowsSpyBlocker | chocolatey/tools/chocolateyUninstall.ps1 | PowerShell | mit | 229 |
If (-not (Test-Path ".\build\tools\FAKE\tools\FAKE.exe"))
{
.\build\nuget.exe install FAKE -OutputDirectory build\tools -ExcludeVersion
}
If (-not (Test-Path ".\build\tools\Incrementer\lib\net452\Incrementer.dll"))
{
.\build\nuget.exe install Incrementer -OutputDirectory build\tools -ExcludeVersion
}
If (-not (Test... | michalkorecki/incrementer | build.ps1 | PowerShell | mit | 661 |
# Add the git SSH agent to the PATH to avoid "could not find ssh-agent"
$env:path += ";" + (Get-Item "Env:ProgramFiles(x86)").Value + "\Git\bin"
Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)
# Load posh-git module
Import-Module posh-git
Enable-GitColors
Pop-Location
Start-SshAgent -Quie... | bigfont/gitbook-posh | PoshProfile/My.PoshGitProfile.ps1 | PowerShell | mit | 701 |
function Start-FLDownload {
[CmdletBinding()]
Param (
[Parameter(ValueFromPipeline=$true)]
[ValidateNotNullOrEmpty()]
[PSTypeName('Filelist.Torrent')]
[System.Object[]]
$InputObject,
[Parameter()]
[String]
$Path = ('{0}\Downloads' -f $env:USERPROFI... | ionut-maxim/PSFilelist | PSFilelist/Public/Start-FLDownload.ps1 | PowerShell | mit | 810 |
function Update-RubrikModuleOption([string]$OptionType,[string]$OptionName,[string]$OptionValue,[string]$Action) {
<#
.SYNOPSIS
Retrieves the default parameter values and applies them globally
.DESCRIPTION
This function will retrieve the default parameter values from the users options file and apply t... | rubrikinc/PowerShell-Module | Rubrik/Private/Update-RubrikModuleOption.ps1 | PowerShell | mit | 8,185 |
function Clear-TravisBuild
{
[CmdletBinding()]
param(
[switch]$NuGetOnly
)
$clearArgs = @{
BuildFolder = $env:TRAVIS_BUILD_DIR
Configuration = $env:CONFIGURATION
IsCore = $true
NuGetOnly = $NuGetOnly
}
Clear-CIBuild @clearArgs
} | lordmilko/PrtgAPI | build/CI/Travis/Clear-TravisBuild.ps1 | PowerShell | mit | 294 |
class Person {
$FirstName
$LastName
[DateTime]$BirthDate
}
cls
$p = [Person]::new()
$p.FirstName = "John"
$p.LastName = "Doe"
$p.BirthDate = "2/28/70"
$p | Format-Table -AutoSize | dfinke/PowerShellCodeCampDemo | PSv5Demo/PSv5Demo03Properties.ps1 | PowerShell | apache-2.0 | 200 |
function Export-Excel {
<#
.Synopsis
.Example
gsv | Export-Excel .\test.xlsx
.Example
ps | Export-Excel .\test.xlsx -show\
.Example
ps | Export-Excel .\test.xlsx -WorkSheetname Processes -IncludePivotTable -Show -PivotRows Company -PivotData PM
.Exampl... | beni55/ImportExcel | Export-Excel.ps1 | PowerShell | apache-2.0 | 6,698 |
#
# Module manifest for module 'PSGet_AzureRM.Storage'
#
# 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
# CompatiblePSEdition... | devigned/azure-powershell | src/ResourceManager/Storage/AzureRM.Storage.psd1 | PowerShell | apache-2.0 | 6,089 |
$ErrorActionPreference = 'Stop'
$packageName = 'avidemux'
$url32 = Get-UrlFromFosshub 'https://www.fosshub.com/Avidemux.html/avidemux_2.6.14_win32.exe'
$url64 = Get-UrlFromFosshub 'https://www.fosshub.com/Avidemux.html/avidemux_2.6.14_win64.exe'
$checksum32 = '627b177ae388b782326a2cf1142551d96769f906afb367034d9a6f3b... | ebugusey/chocolatey-coreteampackages | automatic/avidemux/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 836 |
$packageName = '{{PackageName}}'
$installerType = 'exe'
$silentArgs = ''
$url = '{{PackageGuid}}'
$checksum = '{{Checksum}}'
$checksumType = 'sha256'
$validExitCodes = @(0)
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$silentArgs32 = "$toolsDir\chocolateyInstall32.xml"
$silentArgs64 = "$tool... | dtgm/chocolatey-packages | automatic/datacrow/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 1,782 |
# Copyright 2019 The Kubernetes Authors.
#
# 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 ... | fgimenez/kubernetes | cluster/gce/windows/k8s-node-setup.psm1 | PowerShell | apache-2.0 | 83,744 |
# 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/UsersAndGroups/Install-User.ps1 | PowerShell | bsd-3-clause | 2,391 |
@{
'0' = 'The request was accepted.'
'1' = 'The request is not supported.'
'2' = 'The user did not have the necessary access.'
'3' = 'The service cannot be stopped because other services that are running are dependent on it.'
'4' = 'The requested control code is not valid, or it is unacceptable... | claudiospizzi/Autonance | Autonance/Strings/Win32Service_StopService.psd1 | PowerShell | mit | 1,800 |
param($installPath, $toolsPath, $package, $project)
$fxPackage = Get-package | where-object { $_.id -eq "EPiServer.Framework"} | Sort-Object -Property Version -Descending | select-object -first 1
$cmsPackage = Get-package | where-object { $_.id -eq "EPiServer.Core"} | Sort-Object -Property Version -Descending| select-... | anjumrizwi/episerver | alloy/EPiServerAlloySite/packages/EPiServer.CMS.Core.9.7.3/tools/Install.ps1 | PowerShell | mit | 9,959 |
#region HEADER
# Integration Test Config Template Version: 1.2.0
#endregion
$configFile = [System.IO.Path]::ChangeExtension($MyInvocation.MyCommand.Path, 'json')
if (Test-Path -Path $configFile)
{
<#
Allows reading the configuration data from a JSON file,
for real testing scenarios outside of the C... | johlju/xSQLServer | tests/Integration/DSC_SqlRSSetup.config.ps1 | PowerShell | mit | 2,911 |
$packageName = 'kicad'
$installerType = 'exe'
$silentArgs = '/S'
$url = 'http://www2.futureware.at/~nickoe/kicad-product-r5978.591f54f-i686.exe'
$checksum = '0356b22d2452540b4889134fcd8f52fd7b2c6dda'
$checksumType = 'sha1'
$url64 = 'http://www2.futureware.at/~nickoe/kicad-product-r5978.591f54f-x86_64.exe'
$checksum64 =... | dtgm/chocolatey-packages | automatic/_output/kicad/2015.07.23.5978/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 946 |
$packageName = 'geany'
$installerType = 'exe'
$silentArgs = '/S'
$url = 'http://download.geany.org/geany-1.26_setup.exe'
$checksum = 'c27d5b14e5244bea540e89d0755d8d988e454638'
$checksumType = 'sha1'
$validExitCodes = @(0)
Install-ChocolateyPackage -PackageName "$packageName" `
-FileType "$ins... | dtgm/chocolatey-packages | automatic/_output/geany/1.26/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 593 |
$ErrorActionPreference = 'Stop'
$toolsPath = Split-Path $MyInvocation.MyCommand.Definition
$filePath32 = "$toolsPath\TortoiseSVN-1.9.5.27581-win32-svn-1.9.5.msi"
$filePath64 = "$toolsPath\TortoiseSVN-1.9.5.27581-x64-svn-1.9.5.msi"
$installFile = if ((Get-ProcessorBits 64) -and $env:chocolateyForceX86 -ne 'true') {
... | lennartb-/chocolatey-coreteampackages | automatic/tortoisesvn/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 844 |
#
# Module manifest for module 'HelpersHostCS'
#
@{
RootModule = 'HelpersHostCS.psm1'
ModuleVersion = '1.0'
GUID = '40a19c05-d765-41a1-995e-98ca5f247ee1'
CompanyName = 'Microsoft Corporation'
Copyright = 'Copyright (c) Microsoft Corporation.'
Description = 'Simple console host for console IO tests.'
FunctionsTo... | TravisEz13/PowerShell | test/tools/Modules/HelpersHostCS/HelpersHostCS.psd1 | PowerShell | mit | 392 |
# Umbraco.Build.psm1
#
# $env:PSModulePath = "$pwd\build\Modules\;$env:PSModulePath"
# Import-Module Umbraco.Build -Force -DisableNameChecking
#
# PowerShell Modules:
# https://msdn.microsoft.com/en-us/library/dd878324%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
#
# PowerShell Module Manifest:
# https://msdn.microso... | abryukhov/Umbraco-CMS | build/Modules/Umbraco.Build/Umbraco.Build.psm1 | PowerShell | mit | 16,840 |
Properties {
$base_dir = resolve-path .\..\..\
$packages_dir = "$base_dir\packages"
$build_artifacts_dir = "$base_dir\build"
$solution_name = "$base_dir\WebApiContrib.Formatting.Razor.sln"
$test_dll = "$build_artifacts_dir\WebApiContrib.Formatting.Razor.Tests.dll"
$nunit_runner = "$packages_dir\NUnit.Runners.2.6.... | damianh/WebApiContrib.Formatting.DotLiquid | tools/psake/default.ps1 | PowerShell | mit | 1,811 |
function New-OpenVasTask
{
<#
.Synopsis
Add a new Task to OpenVAS
.DESCRIPTION
Add a new Task to OpenVAS
Built with infomation from http://docs.greenbone.net/GSM-Manual/gos-4/en/omp.html#access-with-omp
See http://myworldofit.net/?p=10436 for detailed usage examples
.EXAMPLE
New-OpenVasTask -OmpPath "... | jamesfed/PSOpenVas | New-OpenVasTask.ps1 | PowerShell | mit | 2,268 |
$script:dscModuleName = 'xPSDesiredStateConfiguration'
$script:dscResourceName = 'DSC_xDSCWebService'
function Invoke-TestSetup
{
try
{
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
throw 'DscResource.Test module dependen... | PowerShell/xPSDesiredStateConfiguration | tests/Unit/DSC_xDSCWebService.Tests.ps1 | PowerShell | mit | 89,272 |
Install-ChocolateyZipPackage 'protoc' `
'https://github.com/google/protobuf/releases/download/v2.6.1/protoc-2.6.1-win32.zip' `
"$(Split-Path -parent $MyInvocation.MyCommand.Definition)" `
-checksum 'b057f86ef83835010bb227eb2d82de04' -checksumType 'md5' | keenbrowne/chocolatey-protoc | tools/chocolateyInstall.ps1 | PowerShell | mit | 255 |
# .ExternalHelp psPAS-help.xml
function Find-PASSafe {
[CmdletBinding()]
param(
[parameter(
Mandatory = $false,
ValueFromPipelinebyPropertyName = $false
)]
[string]$search,
[parameter(
Mandatory = $false,
ValueFromPipelineByPropertyName = $false
)]
[int]$TimeoutSec
)
BEGIN {
Assert-Ver... | pspete/psPAS | psPAS/Functions/Safes/Find-PASSafe.ps1 | PowerShell | mit | 1,280 |
Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) `
-ChildPath 'xSQLServerHelper.psm1') `
-Force
<#
.SYNOPSIS
Gets the specified Availabilty Group Replica from the specified Availabilty Group.
... | GoelPooja/xSQLServer | DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica.psm1 | PowerShell | mit | 30,895 |
# Sample script to install Python and pip under Windows
# Authors: Olivier Grisel, Jonathan Helmus and Kyle Kastner
# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
$MINICONDA_URL = "http://repo.continuum.io/miniconda/"
function DownloadMiniconda ($python_version, $platform_suffix) {
... | riadnassiffe/Simulator | src/tools/ecos/ecos-python/appveyor/install.ps1 | PowerShell | mit | 3,082 |
<#
.EXAMPLE
Example script that sets the paging file to reside on
drive C with the custom size 2048MB
#>
Configuration Example
{
param
(
[Parameter()]
[System.String[]]
$NodeName = 'localhost'
)
Import-DSCResource -ModuleName xComputerManagement
Node $NodeName
... | jaredhaight/WindowsAttackAndDefenseLab | WindowsAttackAndDefenseLab/DSC/UserDesktopConfig/xComputerManagement/Examples/xVirtualMemory/1-SetVirtualMemory.ps1 | PowerShell | mit | 526 |
function Initialize-TrackingVariable
{
if ($true -ne (Test-Path variable:Script:JobAttempts))
{
$script:JobAttempts = @()
$script:JobAttempts = {$script:JobAttempts}.Invoke()
}
if ($true -ne (Test-ExistsJSMProcessingStatus))
{
$script:JSMProcessingLoopStatus = @(); $script:JSMProce... | exactmike/poshRSJobFlowManager | Functions/Initialize-TrackingVariable.ps1 | PowerShell | mit | 653 |
#region Style Private Functions
function Add-PScriboStyle {
<#
.SYNOPSIS
Initializes a new PScribo style object.
#>
[CmdletBinding()]
param (
## Style name
[Parameter(Mandatory, ValueFromPipelineByProper... | kilasuit/PScribo | Src/Private/Style.Internal.ps1 | PowerShell | mit | 4,021 |
Get-Process Smss
if (-Not $?)
{
Return 1
}
Return 0
| SharpeRAD/Cake.Powershell | test/test.ps1 | PowerShell | mit | 58 |
Import-Module CanvasFunctions
### Set procedure variables
$table_name = "CANVAS_accounts"
$server_name = "SETON-SQL3"
$db_name = "canvas_sync"
$api_key = "3925~lTUMZwIlZTksziBGPfzcyWgFD107hHGqs6CInmD9HTqsoaPmEdCIHygBw13XeQ4j"
$headers = @{"Authorization"="Bearer "+$api_key}
### Initialize the SQL Text obj... | jrh0617/Canvas-to-SQL-Server-Powershell | accounts.ps1 | PowerShell | cc0-1.0 | 1,191 |
function RedirectConfigFile {
param([string] $sourcePath, [string] $targetPath)
if ($sourcePath -And (Test-Path $sourcePath)) {
Remove-Item -Force -Path $targetPath
New-Item -Path $targetPath `
-ItemType SymbolicLink `
-Value $sourcePath
... | sixeyed/docker-windows-workshop | docker/prod-config/save-handler/startup.ps1 | PowerShell | apache-2.0 | 628 |
# 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... | cloudoman/carbon | Carbon/IIS/Get-IisWebsite.ps1 | PowerShell | apache-2.0 | 2,236 |
$packageName = 'advor'
$url = 'https://sourceforge.net/projects/advtor/files/AdvOR-0.3.1.0/AdvOR-0.3.1.0.zip'
$checksum = '31ce6e5d4af6b132ae979ae8855a0ddb38f2da6b61f5cac17cd2fe128ec69d8f'
$checksumType = 'sha256'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$installDir = Join-Path $toolsDir ... | dtgm/chocolatey-packages | automatic/_output/advor/0.3.1.0/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 719 |
#-----------------------------------------------------------------------------#
# #
# File name EchoArgs.ps1 #
# #
# Descriptio... | JFLarvoire/SysToolsLib | PowerShell/EchoArgs.ps1 | PowerShell | apache-2.0 | 8,971 |
$packageName = 'firefox-nightly'
$installerType = 'exe'
$silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-'
$url = 'https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/firefox-60.0a1.en-US.win32.installer.exe'
$checksum = '4c537ee0615949f4c5004d3c8de6f9d149e62ed8ea01d806aba1bddce07a225e'
$c... | dtgm/chocolatey-packages | automatic/_output/firefox-nightly/60.0.1.2018020312/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 1,131 |
function Get-HumanTime($Seconds) {
if($Seconds -gt 0.99) {
$time = [math]::Round($Seconds, 2)
$unit = "s"
}
else {
$time = [math]::Floor($Seconds * 1000)
$unit = "ms"
}
return "$time$unit"
}
function Export-NUnitReport {
param (
[parameter(Mandatory=$true,Valu... | lholman/OneBuild | packages/pester.3.0.0-beta2/tools/Functions/TestResults.ps1 | PowerShell | apache-2.0 | 6,843 |
$packageName = 'git-annex'
$installerType = 'exe'
$silentArgs = '/S /D=C:\Program Files\Git'
$url = 'https://downloads.kitenet.net/git-annex/windows/current/git-annex-installer.exe'
$checksum = 'ea812aaa22e9b3174d0a80cf475a0002c04d1f40ee1b8dde08f301df3d21290b'
$checksumType = 'sha256'
$validExitCodes = @(0)
$scriptPat... | dtgm/chocolatey-packages | automatic/_output/git-annex/6.20170611/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 863 |
# Publishes our build assets to nuget, myget, 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 rely on... | orthoxerox/roslyn | src/Tools/MicroBuild/publish-assets.ps1 | PowerShell | apache-2.0 | 6,599 |
#region GET FUNCTION
function Get-TargetResource {
[CmdletBinding()]
[OutputType([HashTable])]
param (
[Parameter(Mandatory)][string]$Name,
[Parameter(Mandatory)][string]$ServiceName
)
$CurrentSubscription = Get-AzureSubscription -Current
Write-Verbose "The Azure subscription ID is $($CurrentSubscrip... | cyberious/puppetlabs-dsc | lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureQuickVM/MSFT_xAzureQuickVM.psm1 | PowerShell | apache-2.0 | 3,910 |
#Deploy-LGPO
$basePath = $PSScriptRoot
$installPath = "$env:ProgramData\AirWatch\LGPO"
function Extract-LGPO{
if((Test-Path $installPath) -eq $false){
md $installPath
}
Copy-Item "$basepath\LGPO.exe" -Destination "$installPath" -Force
}
function Main{
$basePath
Extract-LGPO
}
Main | vmwaresamples/AirWatch-samples | Windows-Samples/Tools & Utilities/Deploy LGPO.exe/Deploy-LGPO.ps1 | PowerShell | bsd-3-clause | 315 |
#!/usr/bin/env pwsh
<#
.SYNOPSIS
Executes ImageBuilder with the specified args.
.PARAMETER ImageBuilderArgs
The args to pass to ImageBuilder.
.PARAMETER ReuseImageBuilderImage
Indicates that a previously built ImageBuilder image is presumed to exist locally and that
it should be used for this execution of the scrip... | dotnet/dotnet-docker | eng/common/Invoke-ImageBuilder.ps1 | PowerShell | mit | 3,314 |
##############################################################################
#.SYNOPSIS
# Add a type accelerator to the current session.
#
#.DESCRIPTION
# The Add-TypeAccelerator function allows you to add a simple type accelerator
# (like [regex]) for a longer type (like [System.Text.RegularExpressions.Regex]).
#
#.... | ghostsquad/AetherCore | functions/Add-TypeAccelerator.ps1 | PowerShell | apache-2.0 | 1,847 |
function Find-DbaView {
<#
.SYNOPSIS
Returns all views that contain a specific case-insensitive string or regex pattern.
.DESCRIPTION
This function can either run against specific databases or all databases searching all user or user and system views.
.PARAMETER SqlInstance
The... | alevyinroc/dbatools | functions/Find-DbaView.ps1 | PowerShell | mit | 8,903 |
<#
Copyright 2016 Dominique Broeglin
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, soft... | devblackops/NetScaler | NetScaler/Public/Get-NSRewritePolicy.ps1 | PowerShell | apache-2.0 | 3,628 |
# Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'Memory Limits Test'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'Optionally disallow VMs from specifying... | vScripter/windows-docker-files | vester-ws-nano/Vester/Tests/VM/Memory-Limits.Vester.ps1 | PowerShell | mit | 1,141 |
# culture="en-US"
ConvertFrom-StringData @'
pluginActivity = Searching Datastores
pluginStatus = [{0} of {1}] {2}
Complete = completed
'@
| alanrenouf/vCheck-vSphere | Lang/en-US/79 Find VMs in Uncontrolled Snapshot Mode.psd1 | PowerShell | mit | 151 |
$PSScriptFilePath = (Get-Item $MyInvocation.MyCommand.Path);
$RepoRoot = (get-item $PSScriptFilePath).Directory.Parent.FullName;
$SolutionRoot = Join-Path -Path $RepoRoot "src";
$ToolsRoot = Join-Path -Path $RepoRoot "tools";
$DocFx = Join-Path -Path $ToolsRoot "docfx\docfx.exe"
$DocFxFolder = (Join-Path -Path $ToolsRo... | rasmusfjord/Umbraco-CMS | build/BuildDocs.ps1 | PowerShell | mit | 2,802 |
########################################################################
#
# Linux on Hyper-V and Azure Test Code, ver. 1.0.0
# Copyright (c) Microsoft Corporation
#
# All rights reserved.
# Licensed under the Apache License, Version 2.0 (the ""License"");
# you may not use this file except in compliance with the Lice... | bogdancarpusor/lis-test | WS2012R2/lisa/Infrastructure/Parse-Log.Perf_TCPing.ps1 | PowerShell | apache-2.0 | 4,575 |
$Global:GitMissing = $false
if (!(Get-Command git -TotalCount 1 -ErrorAction SilentlyContinue)) {
Write-Warning "git command could not be found. Please create an alias or add it to your PATH."
$Global:GitMissing = $true
return
}
$requiredVersion = [Version]'1.7.2'
if ((git --version 2> $null) -ma... | narnaud/terminus | settings/powershell/modules/posh-git/CheckVersion.ps1 | PowerShell | mit | 560 |
# Copyright (c) 2016 Microsoft Corporation. All Rights Reserved.
# Licensed under the MIT License (MIT)
Describe "Get-RsFolderContent" {
Context "Get folder with ReportServerUri parameter"{
# Create a folder
$folderName = 'SutGetFolderReportServerUriParameter' + [guid]::NewGuid()
New-RsFold... | warren2600/ReportingServicesTools | Tests/CatalogItems/Get-RsFolderContentTests.ps1 | PowerShell | mit | 3,953 |
############################################################################
### ###
### NUGET PACKAGE and PUBLISH ###
### ###
#######... | PureKrome/PushIt | NuGet Package and Publish.ps1 | PowerShell | mit | 6,870 |
Set-Location ..
Set-Location src
$path = &"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe
& $path /property:Configuration=Release
$projects = (Get-ChildItem . -Directory)
$projects | Format... | mbrenn/datenmeister-new | scripts/publish_nuget.ps1 | PowerShell | mit | 902 |
<##########################################
| ENABLE REAL-TIME STREAMING WITH FOREACH |
###########################################
All Versions
Classic foreach loops are the fastest loop available but they come with a severe limitation.
Foreach loops do not support streaming. You need to always wait for the entire ... | doomjaw87/P0w3rSh3ll | Examples/enable real-time streaming with foreach.ps1 | PowerShell | mit | 1,522 |
#iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
# Installs VS140COMNTOOLS
#choco install vcbuildtools -y
#dir "C:\Program Files (x86)\Microsoft Visual Studio 14.0" -Recurse
#[Environment]::SetEnvironmentVariable("VS140COMNTOOLS", 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\', 'Ma... | raghushantha/PSCI | Bootstrap.ps1 | PowerShell | mit | 718 |
#
# 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/tests/Model/Position.Tests.ps1 | PowerShell | mit | 968 |
<#
.NOTES
===========================================================================
Created on: 08.10.2015
Created by: David das Neves
Version: 0.1
Project: PSGUI
Filename: Internal_Start.ps1
===============================================... | ddneves/PSGUI | Project PSGUI/PSGUI/Dialogs/Internal/Internal_Start/Internal_Start.ps1 | PowerShell | mit | 623 |
$RDPEnable = 1
$RDPFirewallOpen = 1
$NLAEnable = 0
# Enable Remote Desktop Connections
$RDP = Get-WmiObject -Class Win32_TerminalServiceSetting -Namespace root\CIMV2\TerminalServices -Authentication PacketPrivacy
$Result = $RDP.SetAllowTSConnections($RDPEnable,$RDPFirewallOpen)
if ($Result.ReturnValue -eq 0... | cliveg/dtlartifacts | mdt/EnableRDP.ps1 | PowerShell | mit | 1,125 |
Function New-NinjaAuthroization {
<#
.SYNOPSIS
Generates the HMACSHA1 Signature for the API Request
.DESCRIPTION
Takes the requested portion of the API request as a string and the public and private keys and uses HMACSHA1 to generate a signature and then generates an Authorization to use ... | MaxAnderson95/PoSHNinjaRMM-Management | sources/Private/New-NinjaAuthorization.ps1 | PowerShell | mit | 1,732 |
#Requires -RunAsAdministrator
# A global variable that contains localized messages.
data LocalizedData
{
# culture="en-US"
ConvertFrom-StringData @'
ModuleParsingError=There was an error parsing the module file {0}
SchemaEncodingNotSupportedPrompt=The encoding for the schema file is not supported. Convert to Unicode?
... | brianehlert/PoSh.org-DSC | Tooling/cDscResourceDesigner/cDscResourceDesigner.psm1 | PowerShell | mit | 98,147 |
#Requires -Version 3
function Get-RubrikMount
{
<#
.SYNOPSIS
Connects to Rubrik and retrieves details on mounts for a VM
.DESCRIPTION
The Get-RubrikMount cmdlet will accept a VM id and return details on any mount operations that are active within Rubrik
Due to the nature o... | rubrikinc/PowerShell-Module | Rubrik/Public/Get-RubrikMount.ps1 | PowerShell | mit | 4,673 |
function Add-VSSageMakerEndpointConfigProductionVariant {
<#
.SYNOPSIS
Adds an AWS::SageMaker::EndpointConfig.ProductionVariant resource property to the template. Specifies a model that you want to host and the resources to deploy for hosting it. If you are deploying multiple models, tell Amazon SageMak... | scrthq/Vaporshell | VaporShell/Public/Resource Property Types/Add-VSSageMakerEndpointConfigProductionVariant.ps1 | PowerShell | apache-2.0 | 8,411 |
function Get-BoxstarterPackage {
<#
.SYNOPSIS
Retrieves metadata for all packages in the Local Boxstarter repository
or an individual package.
.DESCRIPTION
Get-BoxstarterPackage retrieves information about either a single package
or all packages in the Local Boxstarter repository if no PackageName
parameter is provide... | mwrock/boxstarter | Boxstarter.TestRunner/Get-BoxstarterPackage.ps1 | PowerShell | apache-2.0 | 1,735 |
$packageName = 'dolphin'
$url = 'https://dl.dolphin-emu.org/builds/dolphin-master-5.0-5499-x64.7z'
$checksum = 'dae7c31b2f95d225b190274ab0676d6dd32af453febd1c27cfb78d244c5ecd57'
$checksumType = 'sha256'
$url64 = $url
$checksum64 = $checksum
$checksumType64 = $checksumType
$toolsDir = "$(Split-Path -parent $MyInvocation... | dtgm/chocolatey-packages | automatic/_output/dolphin/5.0.5499/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 788 |
$packageName = 'git-annex'
$installerType = 'exe'
$silentArgs = '/S /D=C:\Program Files\Git'
$url = 'https://downloads.kitenet.net/git-annex/windows/current/git-annex-installer.exe'
$checksum = '841db1f017769e218636d90009043b72caff0806347f6dbec1cc345bae9df62e'
$checksumType = 'sha256'
$validExitCodes = @(0)
$scriptPat... | dtgm/chocolatey-packages | automatic/_output/git-annex/6.20160613/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 863 |
$pkg_name="hab-studio"
$pkg_origin="core"
$pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
$pkg_license=@("Apache-2.0")
$pkg_build_deps=@(
"core/powershell/$(Get-Content "$PLAN_CONTEXT/../../../POWERSHELL_VERSION")",
"core/hab",
"core/hab-plan-build-ps1",
"core/7zip")
$pkg_bin_dirs=@(
"... | habitat-sh/habitat | components/studio/habitat/plan.ps1 | PowerShell | apache-2.0 | 1,313 |
# 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/HostsFile/Remove-HostsEntry.ps1 | PowerShell | bsd-3-clause | 2,690 |
[cmdletbinding()]
param()
# Arrange.
. $PSScriptRoot\..\..\lib\Initialize-Test.ps1
. $PSScriptRoot\..\..\..\Tasks\PublishSymbols\Helpers.ps1
$symbolsFilePath = 'SomeDrive:\SomeSourceDir\SomeProject\SomeLibrary.pdb'
$sourceRootPath = 'SomeDrive:\SomeSourceDir'
$global:sourceFile1 = 'SomeDrive:\SomeSourceDir\SomeProject... | johnkattenhorn/vso-agent-tasks | Tests/L0/PublishSymbols/Get-SourceFilePaths.WarnsForSourceFileNotFound.ps1 | PowerShell | mit | 1,653 |
$script:ErrorActionPreference = "Stop"
$adminDomain = $userDomain
$adminName = $userName
$adminPassword = $userPassword
$sutVersion = $ptfpropSutVersion
$adminAccount = $adminName+"@"+$adminDomain
If($sutVersion -ge "ExchangeServer2010")
{
$securePassword = ConvertTo-SecureString $adminPassword -AsPlai... | XinwLi/Interop-TestSuites-1 | ExchangeActiveSync/Source/MS-ASCMD/Adapter/SUTControlAdapter/Implementation/GetMailboxFolderPermission.ps1 | PowerShell | mit | 1,424 |
$packageName = 'gajim'
$installerType = 'exe'
$silentArgs = '/S'
$url = 'http://gajim.org/downloads/0.16/gajim-0.16.2-1.exe'
$checksum = '7b3c0c43c19b8cc67c95457ef162a53c812e5d45'
$checksumType = 'sha1'
$validExitCodes = @(0)
Install-ChocolateyPackage -PackageName "$packageName" `
-FileType "$... | dtgm/chocolatey-packages | automatic/_output/gajim/0.16.2.1/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 596 |
# works on Microsoft Windows Server 2008 #carriage return
secedit /export /cfg c:\new.cfg #carriage return
#start-sleep -s 5 #carriage return
((get-content c:\new.cfg) -replace ('PasswordComplexity = 1', 'PasswordComplexity = 0')) | Out-File c:\new.cfg #carriage return
((get-content c:\new.cfg) -replace ('MinimumPasswo... | davidddw/imageBuilder | windows_2008_r2_en/scripts/disable-password-complexity.ps1 | PowerShell | apache-2.0 | 631 |
$ErrorActionPreference = "Stop"
$ProgressPreference = "SilentlyContinue"
$requestOpts = @{
Headers = If ($env:GITHUB_TOKEN) { @{ Authorization = "Bearer ${env:GITHUB_TOKEN}" } } Else { @{ } }
MaximumRetryCount = 3
RetryIntervalSec = 1
}
$arch = If ([Environment]::Is64BitOperatingSystem) { "64bit" } Else {... | exercism/xcpp | bin/fetch-configlet.ps1 | PowerShell | mit | 1,027 |
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$pkgDefContent = @"
; Visual Basic
[`$RootKey`$\Projects\{F184B08F-C81C-45f6-A57F-5ABD9991F28F}\FileExtensions\.coffee]
"DefaultBuildAction"="Content"
[`$RootKey`$\Projects\{F184B08F-C81C-45f6-A57F-5ABD9991F28F}\FileExtensions\.sass]
... | BluewireTechnologies/cassette | src/packages/SassAndCoffee.Core.2.0.2.0/tools/install.ps1 | PowerShell | mit | 2,049 |
function Update-PackagesConfig
{
param ($protectedModulesPath, $packageName)
# Validate that the package name parameter exists
if ($packageName -eq $null -or $packageName -eq "")
{
throw (New-Object ArgumentException("The package name was not specified."))
}
Function Update($packagesCo... | anjumrizwi/episerver | cms/packages/EPiServer.CMS.UI.Core.9.9.0/tools/Update-PackagesConfig.psm1 | PowerShell | mit | 10,512 |
<#
.SYNOPSIS
Downloads the VMworld 2017 US & Europe Breakout Session videos.
.DESCRIPTION
The VMworld 2017 Breakout Session video lists are downloaded from
William Lam's GitHub page (https://github.com/lamw/vmworld2017-session-urls).
The retrieved markdown files are parsed to identify the Sessi... | Dee76/getVmworld2017Videos | get-Vmworld2017Videos.ps1 | PowerShell | mit | 4,748 |
function Set-UnattendedYastAutoLogon
{
param (
[Parameter(Mandatory = $true)]
[string]$DomainName,
[Parameter(Mandatory = $true)]
[string]$Username,
[Parameter(Mandatory = $true)]
[string]$Password
)
$logonNode = $script:un.CreateElement('login_settings', $script:nsm.LookupNamespace('un'))
$autoL... | AutomatedLab/AutomatedLab | AutomatedLabUnattended/Private/Suse/Set-UnattendedYastAutoLogon.ps1 | PowerShell | mit | 572 |
Write-Host "Loading module envDSL..."
Get-ChildItem $PSScriptRoot -Include *.ps1 -Recurse | ForEach-Object { . $_.FullName }
function Invoke-EnvironmentSpecificScript {
[CmdletBinding(SupportsShouldProcess)]
param(
$ScriptName = (Split-Path -Leaf $MyInvocation.ScriptName),
[Parameter()]
... | wgross/envDSL | 1.0/envDSL.psm1 | PowerShell | mit | 2,138 |
function Get-vRACodeStreamVariable {
<#
.SYNOPSIS
Retrieve vRA Code Stream Variable depending on input
.DESCRIPTION
Retrieve a list of vRA Code Stream Variables or a single Variable depending on input
.PARAMETER Id
The ID of the vRA Code Stream Variable
.PARAMETER Variable
The name o... | jakkulabs/PowervRA | src/Functions/Public/codestream/Get-vRACodeStreamVariable.ps1 | PowerShell | mit | 3,495 |
<#PSScriptInfo
.VERSION 1.0
.GUID 24e89cf1-5696-499e-9e3c-e44df3a9948f
.AUTHOR Microsoft Corporation
.COMPANYNAME Microsoft Corporation
.COPYRIGHT (c) Microsoft Corporation. All rights reserved.
.TAGS DSCConfiguration
.LICENSEURI https://github.com/PowerShell/xActiveDirectory/blob/master/LICENSE
.PROJECTURI https://git... | jaredhaight/WindowsAttackAndDefenseLab | WindowsAttackAndDefenseLab/DSC/DomainConfig/xActiveDirectory/Examples/Resources/xADGroup/3-NewGroupMultidomainMembers_Config.ps1 | PowerShell | mit | 1,225 |
function Invoke-Install {
<#
.SYNOPSIS
Gets all *.install.ps1 and executes them
.DESCRIPTION
Gets all *.install.ps1 files and will execute them one by one
.PARAMETER Path
Path to the *.install.ps1 file/files
.PARAMETER Filter
... | mmattes/Invoke-Install | Source/Invoke-Install/Invoke-Install.ps1 | PowerShell | mit | 2,807 |
#!/usr/bin/env pwsh
Set-StrictMode -Version Latest
Set-Location (Split-Path $PSScriptRoot)
phpdoc --config=etc/phpdoc.xml
if (-not (Test-Path docs/api/images)) { New-Item docs/api/images -ItemType Directory | Out-Null }
Copy-Item doc/img/favicon.ico docs/api/images
mkdocs build --config-file=etc/mkdocs.yaml
| cedx/which.php | tool/doc.ps1 | PowerShell | mit | 310 |
<#
.SYNOPSIS
script for cleaning up user mailbox/journaling mailbox via scheduled task
.DESCRIPTION
this script was written to clean up journaling mailbox via scheduled task.
You can also use it to clean up every mailbox on your exchange system. Logfiles will be written next to the script
.EXAMPLE
fo... | blog-it-koehler-com/mailbox-cleanup.ps1 | mailbox-cleanup0-1.ps1 | PowerShell | mit | 5,521 |
#region Presentation Prep
<#
PowerShell Non-Monolithic Script Module Design
Presentation for the Research Triangle PowerShell Users Group - February 15th, 2017
Author: Mike F Robbins
Website: http://mikefrobbins.com
Twitter: @mikefrobbins
#>
#Safety in case the entire script is run instead of a selection
Start-Sle... | mikefrobbins/Presentations | RTPSUG February 2017/PowerShell Non-Monolithic Script Module Design.ps1 | PowerShell | mit | 19,190 |
<#
This script is fun from UMT_USB_Backup.ps1
#>
$global:IsUserIDCorrect = $NULL
$global:BackupUserID = $NULL
function global:UserIDCorrect{
If($global:IsUserIDCorrect -eq $NULL){
[console]::beep(2000,500)
[console]::beep(2000,500)
[console]::beep(2000,500)
Write-Host "UserID is n... | danijeljw/UDMT_v2.0 | UserIDCorrectCheck.ps1 | PowerShell | mit | 908 |
#
# Module manifest for module 'PSSitecoreHelix'
#
# Generated by: Patrick Barron
#
# Generated on: 4/10/2017
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'PSSitecoreHelix.psm1'
# Version number of this module.
ModuleVersion = '1.0.0'
# ID used to uniquely identify this mod... | patrickbarrn/PSSitecoreHelix | PSSitecoreHelix/PSSitecoreHelix.psd1 | PowerShell | mit | 3,324 |
#
# Functions
#
Function Get-VComputerName {
return [system.environment]::MachineName
}
Function Stop-WithWait {
Write-Host "Press any key to continue..."
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
exit
}
Function Assert-Administrator {
# Get the ID and security principa... | strotz/Strike | Scripts/World.psm1 | PowerShell | mit | 3,231 |
Get-PSDrive
help *common*
Get-Event
Get-Service -ComputerName (Get-Content .\computer.txt)
dir *.* -r -Exclude '*.exe'
add-pssnapin *vmware* | canadix/ch.canadix.PS.Scriplets | src/commands.ps1 | PowerShell | apache-2.0 | 150 |
$packageName = 'mweather.portable'
$url = 'http://www.nirsoft.net/utils/mweather.zip'
$checksum = 'eb36e3caf7e4b39b9cc010c776074eefcce10d2203fd2332cd9c7e46a101bcb1'
$checksumType = 'sha256'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$installFile = Join-Path $toolsDir "mweather.exe"
Install-... | dtgm/chocolatey-packages | automatic/_output/mweather.portable/1.75/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 650 |
function Update-RegistryDword
{
param
(
[string] $RegistryPath,
[string] $Name,
[string] $Value
)
IF(!(Test-Path $registryPath))
{
New-Item -Path $registryPath -Force | Out-Null
}
New-ItemProperty -Path $registryPath -Name $name -Value $value -PropertyType DWORD -Force | O... | iamkarlson/dotfiles | powershell/autorun/Update-RegistryDword.ps1 | PowerShell | bsd-2-clause | 329 |
Import-Module -Force "..\powerview.ps1"
# Unit tests for PowerView domain query and trust cmdlets
# These tests are currently linked to the way I have a test domain set up
# proper mocking will be done later...
# Find-ForeignUser and Find-ForeignGroup definitely need proper mocking
$ForeignDomain = 'testlab.loca... | leechristensen/PowerTools | PowerView/Tests/domain.info.tests.ps1 | PowerShell | bsd-3-clause | 6,019 |
#requires -Version 1.0 -RunAsAdministrator
<#
.SYNOPSIS
Setup the default enaTec Start Menu for the System
.DESCRIPTION
Setup the default enaTec Start Menu for the System
.EXAMPLE
PS C:\> .\Set-SystemStartMenuDefault.ps1
.NOTES
Minor Helper
Version 1.0.0
... | jhochwald/PowerShell-collection | Windows10-Bootstrapper/sources/$OEM$/$1/scripts/PowerShell/Set-SystemStartMenuDefault.ps1 | PowerShell | bsd-3-clause | 22,957 |
<#
/********************************************************
* *
* © Microsoft. All rights reserved. *
* *
*********************************************************/
.SYNOPSIS
Gets the... | Azure/elastic-db-tools | Samples/PowerShell/GetSplitMergeHistory.ps1 | PowerShell | mit | 4,151 |
function Invoke-DbaDbPiiScan {
<#
.SYNOPSIS
Command to return any columns that could potentially contain PII (Personal Identifiable Information)
.DESCRIPTION
This command will go through the tables in your database and assess each column.
It will first check the columns names if it ... | kozloski/dbatools | functions/Invoke-DbaDbPiiScan.ps1 | PowerShell | mit | 20,763 |
<#
.DESCRIPTION
This example shows how to configure two SQL Server instances on the same
server to have the setting 'priority boost' enabled.
.NOTES
To get all available options run sp_configure on the SQL Server instance,
or refer to https://msdn.microsoft.com/en-us/library/ms1... | johlju/xSQLServer | source/Examples/Resources/SqlConfiguration/2-ConfigureInstanceToEnablePriorityBoost.ps1 | PowerShell | mit | 711 |
param($installPath, $toolsPath, $package, $project)
Write-Host $installPath
Write-Host $toolsPath
$configPath = ($project.FullName | split-path) + '/docfx.json';
# Set content to be relative path of docfx.json
$content = ($installPath -replace '\\','/')+ "/content/**";
$root = $project.FullName | split-path
$current ... | sergey-vershinin/docfx | src/nuspec/msdn.4.5.2/tools/uninstall.ps1 | PowerShell | mit | 1,498 |
data LocalizedData
{
# culture="en-US"
ConvertFrom-StringData @'
SetTargetResourceInstallwhatIfMessage=Trying to create AppPool "{0}".
SetTargetResourceUnInstallwhatIfMessage=Trying to remove AppPool "{0}".
AppPoolNotFoundError=The requested AppPool "{0}" is not found on the target machine.
AppPoolDiscov... | smurawski/chefconf2015_dsc | Modules/ChefConfSamples/DSCResources/ChefConf_AppPool/ChefConf_AppPool.psm1 | PowerShell | mit | 51,034 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.