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
function Get-DbaDbView { <# .SYNOPSIS Gets database views for each SqlInstance. .DESCRIPTION Gets database views for each SqlInstance. .PARAMETER SqlInstance The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function t...
alevyinroc/dbatools
functions/Get-DbaDbView.ps1
PowerShell
mit
6,903
$projectRoot = Resolve-Path "$PSScriptRoot\.." $script:ModuleName = 'ProxmoxCLI' Describe "Regression tests" -Tag Build { Context "Github Issues" { # $issues = Get-GitHubIssue -Uri 'https://github.com/quonic/ProxmoxCLI' } }
quonic/ProxmoxCLI
tests/Regression.Tests.ps1
PowerShell
mit
242
# # BaseFunctions.ps1 # function Start-AP_SPProvisioning_DebugModus { [CmdletBinding()] param ( [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true,Position=0)] [System.Xml.XmlLinkedNode]$xmlActionObject ) Begin { Write-Verbose "Start Start-AP_SPProvisioning_DebugModus"...
AlegriGroup/Alegri.ActionPack.SharePoint.Provisioning.Powershell
AlegriActionPackSharePointProvisioning/AlegriActionPackSharePointProvisioning/PSScripts/BaseFunctions.ps1
PowerShell
mit
614
function Get-ModuleVariable { [CmdletBinding( SupportsShouldProcess = $false , ConfirmImpact = 'Low' , HelpURI = 'http://dfch.biz/PS/Appclusive/Client/Get-ModuleVariable/' )] [OutputType([hashtable])] PARAM ( # Specifies a references to the Appclusive endpoints [Parameter(Mandatory = $false)] [hashtable] ...
dfensgmbh/biz.dfch.PS.Appclusive.Client
src/Get-ModuleVariable.ps1
PowerShell
apache-2.0
9,374
# Import the Networking Resource Helper Module Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) ` -ChildPath (Join-Path -Path 'CertificateDsc.ResourceHelper' ` -ChildPath 'CertificateDsc.ResourceHelper.psm1')) # Import Localization Strings $localizedData = Get-Loc...
puppetlabs/puppetlabs-dsc
lib/puppet_x/dsc_resources/CertificateDsc/Modules/CertificateDsc.Common/CertificateDsc.Common.psm1
PowerShell
apache-2.0
27,763
# Add New Method to ALL Objects in PowerShell # The below adds the method PSAddMember() to all objects in the PowerShell Session [system.object] | Update-TypeData -MemberType ScriptMethod -MemberName PSAddMember -Value { switch ($args.count) { 1 { $hash = $args[0] -as [HashTable] f...
pldmgg/misc-powershell
MyScripts/Add-NewMethodToAllObjects.ps1
PowerShell
apache-2.0
1,307
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") function Stop-Pester() { [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] PARAM ( $message = "EMERGENCY: Script cannot contin...
dfensgmbh/biz.dfch.PS.Appclusive.Client
src/New-Folder.Tests.ps1
PowerShell
apache-2.0
3,484
<# .SYNOPSIS Create a new filter for WMI Permamanent Event Classes. .DESCRIPTION Create a new filter for WMI permamanent event classes are created or connected. Useful for monitoring for persistence actions. #> function New-SysmonWmiFilter { [CmdletBinding(DefaultParameterSetName = 'Path', HelpUri = 'https://gi...
darkoperator/Posh-Sysmon
Functions/New-SysmonWmiFilter.ps1
PowerShell
bsd-3-clause
2,935
configuration XD7LabSessionHost { param ( ## Citrix XenDesktop installation source root [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [System.String] $XenDesktopMediaPath, ## Citrix XenDesktop delivery controller address(es) [Parameter(Mandatory)] ...
VirtualEngine/XenDesktop7Lab
DSCResources/XD7LabSessionHost/XD7LabSessionHost.schema.psm1
PowerShell
mit
3,398
Function New-GitLabUser { [CmdletBinding()] param ( [ValidateNotNullOrEmpty()] [Parameter(Mandatory=$true)] [string]$Email, [ValidateNotNullOrEmpty()] [ValidatePattern("(?# Error: Password Must Contain at least 8 characters).{8,}")] [Parameter(Mandatory=$true)] ...
TerrapinStation/PSGitLab
PSGitLab/Public/User/New-GitLabUser.ps1
PowerShell
mit
1,761
function Get-DbaInstanceProperty { <# .SYNOPSIS Gets SQL Server instance properties of one or more instance(s) of SQL Server. .DESCRIPTION The Get-DbaInstanceProperty command gets SQL Server instance properties from the SMO object sqlserver. .PARAMETER SqlInstance The target SQ...
wsmelton/dbatools
functions/Get-DbaInstanceProperty.ps1
PowerShell
mit
7,478
$packageName = 'blink' $installerType = 'exe' $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' $validExitCodes = @(0) $url = 'https://blink.sipthor.net/download.phtml?download&os=nt' $checksum = 'ae2e89bd39ccfb7a64ef587e7038651b' $checksumType = 'md5' Install-ChocolateyPackage "$packageName" "$installerT...
dtgm/chocolatey-packages
automatic/_output/blink/1.4.1/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
430
[CmdletBinding()] param() Trace-VstsEnteringInvocation $MyInvocation try { Import-VstsLocStrings "$PSScriptRoot\task.json" # Get inputs. $input_failOnStderr = Get-VstsInput -Name 'failOnStderr' -AsBool $input_script = Get-VstsInput -Name 'script' $input_workingDirectory = Get-VstsInput -Name 'work...
Microsoft/vso-agent-tasks
Tasks/CmdLineV2/cmdline.ps1
PowerShell
mit
4,871
[CmdletBinding()] param() # Arrange. . $PSScriptRoot\..\..\..\..\Tests\lib\Initialize-Test.ps1 Microsoft.PowerShell.Core\Import-Module Microsoft.PowerShell.Security Unregister-Mock Import-Module Register-Mock Write-VstsTaskError Register-Mock Get-VstsWebProxy { } $module = Microsoft.PowerShell.Core\Import-Module $PSSc...
maikvandergaag/msft-vsts-extensions
azuredevops/azureresourcegroup/azureresourcegroup/ps_modules/VstsAzureHelpers_/Tests/Initialize-AzureSubscription.ManagedServiceIdentity.ps1
PowerShell
mit
1,700
#Requires -Modules Pester <# .SYNOPSIS Tests the AzureRateCard module .EXAMPLE Invoke-Pester .NOTES This script originated from work found here: https://github.com/kmarquette/PesterInAction scriptanalyzer section basics taken from DSCResource.Tests #> Import-Module -Name (Join-Path -Path $PSScriptRoo...
Stijnc/PowerShell.Tests
PowerShell.Tests.ps1
PowerShell
mit
3,733
<# .DESCRIPTION This example shows how to set the minimum and maximum memory configuration option with the value equal to 1024 and 12288. #> Configuration Example { param ( [Parameter(Mandatory = $true)] [System.Management.Automation.PSCredential] $SqlAdministratorCre...
nabrond/xSQLServer
source/Examples/Resources/SqlServerMemory/1-SetMaxMemoryTo12GB.ps1
PowerShell
mit
827
############################################################################################################################################ #Script that gets all the property Bags # Required Parameters: # -> $sUserName: User Name to connect to the SharePoint Online Site Collection. # -> $sPassword: Password for th...
CompartiMOSS/SharePoint-PowerShell
Office 365/PS_ReadAllPropertyBags_SPOSite.ps1
PowerShell
mit
2,802
# # param ( [string] $testName = "LongGeneratedTest1", [int] $numberOfMethods = 10, [int] $machines = 1, [string] $expID = "dummy" ) if($env:ISEMULATED -ne $true) { $port = "45002" $resource = "http://orleansservicedg.cloudapp.net:"+$port+"/" } else { $resource = "http://localhost:49176/" } $controler="api...
too4words/Call-Graph-Builder-DotNet
AzureScripts/InvokeTestExperiments.ps1
PowerShell
mit
504
Import-Module psake Properties { $nuget = (Get-Command nuget.exe).Path $msbuild = (Get-Command msbuild.exe).Path $git = (Get-Command git.exe).Path $solutionFile = (Resolve-path $PSScriptRoot\Elementary.Hierarchy.Collections.sln) $packedProject = (Resolve-path $PSScriptRoot\Elementary.Hierarchy.C...
wgross/Elementary.Hierarchy.Collections
_default.ps1
PowerShell
mit
2,597
# # Get-DotNetReleaseVersion.ps1 # Function Get-DotNetReleaseVersion { [CmdletBinding()] Param ( [string]$ComputerName = "$env:ComputerName" ) # Check to make sure the target computer is alive. # If it's alive, continue. # If it's dead, break. Begin { if (Test-Connection $ComputerName -Quiet -Count 2) ...
TechnologyEnthusiast/powershell-get-dotnetreleaseversion
Get-DotNetReleaseVersion.ps1
PowerShell
mit
2,144
######################## # THE BUILD! ######################## Push-Location $PSScriptRoot try { Import-Module $PSScriptRoot/build/Autofac.Build.psd1 -Force $artifactsPath = "$PSScriptRoot/artifacts" $packagesPath = "$artifactsPath/packages" $globalJson = (Get-Content "$PSScriptRoot/global.json" |...
autofac/Autofac.Extras.Moq
build.ps1
PowerShell
mit
2,537
<#PSScriptInfo .VERSION 1.0.0 .GUID 594bfeff-8e83-4cc4-8141-f3b39795c85b .AUTHOR DSC Community .COMPANYNAME DSC Community .COPYRIGHT Copyright the DSC Community contributors. All rights reserved. .TAGS DSCConfiguration .LICENSEURI https://github.com/dsccommunity/ComputerManagementDsc/blob/master/LICENSE .PROJECTURI htt...
PlagueHO/xComputerManagement
source/Examples/Resources/Computer/1-Computer_RenameComputerAndSetWorkgroup_Config.ps1
PowerShell
mit
1,025
function Validate-RepoState() { <# .SYNOPSIS Validates that a git repository is in the right state to apply the branching model. .INPUTS No pipeline inputs accepted. .OUTPUTS Returns $null if the repo state is valid. Otherwise, throws. #> # prompt to close ...
NaosFramework/Naos.Powershell
GIT/Naos-GitBranchingTools.ps1
PowerShell
mit
6,891
$os = Get-OSVersion Describe "PHP" -Skip:($os.IsMonterey) { Context "PHP" { It "PHP Path" { Get-WhichTool "php" | Should -Not -BeLike "/usr/bin/php*" } It "PHP version" { "php --version" | Should -ReturnZeroExitCode } } Context "Composer" { It...
mattgwagner/New-Machine
.github-actions/images/macos/tests/PHP.Tests.ps1
PowerShell
mit
413
<# .SYNOPSIS Remove-Dotslash removes a leading ".\" sequence from a relative path. .PARAMETER path Input path. #> # Parameter definition param ( [string] $path ) if (($path.SubString(0, 1) -eq '.') -and ($path.SubString(1, 1) -eq '\')) { return $path.SubString(2) } return $path
kadluba/MsiScripts
util/remove-dotslash.ps1
PowerShell
mit
319
$packageName = 'kvrt' $url = 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe' $checksum = '82f06326f9b434a0625bc008f87f88d7bd77ae95093595c99feaf3317526a897' $checksumType = 'sha256' $toolsPath = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $installFile = Join-Path $toolsPath "kvr...
dtgm/chocolatey-packages
automatic/_output/kvrt/2017.04.22.1546/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
960
Function Enter-Site { <# .SYNOPSIS Performs a login to a given SCCM Site Server. .DESCRIPTION Performs a login to a SCCM Site Server and switches to the required PSDrive. The user initiating the module must have the required permissions on the SCCM Site Server. For more information about Cmdlets see 'about_Funct...
dfch/biz.dfch.PS.Sccm.Utilities
Enter-Site.ps1
PowerShell
apache-2.0
11,240
$packageName = 'tor' $url = 'https://www.torproject.org/dist/torbrowser/6.0.4/tor-win32-0.2.8.6.zip' $checksum = '7ffa98895feb78ea06643042f079306d00613481466d1c8e028921c36f6b44d3' $checksumType = 'sha256' $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" Install-ChocolateyZipPackage -PackageName ...
dtgm/chocolatey-packages
automatic/_output/tor/0.2.8.6/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
551
[CmdletBinding()] Param( [Parameter(Mandatory=$True,Position=1,ValueFromPipeline=$true)] [string]$User, [switch]$Hide=$True ) $Value = 'TRUE' if ($Hide -eq $false) { $Value = 'FALSE' } set-ADUser -Identity $User -Replace @{"msDS-cloudExtensionAttribute1"='TRUE'}
gruberjl/powershell
Set-HideFromAddressBook/Set-HideFromAddressBook.ps1
PowerShell
apache-2.0
289
function Add-VSSSMMaintenanceWindowTaskMaintenanceWindowRunCommandParameters { <# .SYNOPSIS Adds an AWS::SSM::MaintenanceWindowTask.MaintenanceWindowRunCommandParameters resource property to the template. The MaintenanceWindowRunCommandParameters property type specifies the parameters for a RUN_COMMAND ...
scrthq/Vaporshell
VaporShell/Public/Resource Property Types/Add-VSSSMMaintenanceWindowTaskMaintenanceWindowRunCommandParameters.ps1
PowerShell
apache-2.0
11,893
$packages = @( "golang.Go" ) $code = "C:\Program Files\Microsoft VS Code\bin\code.cmd" foreach ($package in $packages) { Start-Process -FilePath $code -ArgumentList "--install-extension $package --force" -NoNewWindow -Wait }
dcjulian29/choco-packages
vscode-go/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
236
function Add-VSMediaLiveChannelVideoSelectorProgramId { <# .SYNOPSIS Adds an AWS::MediaLive::Channel.VideoSelectorProgramId resource property to the template. Used to extract video by the program ID. .DESCRIPTION Adds an AWS::MediaLive::Channel.VideoSelectorProgramId resource property to th...
scrthq/Vaporshell
VaporShell/Public/Resource Property Types/Add-VSMediaLiveChannelVideoSelectorProgramId.ps1
PowerShell
apache-2.0
2,619
## SharePoint Server: PowerShell Script to Export Site Content Types to an XML File ## <# Overview: Script that exports Site Content Types and Fields to an XML file. These exports can be filtered on Content Types Group names Environments: SharePoint Server 2010 / 2013 Farms Usage: Edit the variables below to matc...
borkit/scriptdump
PowerShell/Working/SharePoint/SharePoint2013/SP2013ExportSiteContentTypes.ps1
PowerShell
mit
1,418
param ( [string]$mavenPOMFile, [string]$options, [string]$goals, [string]$publishJUnitResults, [string]$testResultsFiles, [string]$jdkVersion, [string]$jdkArchitecture ) Write-Verbose 'Entering Maven.ps1' Write-Verbose "mavenPOMFile = $mavenPOMFile" Write-Verbose "options = $options" W...
ChristopherHaws/vso-agent-tasks
Tasks/Maven/maven.ps1
PowerShell
mit
2,317
#Requires -Version 5.0 # also requires "Windows Management Framework 5.0 Preview February 2015" check out the link below # http://blogs.msdn.com/b/powershell/archive/2015/02/18/windows-management-framework-5-0-preview-february-2015-is-now-available.aspx # get a list of static code analysis rules Get-ScriptAnalyzerRu...
jlouros/PowerShell-toolbox
Misc/PowerShell 5 Presentation Scripts (April 2015)/Demo-CodeAnalysis-Commands.ps1
PowerShell
mit
645
$current = (Get-Location).Path; # Write-Output $current Get-ChildItem $PSScriptRoot -Directory | ForEach-Object { if (-NOT $_.FullName.EndsWith("tsconfig")) { # Write-Output $_.FullName Set-Location $_.FullName; npm-check-updates -u; } } Set-Location $current;
ryanelian/ryan-compiler
templates/update.ps1
PowerShell
mit
295
$packageName = 'qttabbar' $url = 'http://qttabbar.wdfiles.com/local--files/qttabbar/QTTabBar_1030.zip' $checksum = 'cae8d6d3a0bb56d47c7ed6d7795b94fbb7aee9ad' $checksumType = 'sha1' $installerType = 'exe' $silentArgs = "/QI" $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $installFile = Join-Path ...
dtgm/chocolatey-packages
automatic/_output/qttabbar/1030.0/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
3,093
######################################################################## # # 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...
ilenghel/lis-test
WS2012R2/lisa/setupscripts/STOR_VSS_Utils.ps1
PowerShell
apache-2.0
8,101
$packageName = 'aida64-networkaudit' $url = 'http://download.aida64.com/aida64networkaudit520.zip' $checksum = 'a32a2be03ad2db4b4ecc467f64febaf2e31100f9' $checksumType = 'sha1' $url64 = "$url" $checksum64 = "$checksum" $checksumType64 = "$checksumType" $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definitio...
dtgm/chocolatey-packages
automatic/_output/aida64-networkaudit/5.20.3400/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
881
$packageName = 'pssuspend' $url = 'https://download.sysinternals.com/files/PSTools.zip' $checksum = 'd82ef74b45f7b25e5efa7311a87ecab89c259a39' $checksumType = 'sha1' $url64 = "$url" $checksum64 = "$checksum" $checksumType64 = "checksumType" $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" Install-...
dtgm/chocolatey-packages
automatic/_output/pssuspend/1.06/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
1,186
# Copyright (c) 2014-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # Update-able metad...
tburgin/osquery
tools/provision/chocolatey/cpp-netlb.ps1
PowerShell
bsd-3-clause
4,531
function Get-WmiHadr { [CmdletBinding()] param ( [parameter(Mandatory, ValueFromPipeline)] [DbaInstanceParameter[]]$SqlInstance, [PSCredential]$Credential, [switch]$EnableException ) process { foreach ($instance in $SqlInstance) { try { ...
kozloski/dbatools
internal/functions/Get-WmiHadr.ps1
PowerShell
mit
1,263
param( [Parameter(Position = 0, ValueFromPipeline = $true)] [string] $OpenALPRVersion = "2.2.0", [ValidateSet("Build", "Nupkg", "RebuildOpenALPR", "RebuildOpenALPRNet", "RebuildOpenALPRThenNupkg", "RebuildOpenALPRNetThenNupkg")] [Parameter(Position = 1, ValueFromPipeline = $true)] [string] $Target...
peters/openalpr-windows
build.ps1
PowerShell
mit
22,554
# ---------------------------------------------------------------------------------- # # 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...
ClogenyTechnologies/azure-powershell
src/ResourceManager/Storage/Commands.Management.Storage.Test/ScenarioTests/StorageAccountTests.ps1
PowerShell
apache-2.0
24,635
# # xSqlTsqlEndpoint: DSC resource to configure SQL Server instance # TCP/IP listening port for T-SQL connection # function Get-TargetResource { param ( [parameter(Mandatory)] [ValidateNotNullOrEmpty()] [string] $InstanceName, [ValidateRange(1,65535)] ...
OmegaMadLab/SQLScripts
tcdit2017/tcdit-sqlvm-alwayson-cluster/scripts/PrepareSqlServerVM.ps1/xSQL/DSCResources/MicrosoftAzure_xSqlTsqlEndpoint/MicrosoftAzure_xSqlTsqlEndpoint.psm1
PowerShell
mit
5,347
# Copyright 2012 - 2015 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 agr...
pshdo/Carbon
Tools/Blade/Functions/Assert-NotEqual.ps1
PowerShell
apache-2.0
1,622
[cmdletbinding()] param ( [string]$resourcegroup ) Write-Host "Drop databases" $servers = Get-AzureRmSqlServer -ResourceGroupName $resourcegroup foreach ($sqlServerName in $servers){ Write-Host $sqlServerName.ServerName $databases = Get-AzureRmSqlDatabase -ResourceGroupName $resourcegroup -ServerName ...
hsachinraj/DevOps-Immersion-Labs
source/BuildScripts/DropDatabasesRG.ps1
PowerShell
mit
680
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # VS 11 and above supports the new intellisense JS files $vsVersion = [System.Version]::Parse($dte.Version) $supportsJsIntelliSenseFile = $vsVersion.Major -ge 11 if (-not $supportsJsIntelliSenseFile) { $displayVersion = $vsVe...
MicrosoftLearning/20486-DevelopingASPNETMVCWebApplications
Allfiles/20486C/Mod08/LabFiles/PhotoSharingApplication_08_end/packages/jQuery.1.10.2/Tools/install.ps1
PowerShell
mit
11,913
# # Install all of the DSC modules # # install-module -name xActiveDirectory -force install-module -name xNetworking -force install-module -name xComputerManagement -force install-module -name xPendingReboot -force install-module -name xSystemSecurity -force install-module -name xRemoteDesktopAdmin -force install-mod...
jakewatkins/PowerShell
installDSCmodules.ps1
PowerShell
mit
745
# # Load_Xaml.ps1 # Function Global:Read-Xaml($Path) { $XamlPath = Join-Path $BasedDirectory $Path $Xaml = [System.IO.File]::ReadAllText($XamlPath, [System.Text.Encoding]::UTF8) $Xaml = $Xaml.Replace("%BasedDirectory%", $BasedDirectory) Return [System.Windows.Markup.XamlReader]::Parse($Xaml) } Functio...
morokoshi/Build-BootableWindowsPe
Windows PE Builder/Windows PE Builder/Scripts/5-1-Load-Xaml.ps1
PowerShell
mit
15,866
# # UploadArtifact.ps1 # # Requirements: https://www.powershellgallery.com/packages/OneDrive/1.0.3 # PowerShell 5.0 or higher # Install-Module -Name OneDrive -Scope CurrentUser # GUI way $authentication = Get-ODAuthentication -ClientID "9b072ee0-d954-4eae-bfe6-d9a7e8472776" $AuthCode = $authentication.access_token G...
abeckDev/vsts-onedrive-upload
UploadArtifact/UploadArtifact.ps1
PowerShell
mit
965
function Enable-UAC { <# .SYNOPSIS Turns on Windows User Access Control .LINK http://boxstarter.codeplex.com #> Write-Output "Enabling UAC" Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name EnableLUA -Value 1 -Force }#function Enable-UAC
SolidOceanTrust/Public-PowerShell
WinConfig/1.0.6/public/Enable-UAC.ps1
PowerShell
mit
291
<# .SYNOPSIS Compares the Access Control Lists for two directories. .DESCRIPTION Function to comapre two directories' access permissions. .PARAMETER ReferenceDir The reference directory to be compared to. .PARAMETER DifferenceDir The directory to compare to the reference directory. .EXAMPLE ...
SotoDucani/scripts
Compare-DirACL.ps1
PowerShell
mit
947
Describe 'Function Rank' -Tag Build { Context "Unit Tests" { it "Get-Rank should not throw an error" { {Rank lhs rhs } | Should Not Throw } it "Rank alias should not throw an error" { {Rank lhs rhs} | Should Not Throw } It "Creates a rank grouping"...
KevinMarquette/PSGraph
Tests/Rank.Tests.ps1
PowerShell
mit
1,315
ConvertFrom-StringData @' SiteNotFound = Site: '{0}' not found in SitesIncluded. Current SitesIncluded: '{1}'. (ADRSL0001) SiteFoundInExcluded = Excluded '{0}' site found in SitesIncluded. Current SitesIncluded: '{1}'. (ADRSL0002) PropertyNotInDesiredState = '{0}' is ...
PowerShell/xActiveDirectory
source/DSCResources/MSFT_ADReplicationSiteLink/en-US/MSFT_ADReplicationSiteLink.strings.psd1
PowerShell
mit
1,358
function Get-CAMLease { <# .SYNOPSIS Function to retrieve Lease from the Cireson Asset Management .DESCRIPTION Function to retrieve Lease from the Cireson Asset Management .PARAMETER DisplayName Specifies the Displayname .PARAMETER Id Specifies the ID .EXAMPLE Get-CAMLease .EXAMPLE Get-CAMLease -DisplayName "*Pro...
lazywinadmin/CiresonAssetManagementPS
CiresonAssetManagementPS/Public/Get-CAMLease.ps1
PowerShell
mit
1,551
Import-Module -Name ActiveDirectory Add-PSSnapin 'Microsoft.Exchange.Management.PowerShell.SnapIn' $Excel = New-Object -Com Excel.Application $Workbook = $Excel.Workbooks.Open('C:\Users\Barkz\Desktop\Exchange-AD-Example.xlsx') $row = 2 $Worksheet = $Workbook.Worksheets.Item('Test Accounts') $xlCellTypeVisible = 12...
PureStorage-OpenConnect/powershell-scripts
New-TestMailboxSetup.ps1
PowerShell
apache-2.0
8,693
$name = 'HostsMan' $zipName = "$name.zip" $installer = "HostsMan_Setup.exe" $silentArgs = "/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-" $url = '{{DownloadUrl}}' $pwd = "$(split-path -parent $MyInvocation.MyCommand.Definition)" $tempDir = Join-Path $env:TEMP $name if (![System.IO.Directory]::Exists($tempDir)) {...
ebugusey/chocolatey-coreteampackages
automatic/hostsman/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
664
Remove-Item "${env:ProgramFiles(x86)}\Embarcadero\*" -Verbose -Recurse -Force Remove-Item "$env:ProgramData\Embarcadero\*" -Verbose -Recurse -Force Remove-Item "$env:APPDATA\Embarcadero\*" -Verbose -Recurse -Force Remove-Item "$env:LOCALAPPDATA\Embarcadero\*" -Verbose -Recurse -Force Remove-Item "$env:PUBLIC\Documents\...
mattia72/powershell
Clean-DelphiAfterUninstall.ps1
PowerShell
apache-2.0
854
$packageName = 'dolphin' $url = 'https://dl.dolphin-emu.org/builds/dolphin-master-5.0-3908-x64.7z' $checksum = '6ddc4916356a87dc425f41761b796faaac0c4d204bd1b635c8027c59435e34b6' $checksumType = 'sha256' $url64 = $url $checksum64 = $checksum $checksumType64 = $checksumType $toolsDir = "$(Split-Path -parent $MyInvocation...
dtgm/chocolatey-packages
automatic/_output/dolphin/5.0.3908/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
788
# Localized ArchiveResources.psd1 ConvertFrom-StringData @' ###PSLOC InvalidChecksumArgsMessage=Specifying a Checksum without requesting content validation (the Validate parameter) is not meaningful InvalidDestinationDirectory=The specified destination directory {0} does not exist or is not a directory InvalidSo...
cyberious/puppetlabs-dsc
lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xArchive/en-us/ArchiveResources.psd1
PowerShell
apache-2.0
2,771
$ErrorActionPreference = "Stop" $logfile ="$env:TEMP\rjODTInstall$(get-date -f yyyy-MM-dd_HH-MM-ss).log" function Test-IsAdmin { ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator") } write-output "You can find th...
sev17/orainstall
ODTforVS2015/uninstall-odt.ps1
PowerShell
apache-2.0
2,106
<# DESCRIPTION: Checks for any mounted CD/DVD or floppy drives. REQUIRED-INPUTS: None DEFAULT-VALUES: None DEFAULT-STATE: Enabled RESULTS: PASS: No CD/ROM or floppy drives are mounted WARNING: FAIL: One or more CD/...
My-Random-Thoughts/Server-QA-Checks
checks/virtual/c-vmw-07-cd-dvd-floppy-mounted.ps1
PowerShell
apache-2.0
2,196
add-type -AssemblyName microsoft.VisualBasic add-type -AssemblyName System.Windows.Forms Calc start-sleep -Milliseconds 500 [Microsoft.VisualBasic.Interaction]::AppActivate("c:\Windows\SysWOW64\calc.exe") [System.Windows.Forms.SendKeys]::SendWait("31337") #
johnventura/The-Salad-Project
ewok/example.ps1
PowerShell
bsd-3-clause
259
[CmdletBinding()] param() Trace-VstsEnteringInvocation $MyInvocation try { Import-VstsLocStrings "$PSScriptRoot\Task.json" # Get the inputs. [string]$project = Get-VstsInput -Name project -Require [string]$target = Get-VstsInput -Name target [string]$configuration = Get-VstsInput -Name configurati...
alexmullans/vsts-tasks
Tasks/XamarinAndroid/XamarinAndroid.ps1
PowerShell
mit
2,745
$packageName = 'dar' $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $url = 'http://sourceforge.net/projects/dar/files/dar/2.5.1/dar64-2.5.1-i386-windows.zip/download' $checksum = '63e785f39dc33a351adb0608e68e49aa220b80c9' $checksumType = 'sha1' $url64 = "$url" $checksum64 = "$checksum" $checksum...
dtgm/chocolatey-packages
automatic/_output/dar/2.5.1/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
789
[CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true,ParameterSetName="AWS EC2 AMI")] [Parameter(Mandatory=$true,ParameterSetName="Vagrant Hyper-V")] [string]$ISHVersion, [Parameter(Mandatory=$false,ParameterSetName="AWS EC2 AMI")] [Parameter(Mandatory=$true,ParameterSetNam...
beutepa/ISHBootstrap
Source/Invoke-PackerBuild.ps1
PowerShell
apache-2.0
8,688
param( $PublishSuccesfulPackages, $DeploymentTargetUserName, $DeploymentTargetPassword, $FeedAPIKey, $AzureSubscriptionName, $AzureSubscriptionId, $AzureSubscriptionCertificate, $debug ) $here = Split-Path -Parent $MyInvocation.MyCommand.Path #Download everything we need and import modu...
fhchina/boxstarter
Boxstarter.TestRunner/BoxstarterBuild.ps1
PowerShell
apache-2.0
1,495
# # Module manifest for module 'LazyGit' # # Generated by: Dave Senn # # Generated on: 30.04.2020 # @{ # Script module or binary module file associated with this manifest. RootModule = 'PsGitShortcuts.psm1' # Version number of this module. ModuleVersion = '1.2.2' # ID used to uniquely identify this module GUID = '5...
DaveSenn/PsGitShortcuts
PsGitShortcuts.psd1
PowerShell
mit
4,724
@{ RootModule = 'vCitrixReceiver.schema.psm1'; ModuleVersion = '1.0'; GUID = '5eada18f-4a4b-43a6-8eb7-2aeb453f846b'; Author = 'Iain Brighton'; CompanyName = 'Virtual Engine'; Copyright = '(c) 2016 Virtual Engine Limited. All rights reserved.'; Description = 'Virtual Engine Citrix Receiver D...
VirtualEngine/VirtualEngineLab
DSCResources/vCitrixReceiver/vCitrixReceiver.psd1
PowerShell
mit
349
$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...
dsolodow/dbatools
tests/Set-DbaDbMirror.Tests.ps1
PowerShell
mit
1,038
ng build --prod --output-path "./dist" --base-href "https://emilol.github.io/angular-crumbs/" ng build bootstrap-demo --prod --output-path "./dist/bootstrap" --base-href "https://emilol.github.io/angular-crumbs/bootstrap/" ng build material-demo --prod --output-path "./dist/material" --base-href "https://emilol.github....
emilol/angular2-crumbs
demos/demo-angular-six/build.ps1
PowerShell
mit
348
function Register-PInvoke { <# .NOTES Kindly donated by Micorsoft from: https://github.com/PowerShell/xPSDesiredStateConfiguration/blob/564bfba5bb0114623a334e1c7a8842b4996e05a6/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.psm1 #> [CmdletBinding()] param ( ) process { ...
VirtualEngine/RESONEAutomation
DSCResources/ROACommon/Src/Register-PInvoke.ps1
PowerShell
mit
11,278
param($minutes = 460) $myshell = New-Object -com "Wscript.Shell" for ($i = 0; $i -lt $minutes; $i++) { Start-Sleep -Seconds 60 $myshell.sendkeys(".") }
doomjaw87/P0w3rSh3ll
Examples/active.ps1
PowerShell
mit
160
<# .SYNOPSIS This is a Powershell script to bootstrap a Cake build. .DESCRIPTION This Powershell script will download NuGet if missing, restore NuGet tools (including Cake) and execute your Cake build script with the parameters you provide. .PARAMETER Script The build script to execute. .PARAMETER Target The build...
CakeTin/Cake.Tin
build.ps1
PowerShell
mit
2,989
$ErrorActionPreference='Stop' trap { write-error $_ exit 1 } $env:GOPATH = Join-Path -Path $PWD "gopath" $env:PATH = $env:GOPATH + "/bin;C:/go/bin;C:/var/vcap/bosh/bin;" + $env:PATH cd $env:GOPATH/src/github.com/cloudfoundry/gosigar function NeedsToInstallGo() { Write-Host "Checking if Go needs to be ins...
object88/langd
vendor/github.com/cloudfoundry/gosigar/ci/tasks/test-unit.ps1
PowerShell
mit
1,697
# Set the path of the VMWare Tools ISO - this is set in the Packer JSON file if ($ENV:PACKER_BUILDER_TYPE -eq "hyperv-iso") { Write-Output "Nothing to do for Hyper-V" exit 0 } $isopath = "C:\Windows\Temp\windows.iso" # Mount the .iso, then build the path to the installer by getting the Driveletter attri...
luciusbono/Packer-Windows10
install-guest-tools.ps1
PowerShell
mit
2,990
#example 1: Test-Connection -ComputerName mbx1 #example 2: Test-Connection -ComputerName mbx1,mbx2 #example 3: Test-Connection -ComputerName mbx1,mbx2 -Count 1 #example 4: Get-ExchangeServer | ForEach-Object{Test-Connection -ComputerName $_.Name -Count 1} #example 5: Get-Content C:\servers.txt | Wher...
mikepfeiffer/ex-2013-ps-cookbook
Chapter 12/VerifyingServerConnectivity.ps1
PowerShell
mit
438
[string]$Name = '' [string]$IPAddress = '' [uint32]$Port = '' [Hashtable]$Listener = $null [bool]$IsConnected = $false $Received = [hashtable]::Synchronized(@{}) function Discover { $udpClient = New-Object System.Net.Sockets.UdpClient $udpClient.EnableBroadcast = $true $udpClient.Client.ReceiveTimeout = 10...
paruljain/onkyo
onkyo.psm1
PowerShell
mit
4,480
$packageName = 'firefox-nightly' $softwareVersion = '58.0.1.2017092502-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-UninstallReg...
dtgm/chocolatey-packages
automatic/_output/firefox-nightly/58.0.1.2017092502/tools/chocolateyUninstall.ps1
PowerShell
apache-2.0
817
# 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
Test/IIS/Test-GetIisAppPool.ps1
PowerShell
apache-2.0
1,549
$packageName = 'outlookaddressbookview' $url = 'http://www.nirsoft.net/utils/outlookaddressbookview.zip' $checksum = 'c628f351cc6b5c28904c886cc5378eee77dfec2e584e90c8a73efa3005b383e7' $checksumType = 'sha256' $url64 = 'http://www.nirsoft.net/utils/outlookaddressbookview-x64.zip' $checksum64 = 'c38f2f4503405f96dfc732ea9...
dtgm/chocolatey-packages
automatic/_output/outlookaddressbookview/2.13/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
1,027
# 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...
jberezanski/choco
src/chocolatey.resources/helpers/functions/Install-ChocolateyPath.ps1
PowerShell
apache-2.0
4,334
# IMPORTANT: Before releasing this package, copy/paste the next 2 lines into PowerShell to remove all comments from this file: # $f='c:\path\to\thisFile.ps1' # gc $f | ? {$_ -notmatch "^\s*#"} | % {$_ -replace '(^.*?)\s*?[^``]#.*','$1'} | Out-File $f+".~" -en utf8; mv -fo $f+".~" $f # If this is an MSI, cleaning ...
dtgm/chocolatey-packages
automatic/udpixel.install/tools/chocolateyUninstall.ps1
PowerShell
apache-2.0
3,927
<######################################################################### # # INFIVERVE TECHNOLOGIES PTE LIMITED CONFIDENTIAL # __________________ # # (C) INFIVERVE TECHNOLOGIES PTE LIMITED, SINGAPORE # All Rights Reserved. # Product / Project: Flint IT Automation Platform # NOTICE: All information con...
getflint/fb-cloud
azure-stack/operation/powershell/create_linux_vm.ps1
PowerShell
apache-2.0
4,243
function New-UdpStream { <# Author: Jesse Davis (@secabstraction) License: BSD 3-Clause #> [CmdletBinding(DefaultParameterSetName = 'Client')] Param ( [Parameter(Position = 0, ParameterSetName = 'Client')] [Net.IPAddress]$ServerIp, [Parameter(Position = 0, ParameterSetName = 'Liste...
secabstraction/PowerCat
Functions/NetworkStreams/New-UdpStream.ps1
PowerShell
bsd-3-clause
3,537
#requires -Version 3.0 #region Info <# Support: https://github.com/jhochwald/NETX/issues #> #endregion Info #region License <# Copyright (c) 2016, Quality Software Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the fo...
jhochwald/NETX
Profile/functions/Send-SlackChat.ps1
PowerShell
bsd-3-clause
17,292
function Get-GPPPassword { <# .SYNOPSIS Retrieves the plaintext password and other information for accounts pushed through Group Policy Preferences. PowerSploit Function: Get-GPPPassword Author: Chris Campbell (@obscuresec) License: BSD 3-Clause Required Dependencies: None Optional Dependenci...
nullbind/PowerSploit
Exfiltration/Get-GPPPassword.ps1
PowerShell
bsd-3-clause
5,263
function InitializeModule { # Fill the build task cache. This makes the module immune to source file deletion once the cache is filled (when building itself). $null = Get-BuildTask -ListAvailable }
indented-automation/BuildTools
Indented.Build/InitializeModule.ps1
PowerShell
mit
205
$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" { $paramCount = 6 $defaultParamCount = 11 ...
SirCaptainMitch/dbatools
tests/Get-DbaAgentJob.Tests.ps1
PowerShell
mit
3,212
#NOTE: Please remove any commented lines to tidy up prior to releasing the package, including this one $packageName = 'TotalCommander' # arbitrary name for the package, used in messages $installerType = 'EXE' #only one of these two: exe or msi $url = 'https://github.com/calwell/nugetpackages/raw/master/TotalCommander...
dtgm/chocolatey-packages
automatic/_output/totalcommander/8.01/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
3,005
function Get-BoxStarterConfig { <# .SYNOPSIS Retrieves persisted Boxstarter configuration settings. .DESCRIPTION Boxstarter stores configuration data in an xml file in the Boxstarter base directory. The Get-BoxstarterConfig function is a convenience function for reading those settings. .LINK http://boxstarter.org abo...
fhchina/boxstarter
Boxstarter.Chocolatey/Get-BoxstarterConfig.ps1
PowerShell
apache-2.0
950
# 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 ...
andrewsykim/kubernetes
cluster/gce/windows/configure.ps1
PowerShell
apache-2.0
6,091
# Copyright (c) Microsoft Corporation. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of this distribution. If # you cannot locate the Apache License, Version 2.0, please send an email to # ...
jkorell/PTVS
Python/Product/PythonTools/Templates/SharedFiles/LaunchWorker.ps1
PowerShell
apache-2.0
4,352
# how to collect the data from Pester and use them in a good looking webpage for the boos # simple test invoke-pester -Script simple.test.ps1 # function .\integration.function.test.ps1 # parameter $Date = Get-Date -Format ddMMyyyHHmmss $reportFolder = 'c:\report\' if (!(test-path $reportFolder)) { mkdir ...
omiossec/PowerShellSaterday-OM
3-testingTheInfra/runingthetest.ps1
PowerShell
mit
557
<# Copyright (c) 2013 Code Owls LLC, All Rights Reserved. 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 app...
beefarino/TxF
default.ps1
PowerShell
mit
4,820
<# .SYNOPSIS Creates a Vagrant box for Debian 8 (Jessie). .DESCRIPTION The New-JessieBox function creates a Vagrant box with a minimal installation of Debian 8 (Jessie). The box is customizable using the definition file, which is written in PowerShell object notation (PSON). The following things c...
jstuyts/vagrant-jessie-minimal-amd64-customizable
New-JessieBox.ps1
PowerShell
mit
11,251
## Profile.ps1 ## Creates profile for Powershell with useful functions ## ## Author: J. Lerma ## Date: December 13, 2015 ## ### FUNCTIONS # Function to open profile for editing function pro {notepad $profile.CurrentUserAllHosts} # Function to open PowerShell Help in a .chm file # where language code is 0409 (fo...
JoseALermaIII/PowerShell-tutorial
Scripts/1-Profile.ps1
PowerShell
mit
1,175
Param( [string] $Version = "2.12.45" ) $ErrorActionPreference = 'Stop' $uri = "https://xamarin.azureedge.net/GTKforWindows/Windows/gtk-sharp-$Version.msi" $HOME_DIR = if ($env:HOME) { $env:HOME } else { $env:USERPROFILE } $tempDir = Join-Path "$HOME_DIR" "gtk-sharp-temp" $installer = Join-Path "$tempDir" "gtk-sh...
mono/SkiaSharp
scripts/install-gtk.ps1
PowerShell
mit
706
#download installer $client = new-object System.Net.WebClient $client.DownloadFile("https://cloudbase.it/downloads/CloudbaseInitSetup_Stable_x64.msi", "C:\windows\temp\CloudbaseInitSetup_Stable_x64.msi" ) # install the payload start-process -FilePath 'c:\Windows\temp\CloudbaseInitSetup_Stable_x64.msi' -ArgumentLi...
trodemaster/packer-win-pc
scripts/cloudbase-init.ps1
PowerShell
mit
1,356