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
param($installPath, $toolsPath, $package, $project) # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' # Grab the loaded MSBuild project for the project $msbuild = [Microsoft.Build.Evaluatio...
wadewegner/BeerStation
ref/BeerStation/packages/Microsoft.Bcl.Build.1.0.8/tools/Uninstall.ps1
PowerShell
apache-2.0
700
# psake # Copyright (c) 2010 James Kovacs # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, ...
deltatre-webplu/NEventStore.Persistence.MongoDB
build/psake.psm1
PowerShell
mit
25,682
Param( # comma- or semicolon-separated list of Chocolatey packages. [ValidateNotNullOrEmpty()] [Parameter(Mandatory=$True)] [string] $packageList ) Function Get-TempPassword() { Param( [int]$length=10, [string[]]$sourcedata ) For ($loop=1; $loop -le $length; $loop++) { ...
sogeti/AzureDevTestBrowserLabArtifacts
browserlabartifacts/windows-safari/startChocolatey.ps1
PowerShell
mit
1,618
#********************************************************* # # Copyright (c) Microsoft. All rights reserved. # This code is licensed under the MIT License (MIT). # This code is licensed under the MIT License (MIT). # THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF # ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY ...
oldnewthing/Windows-universal-samples
archived/StreamSocket/js/server/setupserver.ps1
PowerShell
mit
3,268
# Simple powershell (built-in to Win7/8/10) utility script # to compute sha256 (or md5, sha1 or sha512) of a file # # Usage: # C:\> powershell # PS .\Get-Hash filename.ext [sha|md5|sha256|sha512] # # May require: Control Panel/System/Admin/Windows Power Shell Modules, then: Set-Executionpolicy RemoteSigned # # Based o...
Ianonn21/vm-utils
scripts/Get-Hash.ps1
PowerShell
mit
872
<# .SYNOPSIS Gets reader mode. .DESCRIPTION Gets the reader mode for all readers or the reader mode for a single reader if a panel id and reader id is specified. If the result returns null, try the parameter "-Verbose" to get more details. .EXAMPLE Get-ReaderMode .LINK https://gi...
erwindevreugd/PSDataConduIT
PSDataConduIT/Public/Get-ReaderMode.ps1
PowerShell
mit
2,699
BuildTearDown { throw "forced error" } Task default -depends Compile,Test,Deploy Task Compile { "Compiling;" } Task Test -depends Compile { "Testing;" } Task Deploy -depends Test { "Deploying;" }
psake/psake
specs/buildteardown_failure_should_fail.ps1
PowerShell
mit
216
Function Get-HostsFile { <# .SYNOPSIS Split out the windows HOST file and converts it into a custom object .DESCRIPTION Split out the windows HOST file and converts it into a custom object .PARAMETER InputFile Use an alternative file instead of the default .EXAMPLE...
My-Random-Thoughts/Various-Code
Get-HostsFile.ps1
PowerShell
mit
1,425
$Public = @(Get-ChildItem -Recurse -Path $PSScriptRoot\Public\*.ps1 -ErrorAction SilentlyContinue) $Private = @(Get-ChildItem -Recurse -Path $PSScriptRoot\Private\*.ps1 -ErrorAction SilentlyContinue) foreach ($import in @($Public + $Private)) { try { . $import.fullname } catch { Write-Erro...
DomBros/DomBrosTools
DomBrosTools/DomBrosTools.psm1
PowerShell
mit
438
Write-Host -Object 'Installing ISESteroids' $version = $PSVersionTable.PSVersion.Major if ($version -lt 3) { Write-Warning 'ISESteroids requires PowerShell 3 or better.' Write-Warning "Your current PowerShell version is $version." return } $isepath = Join-Path -Path $pshome -ChildPath 'powershell_ise.exe' $is...
lweniger/PowerShell
Modules/downloaded/powershellgallery/ISESteroids/install.ps1
PowerShell
mit
13,143
#Requires -Version 3.0 . "$($PSScriptRoot)\..\..\TestInitialize.ps1" Describe 'New-SPClientContentType' { Context 'Success' { Context 'Site Content Type' { AfterEach { try { $Web = $SPClient.ClientContext.Site.OpenWebById($SPClient.TestConfig.WebId) ...
karamem0/SPClient
source/SPClient.Tests/functions/SPClientContentType/New-SPClientContentType.Tests.ps1
PowerShell
mit
5,851
function Set-DbaDbCompression { <# .SYNOPSIS Sets tables and indexes with preferred compression setting. .DESCRIPTION This function sets the appropriate compression recommendation, determined either by using the Tiger Team's query or set to the CompressionType parameter. ...
SirCaptainMitch/dbatools
functions/Set-DbaDbCompression.ps1
PowerShell
mit
19,148
param ( [Parameter(Mandatory=$true)] [string] $VmName, [string] $HostName = 'localhost', [int] $ProcessorCount = 1, [long] $MemorySize = 2GB, [string] $VmAdminUserName, [securestring] $VmAdminPassword ) Configuration HostConfiguration { param ( [Parameter(Ma...
igoravl/MyDemos
2019-04-12_MvpConf2019/Scripts/WebServerVm.ps1
PowerShell
mit
3,747
# # File: Urasandesu.Prig.psd1 # # Author: Akira Sugiura (urasandesu@gmail.com) # # # Copyright (c) 2012 Akira Sugiura # # This software is MIT License. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Sof...
urasandesu/Prig
Urasandesu.Prig.VSPackage/tools/Urasandesu.Prig/Urasandesu.Prig.psd1
PowerShell
mit
3,563
Function Get-ConfigurationData { [CmdletBinding()] [OutputType([hashtable])] Param ( [Parameter(Mandatory)] [Microsoft.PowerShell.DesiredStateConfiguration.ArgumentToConfigurationDataTransformation()] [hashtable] $ConfigurationData ) return $ConfigurationData } ...
pvs043/cMDTBuildLab
src/Public/Get-ConfigurationData.ps1
PowerShell
mit
321
$systemUnderTest = ( Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '\.Tests\.', '.' $filePath = Join-Path -Path $CI_MODULE_LIB_PATH -ChildPath 'ArmorTypes.ps1' . $filePath $class = $systemUnderTest.Split( '.' )[0] $describe = $Global:FORM_CLASS -f $class Describe -Name $describe -Tag 'Class', $class -Fixtu...
tlindsay42/ArmorPowerShell
tests/lib/ArmorAccount.Tests.ps1
PowerShell
apache-2.0
6,414
#Requires -Version 5.1 Set-StrictMode -Version 'Latest' & (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-Test.ps1' -Resolve) Describe 'Add-Table' { BeforeEach { Start-RivetTest $Global:Error.Clear() } AfterEach { Stop-RivetTest } It 'should...
RivetDB/Rivet
Test/Add-Table.Tests.ps1
PowerShell
apache-2.0
6,624
#Requires -Version 5.0 #Requires -Module NetScaler enum Ensure { Absent Present } [DscResource()] class LBVirtualServer { [DscProperty(key)] [string]$Name [DscProperty()] [Ensure]$Ensure = [Ensure]::Present [DscProperty(Mandatory)] [string]$NetScalerFQDN [DscProperty(Mandatory)]...
devblackops/POSHOrigin_NetScaler
POSHOrigin_NetScaler/POSHOrigin_NetScaler.psm1
PowerShell
apache-2.0
22,895
$packageName = 'digikam' $installerType = 'exe' $silentArgs = '/S' $url = 'http://download.kde.org/stable/digikam/digiKam-5.5.0-01-Win32.exe' $checksum = '1a8e4fc6eeff6fb7684986dd4afa10f535ea6590336d6d717561905cdd56d803' $checksumType = 'sha256' $url64 = 'http://download.kde.org/stable/digikam/digiKam-5.5.0-01-Win64.e...
dtgm/chocolatey-packages
automatic/_output/digiKam/5.5.0.01/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
991
# # Module manifest for module 'Microsoft.Azure.Commands.ServerManagement' # # Generated by: Microsoft Corporation # @{ # Version number of this module. ModuleVersion = '2.2.0' # ID used to uniquely identify this module GUID = '644e6769-1030-4b92-a23d-ec58e9ebf3aa' # Author of this module ...
nemanja88/azure-powershell
src/ResourceManager/ServerManagement/AzureRM.ServerManagement.psd1
PowerShell
apache-2.0
3,360
# 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 ...
pshdo/LibGit2.PowerShell
.whiskey/Functions/Use-CallerPreference.ps1
PowerShell
apache-2.0
4,842
configuration present { Import-DscResource -ModuleName GraniResource cTopShelf hoge { ServiceName = "SampleTopShelfService" Path = (Resolve-Path "..\..\SampleTopShelfService\SampleTopShelfService\bin\Debug\SampleTopShelfService.exe").Path Ensure = "Present" } } present Start-Ds...
guitarrapc/GraniResource
Tests/Grani_TopShelf/Configuration/Present/cTopShelf.ps1
PowerShell
mit
379
$fileScreen = @{ Path = $ENV:Temp Description = 'Integration Test' Ensure = 'Present' Active = $false IncludeGroup = [System.Collections.ArrayList]@( 'Audio and Video Files','Executable Files','Backup Files' ) Template = (Get-FSRMFileScreenTemplate | Se...
PlagueHO/cFSRM
Tests/Integration/DSR_FSRMFileScreenException.config.ps1
PowerShell
mit
1,051
$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" { [array]$params = ([Management.Automation.CommandMetaD...
wsmelton/dbatools
tests/Get-DbaRunningJob.Tests.ps1
PowerShell
mit
713
function Get-TargetResource { [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param ( [Parameter(Mandatory = $true)] [System.String] $LogPath, [Parameter(Mandatory = $true)] [System.UInt32] $LogSpaceInGB, [Parameter()] ...
jpogran/puppetlabs-dsc
lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/MSFT_SPDiagnosticLoggingSettings.psm1
PowerShell
apache-2.0
8,555
$packageName = 'wipefree' $url = 'http://www.pc-tools.net/files/win32/freeware/wpfree10.zip' $checksum = '75f4ebb4246d721afe6d6689e8d01d6e8063c2b9' $checksumType = 'sha1' $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $installFile = Join-Path $toolsDir "$($packageName).exe" Install-ChocolateyZi...
dtgm/chocolatey-packages
automatic/_output/wipefree/1.0.0/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
711
configuration Sample_cWebsite_NewWebsite { param ( # Target nodes to apply the configuration [string[]]$NodeName = 'localhost', # Name of the website to create [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [String]$WebSiteName, # Source P...
PowerShellOrg/cWebAdministration
Examples/Sample_cWebsite_NewWebsite.ps1
PowerShell
mit
4,644
if (($args.Count -eq 0) -or ($args[0] -match 'Nightly')) { $TestType = 'Nightly' $CONFIGURATION = 'Release' } elseif ($args[0] -match 'Rolling') { $TestType = "Rolling" $CONFIGURATION = 'Debug' } else { Write-Host 'Please choose Nightly Test or Rolling Test!' -ForegroundColor Red ...
pysco68/odata.net
build.ps1
PowerShell
mit
13,389
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org...
arcadiahlyy/azure-powershell
src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.ps1
PowerShell
apache-2.0
43,655
 $MyPath = Split-Path $MyInvocation.MyCommand.Path $AWSPath = 'D:\Nana\Official\AWS' $ModulesFolder = 'D:\Nana\Content\Modules' $BakeryFolder = 'D:\Nana\Content\BakeryWebsite' $KeyFilePath = 'D:\Nana\Official\AWS\NanasTestKeyPair.pem' #endregion Initialization . "$MyPath\Install-WMF.ps1"
nanalakshmanan/DemoPrep
0-CommonInit.ps1
PowerShell
mit
292
import-module au # cd .\copyfilename $releases = 'http://www.bullzip.com/download.php' function global:au_SearchReplace { @{ 'tools\chocolateyInstall.ps1' = @{ "(^[$]url32\s*=\s*)('.*')" = "`$1'$($Latest.URL32)'" "(^[$]checksum32\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'" ...
sippi90/chocolateyautomaticpackages
copyfilename/update.ps1
PowerShell
mit
749
Function Get-TfsHttpClient { Param ( [Parameter(Mandatory=$true, Position=0)] [string] $Type, [Parameter()] [object] $Collection ) Process { $tpc = Get-TfsTeamProjectCollection -Collection $Collection return Invoke-GenericMethod -InputObject $tpc -MethodNa...
GersonDias/tfscmdlets
TfsCmdlets/TfsCmdlets/ObjectHelper/Get-TfsHttpClient.ps1
PowerShell
mit
359
$t = '[DllImport("user32.dll")] public static extern bool ShowWindow(int handle, int state);' add-type -name win -member $t -namespace native [native.win]::ShowWindow(([System.Diagnostics.Process]::GetCurrentProcess() | Get-Process).MainWindowHandle, 0) $Serverip="192.168.1.130" $filename = "C:\count....
wkleinhenz/PowerShell-Botnet
update.ps1
PowerShell
mit
9,649
#Clear Console cls #*** Initialize variables Write-Host "Initialize variables" Write-Host " " [string]$graphApp_AppId = "APPLICATION_ID" [string]$graphApp_AppSecret = "APPLICATION_SECRET" [string]$tenantId="TENANT_ID" [string]$spAdminURL = "SPADMIN_URL" [string]$graphVer = "v1.0" #Credetential iformation to be used...
MikkoKoskinen/SP-Poweshell
ConnectToGraph/ConnectToGraph.ps1
PowerShell
mit
2,921
<# .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/Get-ServiceBasicSecurity.ps1
PowerShell
mit
1,929
## ===================================================================== ## Title : Get-IEXLastSendAndReceivedDate ## Description : Retrieve the newest/oldest email item dates for each mailbox ## Author : Idera ## Date : 09/15/2009 ## Input : Get-IEXLastSendAndReceivedDate [[-Server] <String>] #...
borkit/scriptdump
PowerShell/Working/IderaPowerShellScripts/Idera_ExchangeScripts/Get-IEXLastSendAndReceivedDate.ps1
PowerShell
mit
2,050
param( [ValidateSet('Build', 'Pack', 'Clean')] [string]$Target = 'Build', [ValidatePattern("\d+\.\d+\.\d+(-\w*)?")] [string]$Version = "2.0.1" ) $BuildConfig = 'Release' #$year = Get-Date -Format "yyyy" $SolutionPath = Resolve-path Build.proj $out = Join-Path (Resolve-Path .) bin #reg...
VisualOn/vo.ext
build.ps1
PowerShell
mit
1,932
[CmdletBinding()] param( [Parameter(Mandatory)][string] $ConfigLocation, [Parameter(Mandatory)][string] $DirectoryToPackage, [Parameter(Mandatory)][string] $InstallerName, [Parameter(Mandatory)][string] $PfxLocation, [Parameter(Mandatory)][string] $PfxPassword ) choco install winrar -y $startLocat...
dibble-james/VSO
Build/CreateSelfExtractingInstaller.ps1
PowerShell
mit
664
<# .SYNOPSIS Closes an open WiFi handle .Parameter ClientHandle Specifies the object that represents the open WiFi handle. #> function Remove-WiFiHandle { [OutputType([void])] [CmdletBinding()] param ( [Parameter()] [System.IntPtr] $ClientHandle ) ...
jcwalker/WiFiProfileManagement
Private/Remove-WiFiHandle.ps1
PowerShell
mit
672
$toolsPath = "${env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools" $env:path += ';' + $toolsPath xsd.exe 'DeviceInformation.xsd' /classes /namespace:TpiProgrammer.Model.Devices Move-Item 'DeviceInformation.cs' 'DeviceInformation.xsd.cs' -Force
ciniml/TpiProgrammer
TpiProgrammer/Model/Devices/GenerateSchemaClasses.ps1
PowerShell
mit
270
function New-WikiSpace { <# .SYNOPSIS Create a new blank space in your Confluence instance. .DESCRIPTION Create a new blank space. Key and Name mandatory, Description recommended. .EXAMPLE New-WikiSpace -Key 'TEST' -Name 'Test Space' Create the new blank space. Runs Set-WikiInfo first...
brianbunke/ConfluencePS
ConfluencePS/Public/New-WikiSpace.ps1
PowerShell
mit
2,121
# # Module manifest for module 'Git.PS' # # Generated by: andre # # Generated on: 12/28/2015 # @{ # Script module or binary module file associated with this manifest. RootModule = 'GitPS.psm1' # Version number of this module. ModuleVersion = '0.1' # ID used to uniquely identify this module GUID = '5280b029-14ed-42f...
AndrewGaspar/Git.PS
GitPS/GitPS.psd1
PowerShell
mit
3,297
#requires -Version 3 function Get-RubrikHost { <# .SYNOPSIS Retrieve summary information for all hosts that are registered with a Rubrik cluster. .DESCRIPTION The Get-RubrikHost cmdlet is used to retrive information on one or more hosts that are being protected with the Rubrik Backup Service ...
rubrikinc/PowerShell-Module
Rubrik/Public/Get-RubrikHost.ps1
PowerShell
mit
5,239
$packageName = 'firefox-nightly' $softwareVersion = '50.0.1.2016062312-alpha' -Replace "^(\d+)\.(\d+)\.(\d+)[^-]+-([a-z]).*",'$1.$2$4$3' $softwareName = "Nightly $softwareVersion*" $installerType = 'exe' $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' $validExitCodes = @(0) [array]$key = Get-UninstallRe...
dtgm/chocolatey-packages
automatic/_output/firefox-nightly/50.0.1.2016062312/tools/chocolateyUninstall.ps1
PowerShell
apache-2.0
820
 $GLOBAL_scriptExitCode = 0 . "$PSScriptRoot\Common.ps1" Start-ScriptLog "SP-Binaries-Pre-Patch" import-module storage $SPConfigSilentName = "SPConfigCustom.xml" $SPConfigSilent = " <Configuration> <Package Id=""sts""> <Setting Id=""LAUNCHEDFROMSETUPSTS"" Value=""Yes"" /> </Package> <Package Id=""spswfe"...
gilroyneil/SP-Azure
Extensions/SPBinariesPrePatch.ps1
PowerShell
apache-2.0
10,133
$toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" $orcaExe = Get-Item "$toolsDir/Orca.exe" Install-StartMenuLink -LinkName "Orca MSI Editor" -TargetPath $orcaExe ` -WorkingDirectory $toolsDir
episource/my-chocolatey
orca/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
220
# # Module manifest for module 'Az.CognitiveServices' # # Generated by: Microsoft Corporation # # Generated on: 3/9/2018 # @{ # Script module or binary module file associated with this manifest. # RootModule = '' # Version number of this module. ModuleVersion = '0.5.0' # Supported PSEditions CompatiblePSEditions = ...
AzureAutomationTeam/azure-powershell
src/ResourceManager/CognitiveServices/Commands.Management.CognitiveServices/Az.CognitiveServices.psd1
PowerShell
apache-2.0
5,030
function New-VSApiGatewayMethod { <# .SYNOPSIS Adds an AWS::ApiGateway::Method resource to the template. The AWS::ApiGateway::Method resource creates API Gateway methods that define the parameters and body that clients must send in their requests. .DESCRIPTION Adds an AWS::ApiGateway::Metho...
scrthq/Vaporshell
VaporShell/Public/Resource Types/New-VSApiGatewayMethod.ps1
PowerShell
apache-2.0
22,915
function Compare-Hashes { param ( [string]$my_path = "$PSScriptRoot", [string]$reg_chksum = '\bchecksum\b', [string]$checksumType = '\bchecksumType\b' ) $global:au_force=$gud = $false; $current_checksumType = (gi "$my_path\tools\chocolateyInstall.ps1" | sls $checksumType) -split "=|'" | Select -Last 1 -Skip 1 $c...
chocolatey/chocolatey-coreteampackages
automatic/cutepdf/update_helper.ps1
PowerShell
apache-2.0
2,332
# # Module manifest for module 'PSGet_AzureRM.Media' # # Generated by: Microsoft Corporation # # Generated on: 8/7/2017 # @{ # Script module or binary module file associated with this manifest. # RootModule = '' # Version number of this module. ModuleVersion = '0.7.4' # Supported PSEditions # CompatiblePSEditions ...
hungmai-msft/azure-powershell
src/ResourceManager/Media/AzureRM.Media.psd1
PowerShell
apache-2.0
4,634
[cmdletbinding()] param() # Arrange. . $PSScriptRoot\..\..\lib\Initialize-Test.ps1 . $PSScriptRoot\..\..\..\Tasks\Gulp\Helpers.ps1 # Act. $actual = Format-ArgumentsParameter -GulpFile 'Some gulp file' -Arguments 'Some arguments' -Targets 'Some targets' # Assert. Assert-AreEqual -Expected 'Some targets --gulpfile "So...
jwendl/vso-agent-tasks
Tests/L0/Gulp/Helpers.ArgumentsWithTargets.ps1
PowerShell
mit
366
# ---------------------------------------------------------------------------------- # # 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...
juvchan/azure-powershell
src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/CertificateTests.ps1
PowerShell
apache-2.0
7,755
[CmdletBinding(DefaultParameterSetName = 'None')] param ( [String] [Parameter(Mandatory = $true)] $connectedServiceName, [String] [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] $TestSettings, [String] [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] $TestDrop, [String] [...
danielcweber/vso-agent-tasks
Tasks/RunLoadTest/Start-CloudLoadTest.ps1
PowerShell
mit
13,110
 $tenantId = Read-Host -Prompt “Azure AD Tenant ID” $appId = Read-Host -Prompt “Azure AD Application ID” # prompt for a certificate, you could substitue this with asking for a certificate thumbpring $cert = ( Get-ChildItem Cert:\CurrentUser\My | Out-GridView ` ...
brentstineman/PersonalStuff
PowerShell/ServicePrinciple/UseServicePrinciple.ps1
PowerShell
mit
727
function Get-EXRTestAccessToken{ [CmdletBinding()] param( [Parameter(Position=0, Mandatory=$true)] [string]$MailboxName, [Parameter(Position=0, Mandatory=$false)] [switch]$beta, [Parameter(Position=0, Mandatory=$false)] [String]$Prompt, [Parameter(Position=0, Mandatory=$false)] ...
gscales/Exch-Rest
functions/oAuth/Get-EXRTestAccessToken.ps1
PowerShell
mit
992
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { # Fix case when both the Windows and Linux builds of Node # are installed in the same directory $exe=".exe" } $ret=0 if (Test-Path "$basedir/node$exe") { # Suppor...
goessner/v2
node_modules/.bin/markdown-it.ps1
PowerShell
mit
845
using module PSPacker Class WindowsBox : Box { WindowsBox() { $mytype = $this.GetType() if ($mytype -eq [WindowsBox]) { throw("Class $mytype is abstract and must be implemented") } } }
labmonkey42/PSPacker-Windows
WindowsBox.psm1
PowerShell
mit
244
$PackageDefinition = @{ "TemplateName" = "neo4j-community-v3.1"; "PackageName" = "neo4j-community"; "PackageVersion" = "3.2.10"; "DownloadURL" = "http://neo4j.com/artifact.php?name=neo4j-community-3.2.10-windows.zip"; "MD5Checksum" = "8f7e630c2a8f7e64929f5c4ed7051773"; "NeoZipSubdir" = "neo4j-community-3.2....
glennsarti/neo4j-community-chocolatey
templates/package-neo4j-community-3.2.10.ps1
PowerShell
mit
529
<# MIT License Copyright (c) 2017 fvanroie 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, ...
fvanroie/PS_OPNsense
Public/Legacy/Reset-OPNsenseConfig.ps1
PowerShell
mit
5,026
@{ # Script module or binary module file associated with this manifest. ModuleToProcess = 'RipGrep.psm1' # Version number of this module. ModuleVersion = '0.0.0.1' # ID used to uniquely identify this module GUID = '31fd4961-0e83-40ba-bc7f-8aa93ba85c73' # Author of this module Author ...
DustinVenegas/dotfiles
powershell-modules/RipGrep/RipGrep.psd1
PowerShell
mit
1,786
<# These integration tests are the easiest way to effectively test the Import-Certificate and Import-PfxCertificate cmdlets due to the use of .NET objects to perform the work. These tests are potentially destructive tests and so should not be considered unit tests. #> #region HEADER $script:projec...
PowerShell/xCertificate
tests/Integration/CertificateDsc.Common.Tests.ps1
PowerShell
mit
12,241
#Requires -Version 3.0 Param( [string] [Parameter(Mandatory=$true)] $ResourceGroupLocation, [string] $ResourceGroupName = 'Esfa.Vacancy.Register', [switch] $UploadArtifacts, [string] $StorageAccountName, [string] $StorageContainerName = $ResourceGroupName.ToLowerInvariant() + '-stageartifacts', ...
SkillsFundingAgency/vacancy-register-api
src/Esfa.Vacancy.Azure.Resources/Deploy-AzureResourceGroup.ps1
PowerShell
mit
6,817
# Sort-Object Multiple Properties # <# I have a custom array that I want to sort by property A first descending, and then sort by property B with default ascending. If I do $ARRAY | Sort-Object -Property PROP_A, PROP_B it works fine, but I want PROP_A to be sorted in reverse. Apparently the -Descending switch is a...
doomjaw87/P0w3rSh3ll
Examples/sort-object multiple properties use descending first.ps1
PowerShell
mit
775
$here = $PSScriptRoot $modulePath = "$here\..\..\.." $moduleName = Split-Path -Path $modulePath -Leaf InModuleScope $moduleName { $eseConnection = [DSCPullServerESEConnection]::new() $eseConnection.Index = 0 $eseConnection.Active = $true $sqlConnection = [DSCPullServerSQLConnection]::new() $sqlCo...
bgelens/DSCPullServerAdmin
DSCPullServerAdmin/tests/Unit/public/Get-DSCPullServerAdminRegistration.tests.ps1
PowerShell
mit
18,342
<# .SYNOPSIS Unregister an Autonance extension. .DESCRIPTION This function removes a registered Autonance extension from the current session. .EXAMPLE PS C:\> Unregister-AutonanceExtension -Name 'WsusReport' Unregister the Autonance extension calles WsusReport. ...
claudiospizzi/Autonance
Autonance/Functions/Extension/Unregister-AutonanceExtension.ps1
PowerShell
mit
905
# # Module manifest for module 'Invoke-Parallel' # # Generated by: psott # # Generated on: 2017-04-13 # @{ # Script module or binary module file associated with this manifest ModuleToProcess = 'Invoke-Parallel.psm1' # Version number of this module. ModuleVersion = '1.0.0.0' # ID used to uniquely identify this modul...
psott/Invoke-Parallel
Invoke-Parallel/Invoke-Parallel.psd1
PowerShell
mit
2,536
#!/usr/bin/pwsh try{ Write-Host "Installing kerberos client (krb5-user)" -ForegroundColor DarkGreen $userId = id --user if ($userId -ne "0"){ throw "This script should be executed from the root" } $domainSuffix = &sudo -u $env:USER dns-domain-suffix if ($LastExitCode){exit $LastExitCode...
dmitriyse/DevOpsSpellbook
ubuntu/parts/install-kerberos-user.ps1
PowerShell
mit
1,571
# # check-windows-disk-writeable.ps1 # # DESCRIPTION: # This plugin collects the mounted logical disks and tests they are writeable. # # OUTPUT: # plain text # # PLATFORMS: # Windows # # DEPENDENCIES: # PowerShell 2.0 or above # # USAGE: # Powershell.exe -NonInteractive -NoProfile -ExecutionPolicy Bypass -N...
sensu-plugins/sensu-plugins-windows
bin/check-windows-disk-writeable.ps1
PowerShell
mit
2,396
Login-AzureRmAccount $subscriptionName = "your subscription name" $resourceGroup = "your resource group name" $path = "C:\temp\AzureLog@"+(Get-Date).ToShortDateString()+".csv" Select-AzureRmSubscription -SubscriptionName $subscriptionName (Get-AzureRmLog -ResourceGroup $resourceGroup -StartTime (Get-Date).A...
jiyongseong/AzureCommon
azure_resource_manager/powershell/azure-operation-log/script.ps1
PowerShell
mit
1,244
function Get-TraverseTest { <# .SYNOPSIS Retrieves Traverse Tests based on specified criteria. .DESCRIPTION This command leverages the Traverse APIs to gather information about tests in Traverse. .EXMPLE Get-TraverseTest Device1 Gets all tests from device Device1 .EXAMPLE Get-TraverseTest -TestName '*disk*' -DeviceN...
JustinGrote/Traverse
Disabled/Get-TraverseTest.ps1
PowerShell
mit
2,625
$packageName = 'combofix' $url = 'https://download.bleepingcomputer.com/sUBs/ComboFix.exe' $checksum = '3cd16166e0a873efcb47ec47be4ef6cc3088604c2a9ee79b8142816618f9ac96' $checksumType = 'sha256' $toolsDir = Split-Path -parent $MyInvocation.MyCommand.Definition $installFile = Join-Path $toolsDir "ComboFix.exe" Get-Choc...
dtgm/chocolatey-packages
automatic/_output/combofix/17.7.7.1/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
719
$packageName = 'kvrt' $url = 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe' $checksum = '219d1760ed21042d30041f58aa3f2175c5b3dfac70c12473ce4b730722446c82' $checksumType = 'sha256' $toolsPath = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $installFile = Join-Path $toolsPath "kvr...
dtgm/chocolatey-packages
automatic/_output/kvrt/2017.04.07.0154/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
960
############################################################################### # Customize these properties and tasks for your module. ############################################################################### Properties { # ----------------------- Basic properties -------------------------------- # The...
dbroeglin/Forge.Module
Forge.Module/Templates/Build.PSake/build.settings.ps1
PowerShell
apache-2.0
11,162
# Copyright © 2017 Chocolatey Software, Inc. # Copyright © 2015 - 2017 RealDimensions Software, LLC # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not ...
Apteryx0/choco
src/chocolatey.resources/helpers/functions/Get-VirusCheckValid.ps1
PowerShell
apache-2.0
1,805
# AzureVMPublishModule.psm1 は Windows PowerShell スクリプト モジュールです。このモジュールは、Web アプリケーションのライフ サイクル管理を自動化する Windows PowerShell 関数をエクスポートします。この関数をそのまま使用するか、アプリケーションや公開環境用にカスタマイズすることができます。 Set-StrictMode -Version 3 # 元のサブスクリプションを保存する変数。 $Script:originalCurrentSubscription = $null # 元のストレージ アカウントを保存する変数。 $Script:originalCu...
Codeer-Software/Selenium.WebForms.Infragistics
Project/Target/PublishScripts/AzureVMPublishModule.psm1
PowerShell
apache-2.0
80,404
<# DESCRIPTION: Ensure all drives are formatted as NTFS. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: All drives are formatted as NTFS WARNING: FAIL: One or more drives were foun...
My-Random-Thoughts/Server-QA-Checks
checks/drives/c-drv-08-drive-ntfs-format.ps1
PowerShell
apache-2.0
2,337
$packageName = 'dolphin' $url = 'http://dl.dolphin-emu.org/builds/dolphin-master-5.0-1985-x64.7z' $checksum = 'd649ead81ef0ffe015fd7374f8314edbcc4bbb5680130f0c1409c33e2318804d' $checksumType = 'sha256' $url64 = $url $checksum64 = $checksum $checksumType64 = $checksumType $toolsDir = "$(Split-Path -parent $MyInvocation...
dtgm/chocolatey-packages
automatic/_output/dolphin/5.0.1985/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
790
<# .Synopsis Perform Whois Query .DESCRIPTION Performs a Whois query for a given Domain. .EXAMPLE Perfrom a whois query for google.com PS C:\> Get-Whois google.com #> function Get-Whois { [CmdletBinding(DefaultParameterSetName="Domain")] Param ( # Param1 help description ...
MSAdministrator/Posh-SecMod
Discovery/Discovery.psm1
PowerShell
apache-2.0
40,395
function Get-enADServicePrincipalName { <# .SYNOPSIS Retrieves all Service Principal Names (SPNs) .DESCRIPTION Retrieves all Service Principal Names (SPNs) from Active Directory .INPUTS NONE .OUTPUTS PSObject .EXAMPLE PS />...
jhochwald/PowerShell-collection
ActiveDirectory/Get-enADServicePrincipalName.ps1
PowerShell
bsd-3-clause
7,199
$script:ErrorActionPreference = "Stop" $domain = .\Get-ConfigurationPropertyValue.ps1 Domain $userName = .\Get-ConfigurationPropertyValue.ps1 UserName $password = .\Get-ConfigurationPropertyValue.ps1 Password $computerName = .\Get-ConfigurationPropertyValue.ps1 SutComputerName $requestUrl = .\Get-ConfigurationPr...
XinwLi/Interop-TestSuites-1
SharePoint/Source/MS-VERSS/Adapter/SUTControlAdapter/Implementation/SetEnforceCheckout.ps1
PowerShell
mit
1,352
$script:dscModuleName = 'ComputerManagementDsc' $script:dscResourceName = 'DSC_SmbServerConfiguration' function Invoke-TestSetup { try { Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop' } catch [System.IO.FileNotFoundException] { throw 'DscResource.Test module depende...
PowerShell/xComputerManagement
tests/Unit/DSC_SmbServerConfiguration.Tests.ps1
PowerShell
mit
16,618
# Needed because running 'psake.bat -doc' result in $psake.build_success being false $psake.build_success = $true properties { . $(Get-DefaultPropertiesFile) $src_dir = Join-Path $base_dir "src" $project_name = "ProviderQuality.Console" $project_dir = Join-Path $src_dir $project_name } Import-DefaultTasks Version...
mdx-dev/CSharpCodeKata
tasks.ps1
PowerShell
mit
384
Properties { $x = 1 $y = 2 } FormatTaskName "[{0}]" Task default -Depends Verify Task Verify -Description "This task verifies psake's variables" { Assert (Test-Path 'variable:\psake') "psake variable was not exported from module" Assert ($psake.ContainsKey("version")) "psake variable does ...
AMCN41R/Harness
tools/build_tools/pSake/examples/checkvariables.ps1
PowerShell
mit
1,868
import-module au $releases = 'https://rubyinstaller.org/downloads' function global:au_SearchReplace { @{ ".\tools\chocolateyInstall.ps1" = @{ "(?i)(^\s*packageName\s*=\s*)('.*')" = "`$1'$($Latest.PackageName)'" "(?i)(^\s*fileType\s*=\s*)('.*')" = "`$1'$($Latest.FileType)'" ...
jberezanski/chocolatey-coreteampackages
automatic/ruby/update.ps1
PowerShell
apache-2.0
1,386
$CommandName = $MyInvocation.MyCommand.Name.Replace(".Tests.ps1", "") Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan . "$PSScriptRoot\constants.ps1" Describe "$CommandName Unit Tests" -Tags "UnitTests" { Context "Validate parameters" { [object[]]$params = (Get-Command $CommandName).Param...
alevyinroc/dbatools
tests/Add-DbaRegServer.Tests.ps1
PowerShell
mit
2,440
param($installPath, $toolsPath, $package, $project) Add-EFProvider $project 'Npgsql' 'Npgsql.NpgsqlServices, Npgsql.EntityFramework'
bjorg/DReAM
src/packages/Npgsql.EntityFramework.2.2.7/tools/install.ps1
PowerShell
apache-2.0
134
Set-StrictMode -Version Latest Import-Module -Name "${PSScriptRoot}\..\..\..\PowerShell-Lib\PowerShell-Lib.psd1" -Force Import-Module -Name "${PSScriptRoot}\..\..\..\PowerShell-Lib\Modules\YamlDotNetLib.psm1" -Force If (-Not (Test-TypeLoaded -Name "YamlDotNet.RepresentationModel.YamlScalarNode")) { Add-Type -Path...
Dargmuesli/powershell-lib
Tests/PowerShell-Lib/Modules/YamlDotNetLib.Tests.ps1
PowerShell
mit
1,657
[T4Scaffolding.Scaffolder(Description = "Adds ASP.NET MVC views for Create/Read/Update/Delete/Index scenarios")][CmdletBinding()] param( [parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, Position = 0)][string]$Controller, [string]$ModelType, [string]$Area, [alias("MasterPage")]$Layout =...
bugsancho/Academy-Platform
AcademyPlatform.Scaffolding/CodeTemplates/Scaffolders/CustomViews/CustomViews.ps1
PowerShell
mit
1,157
<# TEST/REPAIR SHAREPOINT CONTENT DATABASE DESCRIPTION: Test and repair (or report needed repairs) content databases. NOTES: Change the following: <database>, <url>, <id> and <instance> #> if ((Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null ) {Add-PSSnapin Microsoft.ShareP...
kambridge/PowerShell
SPContentDatabase/repairtestdb.ps1
PowerShell
mit
975
#Requires -Version 4 #Requires -RunAsAdministrator Function Get-ADKFiles { [CmdletBinding()] param( [parameter(Mandatory)] [system.string]$TargetFolder ) Begin { $HT = @{} $HT += @{ ErrorAction = 'Stop'} # Validate target folder try { Get-Item $TargetFolder @HT | Out-Null } catch {...
p0w3rsh3ll/ADK
10.1.14393.0/Get-ADKFiles.ps1
PowerShell
mit
15,594
param( $repo, $rev, $txnName ) $base_path = Split-Path $MyInvocation.MyCommand.Path & "$base_path\post-commit-fogbugz.ps1" $repo $rev $txnName & "$base_path\post-commit-fogbugz-ee.ps1" $repo $rev $txnName
jozefizso/FogBugz-ExtendedEvents
scripts/svn-hooks/post-commit.ps1
PowerShell
mit
213
#------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # # Licensed under the Microsoft Limited Public License (the "License"); # you may not use this file except in compliance with the License. # A full copy of the license is provid...
Kristinn-Stefansson/krsmanualchocolateypackages
VS2012.SharePoint2013Libraries/tools/TfsBuildServerPrerequisites.ps1
PowerShell
mit
14,091
#Requires -Version 3.0 <# .SYNOPSIS Creates a standalone version of a script .DESCRIPTION Creates a standalone version of a script by copying the script to a new file and adding all function definitions from the specified Modules. .EXAMPLE .\Create-StandaloneScri...
MaikKoster/Common
Tools/Create-StandaloneScript.ps1
PowerShell
mit
18,256
$log = git log --merges --oneline --decorate --reverse $split = $log -split "`n" $branchpattern = "\/(\w+)\/(\w+\-\d+)" $tagpattern="\btag\b\:\s(\d+\.\d+\.\d+)" $release = "" $changelog = New-Object 'System.Collections.ArrayList' $features = New-Object 'System.Collections.Generic.HashSet[string]' $hotfixes = New-Objec...
SashaKazyrevich/Emigrace
Scripts/Changelog.ps1
PowerShell
mit
1,877
# This commands script file exports all solutions in the farm # Author: Sergei Snitko # Blog: http://blog.arvosys.ru/ # Last Update : 4/11/2014 Add-PSSnapIn -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue function BackUpSolutions($BackupDirectory) { $DateFolderName = Get-Date -format "yyyyMMddHHmm...
sergeisnitko/SharePoint-Helper-Scripts
Sharepoint-Helper-Scripts/PowerShell/SharePoint_Export_Farm_Solutions.ps1
PowerShell
mit
1,912
param($alias) $searcher = [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().FindGlobalCatalog().GetDirectorySearcher() $searcher.Filter = "(mailnickname=$alias)" $user = $searcher.FindOne() $mbxSd = $user.Properties["msExchMailboxSecurityDescriptor"][0] $sd = New-Object System.Security.AccessContro...
bill-long/PowershellScripts
Dump-MailboxSdAsSDDL/Dump-MailboxSdAsSDDL.ps1
PowerShell
mit
386
param([string] $inputFilePath, [string] $outputFilePath) function GetValueFromDictionary([string]$find, [string] $xml) { [xml]$x = "<root>$xml</root>" $lastKey = '' $result = $null $found = $false $x.root.childnodes | %{ if (-not $found) { if($lastKey -eq $find) ...
NaosProject/Naos.Powershell
Media/ConvertItunesXmlPlaylistToM3U8.ps1
PowerShell
mit
2,190
<# Implementatation Notes Managing Disposable Objects The types PrincipalContext, Principal, and DirectoryEntry are used througout the code and all are disposable. However, in many cases, disposing the object immediately causes subsequent operations to fail or duplicate disposes calls t...
lfshr/xPSDesiredStateConfiguration
DSCResources/MSFT_xGroupResource/MSFT_xGroupResource.psm1
PowerShell
mit
88,934
function Disable-ADSIComputer { <# .SYNOPSIS Function to disable a Computer Account .DESCRIPTION Function to disable a Computer Account .PARAMETER Identity Specifies the Identity of the Computer. You can provide one of the following properties DistinguishedName Guid Name SamAccountName Sid .PARAMETER ...
evetsleep/AdsiPS
AdsiPS/Public/Disable-ADSIComputer.ps1
PowerShell
mit
2,413
<# .SYNOPSIS powershell script to generate .rdg file for remote desktop connection manager 'rdcman' .DESCRIPTION powershell script to generate .rdg file for remote desktop connection manager 'rdcman' script to generate rdcman rdg file from azure services for use with latest rdcman 2.7 https://www.m...
jagilber/powershellScripts
azurerm/azure-rm-create-rdg-file.ps1
PowerShell
mit
15,169