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
# Copy all folder contents that start with the letter B $fromHere = "\\SHINY-PC\Users\Me\Music\iTunes\iTunes Media\Music\B*" $toHere = "C:\Users\Elvis\Music" Copy-Item -Path ($fromHere) -Destination ($toHere) -Force -Recurse
WaffleSquirrel/mick-nuggets
nugs/powershell-scripts/[File System]-Copy-All-Directory-Contents.ps1
PowerShell
mit
229
<# .SYNOPSIS SharePoint Central Admin - View active services across entire farm. No more select machine drop down dance! .DESCRIPTION Apply CU patch to entire farm from one PowerShell console. NOTE - must run local to a SharePoint server under account with farm admin rights. Comments and suggestions always we...
spjeff/sppatchify
SPPatchify.ps1
PowerShell
mit
62,334
configuration Sample_xVMHyperV_SimpleWithDvdDrive { param ( [System.String[]] $NodeName = 'localhost', [Parameter(Mandatory = $true)] [System.String] $VMName, [Parameter(Mandatory = $true)] [System.String] $VhdPath, [System.String] ...
PowerShell/xHyper-V
source/Examples/Sample_xVMHyperV_SimpleWithDVDDrive.ps1
PowerShell
mit
1,229
$packageName = 'firefox-nightly' $softwareVersion = '55.0.1.2017030712-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/55.0.1.2017030712/tools/chocolateyUninstall.ps1
PowerShell
apache-2.0
820
# Cmdlets wrappers for scheduled tasks # # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 function Test-ScheduledTaskDefined { [CmdletBinding()] param ( [Parameter(Mandatory=$True,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)] ...
turboapps/turbome
tools/powershell/Turbo/ScheduledTasks.ps1
PowerShell
apache-2.0
5,098
# # Module manifest for module 'PSGet_AzureRM.Insights' # # Generated by: Microsoft Corporation # # Generated on: 2/21/2017 # @{ # Script module or binary module file associated with this manifest. # RootModule = '' # Version number of this module. ModuleVersion = '2.6.0' # Supported PSEditions # CompatiblePSEditio...
zhencui/azure-powershell
src/ResourceManager/Insights/AzureRM.Insights.psd1
PowerShell
apache-2.0
5,221
$commandname = $MyInvocation.MyCommand.Name.Replace(".Tests.ps1", "") Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan . "$PSScriptRoot\constants.ps1" Describe "$commandname Integration Tests" -Tags "IntegrationTests" { Context "Can create a database certificate" { BeforeAll { ...
SirCaptainMitch/dbatools
tests/Backup-DbaDbCertificate.Tests.ps1
PowerShell
mit
1,371
<# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0...
purplecabbage/cordova-paramedic
debug-mode-plugin/scripts/EnableDebuggingForPackage.ps1
PowerShell
apache-2.0
3,854
# Setup Powershell script $version ="1.0.1" function Prompt-YesNo ($title) { $ans = Read-Host $title return ($ans -eq 'Y') -or ($ans -eq 'y') } function Connect-SqlServer ($ConnectionString) { $dbconn = New-Object System.Data.SqlClient.SqlConnection($ConnectionString) $result = $true try { ...
mafudge/remotelab
src/RemoteLab/RemoteLab/Setup/setup.ps1
PowerShell
apache-2.0
6,704
$CommandName = $MyInvocation.MyCommand.Name.Replace(".Tests.ps1", "") Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan . "$PSScriptRoot\constants.ps1" Describe "$CommandName Unit Tests" -Tag 'UnitTests' { Context "Validate parameters" { [object[]]$params = (Get-Command $CommandName).Parame...
alevyinroc/dbatools
tests/Get-DbaBackupInformation.Tests.ps1
PowerShell
mit
7,765
[cmdletbinding()] param() # Arrange. . $PSScriptRoot\..\..\lib\Initialize-Test.ps1 . $PSScriptRoot\..\..\..\Tasks\MSBuild\LegacyHelpers.ps1 # Act. $actual = Get-SolutionFiles -Solution 'Some solution' # Assert. Assert-AreEqual 'Some solution' $actual
jwendl/vso-agent-tasks
Tests/L0/MSBuild-Legacy/Get-SolutionFiles.ReturnsNonWildcardSolution.ps1
PowerShell
mit
254
# 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, ...
xinmyname/wordbox
tools/psake/psake.psm1
PowerShell
mit
33,962
[CmdletBinding()] param( [string] $SharePointCmdletModule = (Join-Path $PSScriptRoot "..\Stubs\SharePoint\15.0.4805.1000\Microsoft.SharePoint.PowerShell.psm1" -Resolve) ) $ErrorActionPreference = 'stop' Set-StrictMode -Version latest $RepoRoot = (Resolve-Path $PSScriptRoot\..\..).Path $Global:CurrentSharePointStu...
BrianFarnhill/SharePointDsc
Tests/SharePointDsc/SharePointDsc.SPPasswordChangeSettings.Tests.ps1
PowerShell
mit
3,619
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. Describe "Debug-Runspace" -tag "CI" { BeforeAll { $rs1 = [runspacefactory]::CreateRunspace() $rs1.Open() $rs1.Name = "MyRunspace1" $rs2 = [runspacefactory]::CreateRunspace() $rs2.Ope...
Cowmonaut/PowerShell
test/powershell/Modules/Microsoft.PowerShell.Utility/Debug-Runspace.Tests.ps1
PowerShell
mit
1,505
$ErrorActionPreference = 'Stop' $toolsPath = Split-Path -parent $MyInvocation.MyCommand.Definition $packageArgs = @{ packageName = $env:ChocolateyPackageName fileType = 'msi' file = "$toolsPath\jitsi-2.10.5550-x86.msi" file64 = "$toolsPath\jitsi-2.10.5550-x64.msi" softwareName ...
jberezanski/chocolatey-coreteampackages
automatic/jitsi/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
678
######################################################################## # # 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 Licen...
bogdancarpusor/lis-test
WS2012R2/lisa/setupscripts/FCOPY_basic.ps1
PowerShell
apache-2.0
9,568
 $ErrorActionPreference = 'Stop'; $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $url = 'https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SqlLocalDB.msi' $packageArgs = @{ packageName = $env:ChocolateyPackageName unzipLocation = $toolsDir file...
flcdrg/au-packages
sqllocaldb/tools/chocolateyinstall.ps1
PowerShell
mit
742
function echobanner { Write-Host "`n`n" Write-Host " dP dP " -foregroundcolor Blue Write-Host " 88 88 " -foregroundcolor Blue Write-Host " dP .dP .d8888b. .d88...
psadmin-io/ps-vagabond
scripts/banner.ps1
PowerShell
mit
1,037
function Get-DscMetaConfig { <# .SYNOPSIS XXX .DESCRIPTION XXX .PARAMETER ComputerName XXX .PARAMETER CredentialName XXX .PARAMETER CimSession XXX .EXAMPLE XXX .NOTES XXX #> [CmdletBinding()] param( [Parameter(M...
nicholasdille/DSCTooling
PSDSC/Troubleshooting.ps1
PowerShell
mit
6,260
<#PSScriptInfo .VERSION 1.0.1 .GUID 662aee36-85dd-47fc-88e8-73d7b4e5f822 .AUTHOR Microsoft Corporation .COMPANYNAME Microsoft Corporation .COPYRIGHT .TAGS DSCConfiguration .LICENSEURI https://github.com/dsccommunity/xPSDesiredStateConfiguration/blob/main/LICENSE .PROJECTURI https://github.com/dsccommunity/xPSDesiredSta...
PowerShell/xPSDesiredStateConfiguration
source/Examples/Resources/xArchive/5-xArchive_RemoveArchiveChecksum_Config.ps1
PowerShell
mit
1,525
#Requires -Modules PS_OPNsense $beVerbose = $false # Import the PS_OPNsense PowerShell Module Import-Module -Name PS_OPNsense -Verbose:$beVerbose # Define connection parameters $apiKey = '<my OPNsense api key>' $apiPwd = '<my OPNsense api secret>' | ConvertTo-SecureString -AsPlainText -Force $Url = 'https://opnsense...
fvanroie/PS_OPNsense
Examples/Connect.Example.ps1
PowerShell
mit
1,164
function WriteAmigaTextLines($path, $lines) { $iso88591 = [System.Text.Encoding]::GetEncoding("ISO-8859-1"); $utf8 = [System.Text.Encoding]::UTF8; $amigaTextBytes = [System.Text.Encoding]::Convert($utf8, $iso88591, $utf8.GetBytes($lines -join "`n")) [System.IO.File]::WriteAllText($path, $iso88591.GetString($...
henrikstengaard/hstwb-installer
scripts/build_workbench3.1_validate_script.ps1
PowerShell
mit
1,173
param( ) Clear-Host $ContextClassic = [bool] (Get-Command -Name Save-AzureRmProfile -ErrorAction SilentlyContinue) # returns TRUE if AzureRM.profile version 2.7 or older is loaded $ContextPath = [System.IO.Path]::ChangeExtension($PSCommandPath, '.ctx') if (Test-Path $ContextPath -PathType Leaf) { Remove-Item -Path ...
markusheiliger/devtestlab-edge
utilities/Validate-EnvironmentResourceAvailability.ps1
PowerShell
mit
6,260
function Get-VMwareToolsStatus { Param( [string]$vcenter,[string]$vm ) connect-viserver $vcenter $a = New-VIProperty -Name ToolsVersion -ObjectType VirtualMachine -ValueFromExtensionProperty 'Config.tools.ToolsVersion'-Force $b = New-VIProperty -Name ToolsVersionStatus -ObjectType VirtualMachine -ValueFromExtensionP...
plbenpeterson/PowerCLI
source/functions/vm/Get-VmwareToolsStatus.ps1
PowerShell
mit
479
function Get-DbaLinkedServer { <# .SYNOPSIS Gets all linked servers and a summary of information from the linked servers listed. .DESCRIPTION Retrieves information about each linked server on the instance(s). .PARAMETER SqlInstance The target SQL Server instance or instances. T...
dsolodow/dbatools
functions/Get-DbaLinkedServer.ps1
PowerShell
mit
4,131
if ($env:APPVEYOR_REPO_COMMIT_MESSAGE -match "^!Deploy") { $ModulePath = Join-Path $env:APPVEYOR_BUILD_FOLDER $env:APPVEYOR_PROJECT_NAME Import-Module PowerShellGet -Force Publish-Module -Path $ModulePath -NuGetApiKey ($env:PSGallery_Api_Key) -Confirm:$false }
mattmcnabb/PSCodeMetrics
build/deploy.ps1
PowerShell
mit
274
# Copyright (c) 2016 Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License (MIT) function New-RsFolder { <# .SYNOPSIS This script creates a new folder in the Report Server .DESCRIPTION This script creates a new folder in the Report Server .P...
SQLvariant/ReportingServicesTools
ReportingServicesTools/Functions/CatalogItems/New-RsFolder.ps1
PowerShell
mit
4,230
Write-Host "Testing Java Install" Invoke-Expression "java -version" wget "https://www.dropbox.com/s/rjxyod0v33od7m6/processcomunicator.jar?dl=1" -outfile "processcomunicator.jar" $userin = Read-Host 'Input the IP of the Process Communicator server to connect to. If you were not given an additional IP, just hit enter....
MaxDistructo/ShellScripts
win-powershell/part2.ps1
PowerShell
mit
494
function _CheckValidImage{ [CmdletBinding()] param( [parameter(Mandatory=$true)][String] $url ) begin{ Write-Debug "Starting _CheckValidImage with $url" } process{ try{ $image = invoke-webrequest $url -DisableKeepAlive -UseBasicParsing } catc...
baldator/imagga
imagga/Private/_CheckValidImage.ps1
PowerShell
apache-2.0
706
$packageName = '{{PackageName}}' $url = '{{DownloadUrl}}' $checksum = '{{Checksum}}' $checksumType = 'sha1' $url64 = '{{DownloadUrlx64}}' $checksum64 = '{{Checksumx64}}' $checksumType64 = 'sha1' $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $installFile = Join-Path $toolsDir "RegScanner.exe" I...
maharishi/chocolatey-packages
automatic/regscanner.portable/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
829
<# Copyright 2015 Brandon Olin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
iainbrighton/NetScaler
NetScaler/Public/Add-NSCertKeyPair.ps1
PowerShell
apache-2.0
4,772
$errorActionPreference = 'Stop' Set-StrictMode -Version 'Latest' # Import CommonResourceHelper for Get-LocalizedData $script:dscResourcesFolderFilePath = Split-Path $PSScriptRoot -Parent $script:commonResourceHelperFilePath = Join-Path -Path $script:dscResourcesFolderFilePath -ChildPath 'CommonResourceHelper.psm1...
puppetlabs/puppetlabs-dsc
lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xEnvironmentResource/MSFT_xEnvironmentResource.psm1
PowerShell
apache-2.0
39,987
# # Module manifest for module 'PSGet_AzureRM.DataMigration' # # Generated by: Microsoft Corporation # # Generated on: 11/14/2017 # @{ # Script module or binary module file associated with this manifest. # RootModule = '' # Version number of this module. ModuleVersion = '0.1.0' # Supported PSEditions # CompatiblePS...
devigned/azure-powershell
src/ResourceManager/DataMigration/AzureRM.DataMigration.psd1
PowerShell
apache-2.0
5,470
function Add-VSS3BucketAccelerateConfiguration { <# .SYNOPSIS Adds an AWS::S3::Bucket.AccelerateConfiguration resource property to the template. Configures the transfer acceleration state for an Amazon S3 bucket. For more information, see Amazon S3 Transfer Acceleration: https://docs.aws.amazon.com/Amaz...
scrthq/Vaporshell
VaporShell/Public/Resource Property Types/Add-VSS3BucketAccelerateConfiguration.ps1
PowerShell
apache-2.0
2,872
# 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/FileSystem/Test-NtfsCompression.ps1
PowerShell
apache-2.0
1,549
# - - - - - - - - - - - - - - - - - - - - - - - - # Subfunction: method # Add a method script to Class definition or # attaches it to the Class if it is static # - - - - - - - - - - - - - - - - - - - - - - - - function Attach-PSClassMethod { param ( [psobject]$Class , [string]$name = $(Th...
ghostsquad/AetherClass
functions/Attach-PSClassMethod.ps1
PowerShell
apache-2.0
1,661
$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/New-DbaAgentJobStep.Tests.ps1
PowerShell
mit
4,737
#get users in a user collection function get-CMUserMembership { #define the parameters that the cmdlet will take param( [parameter(HelpMessage='Enter Name Of Colleciton to Query')] [STRING]$Name ) #Import SCCM and Connect To Site import-module "C:\Program Files (x86)\Microsoft Conf...
NathanKewley/Powershell_For_Dayz
SCCM/get-CMUserMembership.ps1
PowerShell
mit
583
<#-------------Create Deployment Start------------------#> Import-Module .\TestLibs\RDFELibs.psm1 -Force $result = "" $testResult = "" $resultArr = @() try { $templateName = $currentTestData.testName $parameters = $currentTestData.parameters $location = $xmlConfig.config.Azure.General.Location if(Test-Path .\azu...
FreeBSDonHyper-V/azure-freebsd-automation
remote-scripts/Template-datastax-enterprise.ps1
PowerShell
apache-2.0
3,401
# Start of Settings # End of Settings # Everything in this script will run at the end of vCheck If ($VIConnection) { $VIConnection | Disconnect-VIServer -Confirm:$false | Out-Null } Write-Output "" $Title = "Disconnecting from vCenter" $Header = "Disconnects from vCenter" $Comments = "Disconnect plugin" $Display ...
Sneddo/vCheck-vSphere
Plugins/80 Finish/999 VeryLastPlugin Used to Disconnect.ps1
PowerShell
mit
402
ConvertFrom-StringData @' GetAvailabilityGroup = Get the current configuration for the availability group '{0}' on the instance '{1}'. RemoveAvailabilityGroup = Removing the availability group '{0}' on the instance '{1}'. HadrNotEnabled = Always On Availability Groups is not enabled. FailedRemoveAvailab...
nabrond/xSQLServer
source/DSCResources/MSFT_SqlAG/en-US/MSFT_SqlAG.strings.psd1
PowerShell
mit
1,776
function Get-PuppetValidate { [CmdletBinding()] [Alias("puppetvalidate","pcheck")] param ( [Parameter(Mandatory = $true)] [ValidateScript({ # Validate the Path to FileName if ( -Not ($_ | Test-Path) ) { throw "$filename not found :(" } ...
SolidOceanTrust/Public-PowerShell
WinConfig/1.0.6/public/Get-PuppetValidate.ps1
PowerShell
mit
979
<# .Synopsis Reads SVN Log and Transforms to document readable by SOLR .DESCRIPTION Long description .EXAMPLE Example of how to use this cmdlet .EXAMPLE Another example of how to use this cmdlet #> [CmdletBinding()] Param ( # XML File To Read [Parameter(Mandatory=$true, ...
praveenc/scripts
powershell/svn/Read-SVNXMLLog.ps1
PowerShell
mit
1,649
function Get-DPMCXVersion { [CmdletBinding()] param ( [parameter(ParameterSetName = "GetVersion")] [string]$Version, [parameter(ParameterSetName = "ListVersion")] [switch]$ListVersion ) BEGIN { $functionpath = Split-Path -Path ${function:Get-DPMCX...
janegilring/DataProtectionManagerCX
Functions/Get-DPMCXVersion.ps1
PowerShell
mit
1,591
<# Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. #> # Creates a Project using ReST API param ( # SharepointOnline project site collection URL $SiteUrl = $(throw "SiteUrl parameter is required") ) # Load Re...
OfficeDev/O365-Project-Online-REST-Samples
createproject.ps1
PowerShell
mit
3,390
cat .\ProjectSettings\ProjectSettings.asset | sls Android: | select -First 1 | foreach { $_ -split ' ' } | select -Last 1
madsbangh/misc-scripts
Get-PackageName.ps1
PowerShell
mit
122
<# .SYNOPSIS Switches the Haxe version used by the current shell instance. .PARAMETER Version Accepted values: 2 or 3. #> Param( [ValidateRange(2, 3)] [int]$Version) $haxe2Path = 'C:\Motion-Twin\Haxe' $neko2Path = 'C:\Motion-Twin\neko' $haxe3Path = 'C:\HaxeToolkit\haxe' $neko3Path = 'C:\HaxeToolkit\neko' i...
tbrosman/switch-haxe
Switch-Haxe.ps1
PowerShell
mit
664
function Get-DbaXESession { <# .SYNOPSIS Gets a list of Extended Events Sessions from the specified SQL Server instance(s). .DESCRIPTION Retrieves a list of Extended Events Sessions present on the specified SQL Server instance(s). .PARAMETER SqlInstance ...
SirCaptainMitch/dbatools
functions/Get-DbaXESession.ps1
PowerShell
mit
5,731
Function Get-UnityIpInterface { <# .SYNOPSIS Information about network interfaces in the storage system. .DESCRIPTION Information about network interfaces in the storage system. Network interfaces enable and control access between the system, network, and configured hosts. You...
equelin/Unity-Powershell
Unity-Powershell/Public/Get-UnityIpInterface.ps1
PowerShell
mit
1,851
#Identify the Master Node in the Cluster Get-SFClusterMasterNodeID #Get Name and info about the Cluster Master Node Get-SFClusterMasterNodeID | Get-SFNode #Get Listing of all of the Nodes Get-SFNode #List Nodes and software version Get-SFNode | Select Name, NodeID, SoftwareVersion #Get platform info fo...
solidfire/PowerShell
Sample Scripts - Nodes.ps1
PowerShell
mit
404
<#PSScriptInfo .VERSION 1.0.1 .GUID cd618e81-b903-4ae9-9dd0-ab794931505c .AUTHOR DSC Community .COMPANYNAME DSC Community .COPYRIGHT DSC Community contributors. All rights reserved. .TAGS DSCConfiguration .LICENSEURI https://github.com/dsccommunity/ActiveDirectoryDsc/blob/main/LICENSE .PROJECTURI https://github.com/dsc...
PowerShell/xActiveDirectory
source/Examples/Resources/ADReplicationSiteLink/2-ADReplicationSiteLink_ModifyExistingReplicationSiteLink_Config.ps1
PowerShell
mit
1,144
## Internet Explorer: PowerShell Script to List Trusted Sites in IE Browser ## ## Overview: Script Gets all the Trusted Sites stored in Internet Explorer (IE) under 'Internet Options - Security - Trusted Sites' $_List1 = @() $_List2 = @() $_List3 = @() $_List1 = $(Get-item 'HKCU:\SOFTWARE\Policies\Microsoft\Windows...
borkit/scriptdump
PowerShell/Working/Snippets/GetInternetExplorerTrustedSites.ps1
PowerShell
mit
627
if (`$MyInvocation.BoundParameters.ContainsKey("$($DisplayName)") -or `$MyInvocation.BoundParameters.ContainsKey("$($DisplayName)Value")){ `$FieldsToSend.Add("$($SchemaName.ToLower())",(New-CrmOptionSetValue -Value `$$($DisplayName)Value)) }
kabtoffe/xrm-powershell-advanced-function-generator
XrmFunctionGenerator/Templates/NewSet/PicklistAdderTemplate.ps1
PowerShell
mit
245
# # Module manifest for module 'MrSQL' # # Generated by: Mike F Robbins # # Generated on: 7/25/2019 # @{ # Script module or binary module file associated with this manifest. RootModule = 'MrSQL' # Version number of this module. ModuleVersion = '1.1' # Supported PSEditions # CompatiblePSEditions = @() # ID used to ...
mikefrobbins/SQL
MrSQL/MrSQL.psd1
PowerShell
mit
4,806
param ( [string]$ResourceGroupName = $(Read-Host "Enter Resource group name (Press Enter for 'NDC2017')") ) if([string]::IsNullOrEmpty($ResourceGroupName)) { $ResourceGroupName = "NDC2017"; } Write-Host "Resource group: "$ResourceGroupName; Try { Get-AzureRmContext } Catch { if ($_ -like "*Login-AzureRmAccoun...
novanet/ndc2017
scripts/Deploy.ps1
PowerShell
mit
683
$packageName = 'cyberduck.install' $installerType = 'exe' $silentArgs = '/S' $url = 'https://update.cyberduck.io/windows/Cyberduck-Installer-6.2.11.26765.exe' $checksum = 'cc449330841a638d70c3b37d0973babe1f51250fb43f69bb2fe18ffe7ddde81b' $checksumType = 'sha256' $validExitCodes = @(0) Install-ChocolateyPackage -Packag...
dtgm/chocolatey-packages
automatic/_output/cyberduck.install/6.2.11.26765/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
657
######## LICENSE #################################################################################################################################### <# # Copyright (c) 2013-2014, Daiki Sakamoto # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitte...
dsakam/ZipFile
ZipFile/ZipFile.psm1
PowerShell
bsd-2-clause
26,614
#requires -version 2 <# Veil-PowerView v1.9 See README.md for more information. by @harmj0y #> # PSReflect code for Windows API access # Author: @mattifestation # https://raw.githubusercontent.com/mattifestation/PSReflect/master/PSReflect.psm1 function New-InMemoryModule { <# .SYNOPSIS Creates an in-memory ass...
monoxgas/PowerTools
PowerView/powerview.ps1
PowerShell
bsd-3-clause
406,134
@{ GroupName = 'Command' Name = 'Turns Aliases Into Commands' Description = 'Replaces aliases with their command names.' Tooltip = @' Command aliases help you work interactively with PowerShell. Aliases are typically shorter than cmdlet names, or they can mimick historic commands like "dir" or "ls". Aliases should...
lweniger/PowerShell
Modules/downloaded/powershellgallery/ISESteroids/Fixer/Command/ReplaceAliases/fixer.psd1
PowerShell
mit
688
## ## Publish All Packages ## ==================== ## Remeber the initial once off setting of your API Key ## ## NuGet SetApiKey Your-API-Key ## function Pause ($Message="Press any key to continue...") { Write-Host -NoNewLine $Message $null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") ...
MarimerLLC/cslacontrib
branches/V4-3-x/NuGet/Push All.ps1
PowerShell
mit
2,161
Properties { $projects = $null $configuration = "Release" $source_folder = $null $solution = $null $build_meta = $null } Task Default -Depends Build Task Publish -Depends Package { $version = getVersionBase foreach($project in $projects) { Get-ChildItem | Where-Object -FilterScri...
bernos/MediatR.Extensions
default.ps1
PowerShell
apache-2.0
2,409
function New-PesterState { param ( [String[]]$TagFilter, [String[]]$ExcludeTagFilter, [String[]]$TestNameFilter, [System.Management.Automation.SessionState]$SessionState, [Switch]$Strict, [Switch]$Quiet ) if ($null -eq $SessionState) { $SessionState = $Execut...
randorfer/ScorchDev
PowerShellModules/Pester/3.3.14/Functions/PesterState.ps1
PowerShell
mit
17,870
#requires -RunAsAdministrator #requires -Version 4 $moduleName = 'Lability'; $repoRoot = (Resolve-Path "$PSScriptRoot\..\..\..\..").Path; Import-Module (Join-Path -Path $RepoRoot -ChildPath "$moduleName.psm1") -Force; Describe 'Src\Private\Get-LabDscModule' { InModuleScope $moduleName { It 'Throws if mo...
iainbrighton/Lability
Tests/Unit/Src/Private/Get-LabDscModule.Tests.ps1
PowerShell
mit
6,453
# give it 3 positional parameters Get-Command "abc" 4 4.3
juneb/PSScriptAnalyzer
Tests/Rules/AvoidPositionalParameters.ps1
PowerShell
mit
60
$CurrentDirectory = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent $PrepScript = Join-Path $CurrentDirectory "bk_win_prep.ps1" Invoke-Expression $PrepScript echo "+++ bundle exec rake" bundle exec rake spec:unit if (-not $?) { throw "Chef unit tests failing." } bundle exec rake component_specs if (-not $?...
higanworks/chef
scripts/bk_tests/bk_win_unit.ps1
PowerShell
apache-2.0
364
#Install-VirtualPackage 'thebrain.install'
dtgm/chocolatey-packages
automatic/_output/thebrain/8.0.1.400/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
45
using namespace VMLib.Disk; function New-VMDisk{ param([Parameter(Mandatory = $true, ValueFromPipeline = $true)]$Hypervisor, $Path, [long]$Size) $diskbuilder = $Hypervisor.GetDiskBuilder() $diskbuilder.CreateDisk($Path, [VMLib.Disk.DiskType]::SCSI, $Size) }
wiltaylor/VMLib
Src/PSVMLib/New-VMDisk.ps1
PowerShell
mit
262
param( [string]$conf = $(throw "conf is required.") ) $root = "$PSScriptRoot\..\" Write-Host -foregroundcolor "Yellow" "Bootstrapping boost.." Set-Location "$root\src\external\boost" .\bootstrap.bat Write-Host -foregroundcolor "Yellow" "Generating boost headers.." .\b2 headers -d0 if ($conf -eq "Debug") { Write...
kittikun/takoyaki
build/prebuild.ps1
PowerShell
mit
1,831
#region Info <# ################################################# # modified by : Joerg Hochwald # last modified : 2016-04-13 ################################################# Support: https://github.com/jhochwald/NETX/issues #> #endregion Info #region License <# Copyright (c) 2012-201...
jhochwald/MyPowerShellStuff
Profile/functions/head.ps1
PowerShell
mit
15,168
# This script is designed to go through a bunch of folders and get a file count and dumping it to a .txt file # Allen vailliencourt # April 7, 2016 # License: Have fun. # Instructions: Change the folders and file path to match your environment. $fso = New-Object -com "Scripting.FileSystemObject" $f = $fso.GetFolder("...
Valien/Bash-alicious
PowerShell Scripts/FileCount.ps1
PowerShell
mit
531
param($installPath, $toolsPath, $package, $project) $p = Get-Project $analyzerPath = join-path $toolsPath "analyzers" $analyzerFilePath = join-path $analyzerPath "EmptyCatchCodeFix.Demo.dll" $p.Object.AnalyzerReferences.Remove("$analyzerFilePath")
marcote/Roslyn-demo-code
EmptyCatchCodeFix.Demo/EmptyCatchCodeFix.Demo/tools/uninstall.ps1
PowerShell
mit
257
#Requires -Version 3.0 . "$($PSScriptRoot)\..\..\TestInitialize.ps1" Describe 'Remove-SPClientContentTypeField' { Context 'Success' { Context 'Site Content Type' { BeforeEach { try { $Xml = '<Field Type="Text" ID="2F992681-3273-4C8C-BACD-8B7A9BBA0EE4" Na...
karamem0/SPClient
source/SPClient.Tests/functions/SPClientContentType/Remove-SPClientContentTypeField.Tests.ps1
PowerShell
mit
5,307
$script:dscModuleName = 'DnsServerDsc' $script:dscResourceName = 'DSC_DnsServerConditionalForwarder' function Invoke-TestSetup { try { Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop' } catch [System.IO.FileNotFoundException] { throw 'DscResource.Test module dependenc...
PowerShell/xDnsServer
tests/Unit/DSC_DnsServerConditionalForwarder.Tests.ps1
PowerShell
mit
16,625
## ===================================================================== ## Title : Get-IADAltRecipient ## Description : Get all objects which has an alternative recipient to receive e-mail ## Author : Idera ## Date : 8/11/2009 ## Input : No Input ## ## Output...
borkit/scriptdump
PowerShell/Working/IderaPowerShellScripts/Idera_ADPowerShellScripts/Get-IADAltRecipient.ps1
PowerShell
mit
1,188
$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' # Import the ADCS Deployment Resource Common Module. Import-Module -Name (Join-Path -Path $modulePath ` -ChildPath (Join-Path -Path 'FSRMDsc.Common' ` -ChildPath 'FSRMDsc.Common.ps...
PlagueHO/xFSRM
DSCResources/DSR_FSRMClassificationRule/DSR_FSRMClassificationRule.psm1
PowerShell
mit
19,924
Function ODBC_get_registry_path_to_DSN_LIST { [cmdletbinding()] Param ( [Parameter(Mandatory=$True,Position=0)][string]$mem_arch ) write-debug "ODBC_get_registry_path_to_DSN_LIST - BEGIN" $registry_path = DSN_get_registry_path $mem_arch return $registry_path + ([pratom.constants.registry.ODB...
pratom/master
electrons/lib/computer/DSN/ODBC_get_registry_path_to_DSN_LIST.ps1
PowerShell
mit
341
function Clear-CIBuild { [CmdletBinding()] param( [Parameter(Mandatory = $true, Position = 0)] $BuildFolder, [Parameter(Mandatory = $false, Position = 1)] $Configuration = $env:CONFIGURATION, [switch]$IsCore, [switch]$NuGetOnly ) if(!$NuGetOnly) { ...
lordmilko/PrtgAPI
build/CI/CI/Clear-CIBuild.ps1
PowerShell
mit
1,850
$XsdToCodeExePath = "C:\Program Files (x86)\Xsd2Code\Xsd2Code.exe" Get-ChildItem -Path .\schemas | ForEach-Object { $namespace = "Aldsoft.Acord.LA" $baseName = $_.BaseName $outputDirectoryBase = "..\src\" + $namespace + "." $outputDirectory = $outputDirectoryBase + $baseName.TrimStart("TXLife") + "\" $outpu...
maldworth/aldsoft.acord
generate/Generate-CsCode.ps1
PowerShell
mit
1,183
Push-Location $scriptdir = Split-Path $MyInvocation.MyCommand.Path cd $scriptdir $nugetFiles = @(gci *.nupkg) ForEach ($nugetFile in $nugetFiles) { Write-Host "nuget file = " $nugetFile #Open zip Add-Type -assembly System.IO.Compression.FileSystem $zip = [System.IO.Compression.ZipFile]::Open($nugetFile,"Up...
igagis/morda
nuget/keep_bin_dir_structure.ps1
PowerShell
mit
3,151
Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) ` -ChildPath 'SqlServerDscHelper.psm1') ` -Force Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) ` -ChildPath 'CommonResourceHelper.psm1') $script:localizedData = Get-Localize...
jpogran/puppetlabs-dsc
lib/puppet_x/dsc_resources/SqlServerDsc/DSCResources/MSFT_SqlAGDatabase/MSFT_SqlAGDatabase.psm1
PowerShell
apache-2.0
41,517
$ErrorActionPreference = 'Stop'; # stop on all errors $packageName = 'scapple' # arbitrary name for the package, used in messages $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $fileType = 'exe' $validExitCodes= @(0, 3010, 1641) $installerExe = 'Scapple-installer.exe' $file = "$t...
count-chocola/chocolatey-scapple
tools/chocolateyinstall.ps1
PowerShell
apache-2.0
1,150
$packageName = 'gpg4win-light' $installerType = 'exe' $silentArgs = '/S' $url = 'https://files.gpg4win.org/gpg4win-light-2.3.2.exe' $checksum = 'e136f6f2d9b8254c44506f76b637188d30f2b2e3' $checksumType = 'sha1' $validExitCodes = @(0) Install-ChocolateyPackage -PackageName "$packageName" ` -Fi...
dtgm/chocolatey-packages
automatic/_output/gpg4win-light/2.3.2/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
607
param($hostname) if (!$hostname) { echo "hostname is necessary" } else { $inpaths = @( '/root/data/rpoddar/steffen170/Rat16/635576303263290371', '/root/data/rpoddar/steffen170/Rat16/635592472184060130', '/root/data/rpoddar/steffen170/Rat16/635577203829834332', '/root/data/rpoddar/steffen170/Rat16/635583269298629093'...
Olveczky-Lab/FAST
FAST source/TitanSpikeSnippeter/SnippetMaster/SnippetAll.ps1
PowerShell
bsd-3-clause
2,558
function Start-Elevated { $psi = new-object System.Diagnostics.ProcessStartInfo $emuHk = $env:ConEmuHooks -eq 'Enabled' if($args.Length -eq 0) { if($emuHk) { $psi.FileName = $env:WINDIR + '\System32\WindowsPowerShell\v1.0\powershell.exe' $psi.Arguments = "-new_console:a -Ex...
spasztor/Project-Settings
powershell/Modules/PSSudo/PSSudo.psm1
PowerShell
mit
2,214
function MyFunction ($username, $param2) { } function MyFunction2 ($param1, $passwords) { } function MyFunction3 { [CmdletBinding()] [Alias()] [OutputType([int])] Param ( # Param1 help description [Parameter(Mandatory=$true, ValueFromPipelineByProperty...
korygill/PSScriptAnalyzer
Tests/Rules/AvoidUserNameAndPasswordParamsNoViolations.ps1
PowerShell
mit
614
# ---------------------------------------------------------------------------------- # # 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...
chef-partners/azure-powershell
src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/Common.ps1
PowerShell
apache-2.0
6,398
@{ # Script module or binary module file associated with this manifest. ModuleToProcess = 'AntivirusBypass.psm1' # Version number of this module. ModuleVersion = '1.0.0.0' # ID used to uniquely identify this module GUID = '7cf9de61-2bfc-41b4-a397-9d7cf3a8e66b' # Author of this module Author = 'Matthew ...
nullbind/PowerSploit
AntivirusBypass/AntivirusBypass.psd1
PowerShell
bsd-3-clause
2,705
dotnet ef database update --project .\src\Tools\Atomiv.Template.Tools.Migrator start https://localhost:5101/swagger dotnet run --project .\src\Web\Atomiv.Template.Web.RestApi\Atomiv.Template.Web.RestApi.csproj
optivem/optivem-commons-cs
template/microservice/run.ps1
PowerShell
apache-2.0
212
#!/usr/bin/env pwsh Set-StrictMode -Version Latest Set-Location (Split-Path $PSScriptRoot) [Console]::TreatControlCAsInput = $true $action = { if ($EventArgs.Name -notlike "*.g.php") { $changeType = [String] $EventArgs.ChangeType Write-Host "'$($EventArgs.Name)' was $($changeType.ToLower()): starting a new build....
cedx/which.php
tool/watch.ps1
PowerShell
mit
984
function Get-AssemblyFullName { param( [Parameter( Mandatory=$true )] [string]$Path ) [System.Reflection.AssemblyName]::GetAssemblyName($Path).FullName }
maximebedard/SPU
lib/Get-AssemblyFullName.ps1
PowerShell
mit
198
# Konfiguration des Docker Clients # Authentifizierung eines Servers über ein Zertifikat $Env:DOCKER_TLS_VERIFY = "1" $Env:DOCKER_CERT_PATH = "C:\Users\PrescherFa\.docker\machine\machines\default" # Adresse und Port, auf dem die Docker Engine lauscht $Env:DOCKER_HOST = "tcp://192.168.99.100:2376" # Setzen des Namens d...
falcoprescher/DockerWS
Examples/Hostmanagement/01_docker-client-configuration.ps1
PowerShell
mit
435
function Uninstall-LabVMTfsAgent { param ( [string]$ServerUrl = $script:configuration.TfsServerUrl, [string]$AgentName = $script:configuration.AgentName, [string]$AgentFolder = $script:configuration.AgentFolder, [string]$WorkFolder = $script:configuration.WorkFolder ) <#$ser...
CodeblackNL/HyperVLab
src/HyperVLab/Files/Program Files/WindowsPowerShell/Modules/HyperVLabClient/1.0.0.0/Functions/Uninstall-LabVMTfsAgent.ps1
PowerShell
mit
1,406
param ( [parameter(Mandatory=$false)] [String]$UserName = "azureuser", [parameter(Mandatory=$false)] [String]$Password = "password", [parameter(Mandatory=$false)] [String]$SubscriptionId = "12345...", [parameter(Mandatory=$false)] [String]$Location = "East US", [parameter(Mandatory=$false)] [String]$GlusterV...
liupeirong/Azure
DeployGlusterFS/DeployGlusterFS/DeployGFS.ps1
PowerShell
mit
4,313
function Get-SecureStringText { [CmdletBinding()] param ( [Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true)] [System.Security.SecureString[]] $SecureString ) process { foreach ($ss in $SecureString) { ...
dlwyatt/Get-SecureStringText
Get-SecureStringText.ps1
PowerShell
apache-2.0
879
<# .SYNOPSIS Initializes your Rivet working directory for development. #> [CmdletBinding()] param( [Parameter(Mandatory)] # The name of the SQL Server tests should run against. [String]$SqlServerName ) #Requires -Version 5.1 Set-StrictMode -Version 'Latest' $SqlServerName | Set-Content -Path...
RivetDB/Rivet
init.ps1
PowerShell
apache-2.0
340
# Copyright 2017 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
DinoChiesa/Edge-Powershell-Admin
PSApigeeEdge/Private/Get-EdgeAssetRevision.ps1
PowerShell
apache-2.0
1,632
# Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass $version = "0.94.00" $vsRelease = "2019" function replaceVersionInfo($version) { $versionInfoRegex = new-object Text.RegularExpressions.Regex "// NPP plugin platform for .Net v(\d+\.\d+(\.\d+)?) by Kasper B. Graversen etc.", "None" $files = get-ChildItem...
kbilsted/NotepadPlusPlusPluginPack.Net
makerelease.ps1
PowerShell
apache-2.0
1,514
######################################################################################## ## ## ___________ _____________ ___ .____ .___ _________ _____ ## \_ _____// _____/\ \/ / | | | |/ _____/ / _ \ ## | __)_ \_____ \ \ / ______ | | | |\_____ \ / /_\ \ ...
VirtQE-S1/ESX-LISA
setupscripts/tcutils.ps1
PowerShell
apache-2.0
80,402
$packageName = 'kvrt' $url = 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe' $checksum = 'b4aebc2f60ab807a123fe5aea4aa28818b0a5ad54db5af64ca78898b5362822a' $checksumType = 'sha256' $toolsPath = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $installFile = Join-Path $toolsPath "kvrt...
dtgm/chocolatey-packages
automatic/_output/kvrt/2016.06.11.0122/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
957
# 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 ...
MattHubble/carbon
Carbon/Security/New-Credential.ps1
PowerShell
apache-2.0
1,489