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
Set-DefaultAWSRegion 'us-east-1' #$VerbosePreference='Continue' trap { break } #This stops execution on any exception $ErrorActionPreference = 'Stop' cd $PSScriptRoot . .\ssmcommon.ps1 #Define which accounts or AWS services can assume the role. $assumePolicy = @" { "Version":"2012-10-17", "Statement":[ ...
padisetty/Samples
AWS/ssm/Old/setup-config.ps1
PowerShell
apache-2.0
7,197
Function Get-TargetResource { Param( [Parameter(Mandatory=$True)] [ValidateNotNullOrEmpty()] [string]$ZoneName, [Parameter(Mandatory=$True)] [ValidateNotNullOrEmpty()] [string[]]$MasterServers, [Parameter(Mandatory=$True)] [ValidateSet("No...
ConclusionMC/puppetlabs-dsc
lib/puppet_x/dsc_resources/cDns/DSCResources/cDns_ConditionalForwarder2/cDns_ConditionalForwarder2.psm1
PowerShell
apache-2.0
4,650
Import-Module -Name $CI_MODULE_MANIFEST_PATH -Force $systemUnderTest = ( Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '\.Tests\.', '.' $function = $systemUnderTest.Split( '.' )[0] $describe = $Global:FORM_FUNCTION_PUBLIC -f $function Describe -Name $describe -Tag 'Function', 'Public', $function -Fixture {...
tlindsay42/ArmorPowerShell
tests/public/Get-ArmorAccountContext.Tests.ps1
PowerShell
apache-2.0
3,372
<# ---------------------------------------------------- Title: Add Computer to Group Author: Michael Mayer Description: Used to add a single computer a Security Group Created: 11-08-2013 ---------------------------------------------------- #> import-module ActiveDirectory #imports modules depending on directory $pat...
mjmayer/fuzzy-robot
admin-scripts/add_computer_to_group.ps1
PowerShell
apache-2.0
1,238
### 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 ### (the "License"); you ma...
cbaenziger/oozie
distro/src/main/bin/oozie-setup.ps1
PowerShell
apache-2.0
9,356
function New-VSNetworkManagerDevice { <# .SYNOPSIS Adds an AWS::NetworkManager::Device resource to the template. Specifies a device. .DESCRIPTION Adds an AWS::NetworkManager::Device resource to the template. Specifies a device. .LINK http://docs.aws.amazon.com/AWSCloudFormation...
scrthq/Vaporshell
VaporShell/Public/Resource Types/New-VSNetworkManagerDevice.ps1
PowerShell
apache-2.0
17,490
function Get-LogonEvents { param( [CmdletBinding()] [int] $DaysBefore = 21, [string] $OutputFilePath, [string] $OutputCSVFilePath, [switch] $FormatTable = $false ) begin { $ErrorActionPreference = "Stop" $logins = @() [System.Diagnostics.Debug]::WriteLine("DaysBefore $DaysBefore")...
mattia72/powershell
Modules/Get-LogonEvents/Get-LogonEvents.psm1
PowerShell
apache-2.0
2,559
function New-VSS3Object { <# .SYNOPSIS Uploads an object to S3 .PARAMETER BucketName The name of the bucket to contain the object. .PARAMETER CannedACL The canned access control list (CACL) to apply to the object. Valid options are: "NoACL","Private","PublicRead","PublicReadWrite","Authent...
scrthq/Vaporshell
VaporShell/Public/SDK Wrappers/S3/New-VSS3Object.ps1
PowerShell
apache-2.0
3,259
function Get-LaunchSettings(){ ls -Recurse -Filter launchSettings.json|%{ $fileName = $_.Directory.Parent; gc $_.FullName|ConvertFrom-Json|%{ $url=$_.profiles."$fileName".applicationUrl; Write-Host "$fileName : $url"; } } }
iamkarlson/dotfiles
powershell/autorun/get-launchsettings.ps1
PowerShell
bsd-2-clause
273
Trace-VstsEnteringInvocation $MyInvocation Import-VstsLocStrings "$PSScriptRoot\Task.json" # Get inputs. $scriptType = Get-VstsInput -Name ScriptType -Require $scriptPath = Get-VstsInput -Name ScriptPath $scriptInline = Get-VstsInput -Name Inline $scriptArguments = Get-VstsInput -Name ScriptArguments $__vsts_input_err...
grawcho/vso-agent-tasks
Tasks/AzurePowerShellV3/AzurePowerShell.ps1
PowerShell
mit
6,411
function Test-DbaAgentJobOwner { <# .SYNOPSIS Checks SQL Agent Job owners against a login to validate which jobs do not match that owner. .DESCRIPTION This function checks all SQL Agent Jobs on an instance against a SQL login to validate if that login owns those SQL Agent Jobs or not. By de...
Splaxi/dbatools
functions/Test-DbaAgentJobOwner.ps1
PowerShell
mit
6,595
$packageName = 'ums' $installerType = 'exe' $silentArgs = '/S' # hack to workaround limitation with chocopkgup/ketarin $url = 'http://sourceforge.net/projects/unimediaserver/files/Official%20Releases/Windows/UMS-5.0.0-Java7.exe/download' $validExitCodes = @(0) Install-ChocolateyPackage "$packageName" "$installerType"...
dtgm/chocolatey-packages
automatic/_output/ums/5.0.0/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
375
$packageName = 'wakemeonlan' $url = 'http://www.nirsoft.net/utils/wakemeonlan.zip' $checksum = '7b0de93a56e982c001f1cab1f1b350bd7a3c3e5c' $checksumType = 'sha1' $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $installFile = Join-Path $toolsDir "$($packageName).exe" Install-ChocolateyZipPackage -...
dtgm/chocolatey-packages
automatic/_output/wakemeonlan/1.68/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
672
$packageName = 'aida64-extreme' $installerType = 'EXE' $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' $validExitCodes = @(0) #please insert other valid exit codes here, exit codes for ms http://msdn.microsoft.com/en-us/library/aa368542(VS.85).aspx try { $processor = Get-WmiObject Win32_Processor $is...
dtgm/chocolatey-packages
automatic/_output/aida64-extreme/4.60.3100/tools/chocolateyUninstall.ps1
PowerShell
apache-2.0
857
try { Add-Type -TypeDefinition "public enum Syslog_Facility { kern, user, mail, daemon, auth, syslog, lpr, news, uucp, cron, authpriv, ftp, ntp, logaudit, logalert, clock, local0, local1, local2, local3, local4, local5, local6, local7 }" Add-Type -TypeDefinition "public enum Syslog_Severity { emerg, alert, crit...
jheiselman/utilities
Powershell/Syslog/Syslog.psm1
PowerShell
mit
5,603
# Variables $projectDir = Get-Location $outdir = "${env:ProgramFiles(x86)}\Microsoft SDKs\NuGetPackages\" # Build azure-amqp sl Dependencies\azure-amqp\Microsoft.Azure.Amqp\ dotnet restore dotnet build dotnet pack sl $projectDir # Install azure-amqp cp Dependencies\azure-amqp\Microsoft.Azure.Amqp\bin\Debug\Microsoft....
jonmseaman/WebSocketToEventHub
configure.ps1
PowerShell
mit
1,126
ConvertFrom-StringData @' ###PSLOC # Common NoKeyFound = No Localization key found for ErrorType: '{0}'. AbsentNotImplemented = Ensure = Absent is not implemented! TestFailedAfterSet = Test-TargetResource returned false after calling set. RemoteConnectionFailed = Remote PowerShell connection to Server '{0}' fail...
randorfer/RunbookExample
PowerShellModules/xSQLServer/1.4.0.0/en-US/xSQLServer.strings.psd1
PowerShell
mit
765
$script:dscModuleName = 'DnsServerDsc' $script:dscResourceName = 'DSC_DnsServerRootHint' function Invoke-TestSetup { try { Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop' } catch [System.IO.FileNotFoundException] { throw 'DscResource.Test module dependency not found....
PowerShell/xDnsServer
tests/Unit/DSC_DnsServerRootHint.Tests.ps1
PowerShell
mit
5,078
function Usage { Write-Host "Usage :" Write-Host "" Write-Host " CreateQueue.ps1 <-c,d> <queuename> <Y/N - Private> <user> <all:restrictedPermission> [T:Transactional]" Write-Host "" exit; } $opeartion = $Args[0] $queuename = ".\" + $Args[1] $private = $Args[2] $User = $Args[3] $permission = $Ar...
lholman/AutoBot
lib/psake/CreateQueue.ps1
PowerShell
mit
2,409
# Sound: Disable Startup Sound Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" "DisableStartupSound" 1 Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\BootAnimation" "DisableStartupSound" 1 ### Explorer, Taskbar, and System Tray ### ----------...
khornberg/dotfiles
os/windows/tweaks.ps1
PowerShell
mit
3,321
function Update-DbaMaintenanceSolution { <# .SYNOPSIS Download and Update SQL Server Maintenance Solution created by Ola Hallengren (https://ola.hallengren.com) .DESCRIPTION This script will download and update the latest version of SQL Server Maintenance Solution created by Ola Hallengren....
wsmelton/dbatools
functions/Update-DbaMaintenanceSolution.ps1
PowerShell
mit
8,199
Import-Module AU Import-Module "$PSScriptRoot\..\..\scripts\au_extensions.psm1" $domain = 'https://sourceforge.net' $releases = "$domain/projects/pspp4windows/files/" $softwareName = 'pspp*' function global:au_BeforeUpdate { Get-RemoteFiles -Purge -NoSuffix -FileNameSkip 1 } function global:au_AfterUpdate { Set-D...
octomike/chocolatey-coreteampackages
automatic/pspp/update.ps1
PowerShell
apache-2.0
2,058
Function Get-3PARAo { <# .SYNOPSIS Retrieve informations about the configuration of Adaptive optimization (AO). .DESCRIPTION This function will retrieve informations about the configuration of Adaptive optimization (AO). You need to have an active session with the array. .NOTES Wr...
equelin/3PAR-Powershell
3PAR-Powershell/Public/Get-3PARAo.ps1
PowerShell
apache-2.0
1,649
$packageName = '{{PackageName}}' $installerType = 'exe' $url = '{{DownloadUrl}}' $checksum = '{{Checksum}}' $checksumType = 'sha1' $validExitCodes = @(0) $binRoot = Get-BinRoot $installPath = Join-Path $binRoot "Foldit" $silentArgsBase = '/S /D=' $silentArgs = $($silentArgsBase + '"' + $installPath + '"') Install-Cho...
maharishi/chocolatey-packages
automatic/foldit/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
681
# # Node snapshot setup file # https://github.com/turboapps/turbome/tree/master/node/current # # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $content = (Invoke-WebRequest -URI "https://nodejs...
turboapps/turbome
node/current/snapshot.ps1
PowerShell
apache-2.0
856
$packageName = 'dolphin' $url = 'http://dl.dolphin-emu.org/builds/dolphin-master-5.0-3427-x64.7z' $checksum = 'a8780e30b808db2951056e378998a6ea6e66cdc93ffcf1fdc7c84b3da66db806' $checksumType = 'sha256' $url64 = $url $checksum64 = $checksum $checksumType64 = $checksumType $toolsDir = "$(Split-Path -parent $MyInvocation...
dtgm/chocolatey-packages
automatic/_output/dolphin/5.0.3427/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
790
$basePath = (Get-Item $ScriptRoot/../../../).FullName $buildPath = $basePath + "Build\" + $targetSystem New-Item -ItemType Directory -Force -Path $buildPath | Out-Null echo "Base Path: $basePath" echo "Build Path: $buildPath"
mlomb/OrbitEngine
Tools/Build/Windows/common.ps1
PowerShell
apache-2.0
227
$packageName = 'firefox-nightly' $softwareVersion = '55.0.1.2017031021-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.2017031021/tools/chocolateyUninstall.ps1
PowerShell
apache-2.0
820
# 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 (the # "License"); you may not u...
ptrendx/mxnet
ci/windows/test_py3_gpu.ps1
PowerShell
apache-2.0
2,080
$packageName = 'awscli' $installerType = 'msi' $silentArgs = '/quiet /qn /norestart' $url = 'https://s3.amazonaws.com/aws-cli/AWSCLI32-1.14.35.msi' $checksum = 'ae96bbfc750a124e9a16da3ca856b5395a5c53614989925164c277efe2c836d2' $checksumType = 'sha256' $url64 = 'https://s3.amazonaws.com/aws-cli/AWSCLI64-1.14.35.msi' $ch...
dtgm/chocolatey-packages
automatic/_output/awscli/1.14.35/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
982
@{ RootModule = 'PSModule.psm1' ModuleVersion = '2.0.0' GUID = '1d73a601-4a6c-43c5-ba3f-619b18bbb404' Author = 'Microsoft Corporation' CompanyName = 'Microsoft Corporation' Copyright = '(c) Microsoft Corporation. All rights reserved.' Description = 'PowerShell module with commands for discovering, installing, up...
pshdo/LibGit2.PowerShell
.whiskey/PowerShellGet/PowerShellGet.psd1
PowerShell
apache-2.0
20,216
#Execute ################################################################################################# # Uninstall a program silently # # This script checks the registry for software to remove matching the search string # it can remove both msi packages and run WinPE uninstallers. # This uninstaller will aut...
Layer8Err/PowerShell_fmwrk
Local/UninstallSoftware.ps1
PowerShell
bsd-2-clause
2,580
#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 fol...
jhochwald/NETX
Profile/functions/LoadTest.ps1
PowerShell
bsd-3-clause
15,211
. $PSScriptRoot\CommonServerPowerShell.ps1 $script:INTEGRATION_NAME = "EWS extension" $script:COMMAND_PREFIX = "ews" $script:INTEGRATION_ENTRY_CONTEXT = "EWS" $script:JUNK_RULE_ENTRY_CONTEXT = "$script:INTEGRATION_ENTRY_CONTEXT.Rule.Junk(val.Email && val.Email == obj.Email)" $script:MESSAGE_TRACE_ENTRY_CONTEXT = "$sc...
demisto/content
Packs/EWS/Integrations/EwsExtension/EwsExtension.ps1
PowerShell
mit
58,006
$packageName = 'drivergenius' $installerType = 'exe' $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' $url = 'http://www.driver-soft.com/products/DG_Setup.exe' $checksum = '115aea224d55e3235f2a783df2aafc269b5c2a44ba5e77bd752cb122594d3bc2' $checksumType = 'sha256' $validExitCodes = @(0) Install-Chocolatey...
dtgm/chocolatey-packages
automatic/_output/drivergenius/17.0.0.139/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
674
# Ref. https://raw.githubusercontent.com/cake-build/resources/480522f00dc9671225c0d32713d858dc5ac1d56e/build.ps1 ########################################################################## # This is the Cake bootstrapper script for PowerShell. # This file was downloaded from https://github.com/cake-build/resources # Fe...
khalidabuhakmeh/filter
build.ps1
PowerShell
mit
8,132
$toolsPath = Split-Path $MyInvocation.MyCommand.Definition . $toolsPath\helpers.ps1 $packageName = 'php' $installLocation = GetInstallLocation -libDirectory "$toolsPath\.." if ($installLocation) { UninstallPackage -libDirectory "$toolsPath\.." -packageName $packageName $di = Get-ChildItem $installLocation -ea ...
octomike/chocolatey-coreteampackages
automatic/php/tools/chocolateyUninstall.ps1
PowerShell
apache-2.0
563
# ---------------------------------------------------------------------------------- # # 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/...
atpham256/azure-powershell
src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowRunTests.ps1
PowerShell
apache-2.0
5,666
<# .SYNOPSIS Imports the SCCM PowerShell Module .DESCRIPTION This function will import the SCCM PowerShell module without the need of knowing the location. The only thing that needs to be specified is the name of the SCCM server. .NOTES =============================================================...
MicksITBlogs/PowerShell
ImportSCCMModule.ps1
PowerShell
mit
2,823
#Requires -Version 3.0 function Convert-MrSqlLogSequenceNumber { <# .SYNOPSIS Converts a SQL LSN (log sequence number) from a three part hexadecimal number format to a decimal based string format. .DESCRIPTION Convert-MrSqlLogSequenceNumber is an advanced PowerShell function that converts one or mor...
mikefrobbins/SQL
MrSQL/Public/Convert-MrSqlLogSequenceNumber.ps1
PowerShell
mit
2,401
function Get-MofSchemaObject() { param( [Parameter(Mandatory=$True)] [string]$fileName ) $contents = Get-Content $fileName $results = @() $currentResult = @{ ClassVersion = $null FriendlyName = $null ClassName = $null Attributes = @() Documen...
wulfland/xSharePoint
Tests/xSharePoint/xSharePoint.TestHelpers.psm1
PowerShell
mit
11,167
# Get public and private function definition files. $importFolders = Get-ChildItem $PSScriptRoot -Include Types, Public, Private -Recurse -Directory -ErrorAction SilentlyContinue $private = @() $public = @() Write-PSFMessage -Message "Importing from $($importFolders.Count) folders" foreach ($folder in $importFolders)...
AutomatedLab/AutomatedLab
AutomatedLabUnattended/AutomatedLabUnattended.psm1
PowerShell
mit
854
param( $InstallPath = (Get-Item -Path Env:\CustomConsolesInstallPath | % Value) ) # Constants $PowerShellConsoleConstants = & (Join-Path $InstallPath "Config\Constants.ps1") # Module Initialization $private:ModuleInitializationRoot = Join-Path $InstallPath "Custom Consoles\PowerShell\ModuleInitialization"...
paulmarsy/Console
Config/Core-Functionality.ps1
PowerShell
mit
1,723
#region Out-LineChart Function Out-LineChart { <# .EXAMPLE import-csv .\TrendReporting\REST.csv| out-linechart -XAxis Date -YAxis1 TotalUsedGB -YAxis2 CapacityGB -Title 'Restricted Report' -YAxisTitle SizeGB #> [cmdletbinding()] Param ( [parameter(Mandatory=$T...
proxb/Presentations
Nebraska.Code() - Trend Reporting Using SQL and PowerShell/7_MSChartDemo.ps1
PowerShell
mit
9,992
[CmdletBinding()] param( [Parameter()] [string] $SharePointCmdletModule = (Join-Path -Path $PSScriptRoot ` -ChildPath "..\Stubs\SharePoint\15.0.4805.1000\Microsoft.SharePoint.PowerShell.psm1" ` -Resolve) ) $script:DSCModuleName = 'SharePointDsc' $script:DSCResourceName = 'SPInstallL...
PowerShell/xSharePoint
tests/Unit/SharePointDsc/SharePointDsc.SPInstallLanguagePack.Tests.ps1
PowerShell
mit
56,180
Function Export-IniFile { <# .Synopsis Write hash content to INI file .Description Write hash content to INI file .Notes Author : Oliver Lipkau <oliver@lipkau.net> Blog : http://oliver.lipkau.net/blog/ Source : https://github.com/lipkau/PsI...
megamorf/CitrixImagingTools
CitrixImagingTools/Public/Export-IniFile.ps1
PowerShell
mit
5,625
param ( [string]$version = '' ) $ErrorActionPreference = 'Stop'; $packageDir = Split-Path $MyInvocation.MyCommand.Definition $packagefiles = Get-ChildItem $packageDir\*.nupkg $packagefiles | ForEach-Object { Write-Host "Removing - $_"; Remove-Item $_ -ea 0 } # Set input and output file paths $templateFile = (Join-...
composer/windows-setup
chocolatey/local/package.ps1
PowerShell
mit
1,052
<# .NOTES -------------------------------------------------------------------------------- Code generated by: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.128 Generated on: 9/14/2016 4:56 PM Generated by: Robert O'Dell Organization: One Technologies --------...
alduron/AutoLogger
OPSLoggingTemplate/OPSLoggingTemplate.psm1
PowerShell
mit
22,039
<# .Synopsis Gets the message to output for the XWriteProgress .DESCRIPTION Gets the message to output for the XWriteProgress .EXAMPLE Get-XProgressRender -Command Enable-XWrite #> function Get-XProgressRender { [CmdletBinding(SupportsShouldProcess=$true)] Param( [Parameter(Mandatory=$true, P...
Sarafian/XWrite
Src/Modules/XWrite/Private/Get-XProgressRender.ps1
PowerShell
mit
1,977
################################ # powershell env functions ################################ [string]$APP_DIR = 'd:\.app\'; [string]$CACHE_DIR = 'd:\.cache\'; [string]$CONFIG_DIR = 'd:\.config\'; [string]$DATA_DIR = 'd:\.data\'; function script:Env-TrySetVariable ( [string]$Variable = $(throw "Variable is ...
linianhui/code
powershell/env.ps1
PowerShell
mit
14,522
[CmdletBinding()] param ( [Parameter()] [System.String] $DependencyFile = 'RequiredModules.psd1', [Parameter()] [System.String] # Path for PSDepend to be bootstrapped and save other dependencies. # Can also be CurrentUser or AllUsers if you wish to install the modules in such scope # D...
PowerShell/xDhcpServer
Resolve-Dependency.ps1
PowerShell
mit
10,742
#requires -Version 2.0 -Modules Microsoft.PowerShell.Management <# .SYNOPSIS Get-DescriptionFromLogClip.ps1 based Get-DescriptionFromLog.ps1 Detects if log to scan is either Agent or Vault log format and extract essential information for ticket documentation like: Working with: N/A: Vault Version: ...
CailleauThierry/PSThUtils
Parsers/Get-DescriptionFromLogClip.ps1
PowerShell
mit
11,457
function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) { try { $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") } catch { # _references.js file not found return } if ($referencesFileProjectItem -eq ...
MicrosoftLearning/20486-DevelopingASPNETMVCWebApplications
Allfiles/20486C/Mod05/LabFiles/PhotoSharingApplication_05_end/packages/Modernizr.2.6.2/Tools/common.ps1
PowerShell
mit
13,556
<####################### | SHOW OR HIDE WINDOWS | ######################## PowerShell can call internal Windows API functions, and in this example, we'd like to show how you can change the show state of an application window. You'll be able to maximize, minimize, hide, or show, for example. The example uses PowerShel...
doomjaw87/P0w3rSh3ll
Examples/Show or Hide Windows.ps1
PowerShell
mit
1,871
<# .SYNOPSIS *Internal*. Use `Set-CDotNetAppSetting` function instead. .LINK Set-CDotNetAppSetting #> # 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/...
pshdo/Carbon
Carbon/bin/Set-DotNetAppSetting.ps1
PowerShell
apache-2.0
1,356
<############################################################################# TBD Copyright 2015-2017 Kirk Munro 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/license...
KirkMunro/LodPx
public/Clear-LodPxDefaultParameterValue.ps1
PowerShell
apache-2.0
1,420
$script:sqlServerDscHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SqlServerDsc.Common' $script:resourceHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\DscResource.Common' Import-Module -Name $script:sqlServerDscHelperModulePath Import-Module -Name $script:resourc...
johlju/xSQLServer
source/DSCResources/DSC_SqlWindowsFirewall/DSC_SqlWindowsFirewall.psm1
PowerShell
mit
31,197
<# Copyright (c) 2012-2014 VMware, Inc. 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, distribut...
9whirls/webcommander
powershell/VM/vmSetPortGroup.ps1
PowerShell
mit
2,594
$ErrorActionPreference = 'Stop' Set-StrictMode -Version 'Latest' -ErrorAction 'Stop' -Verbose Get-Childitem -Recurse '*.csproj' | ForEach-Object { & dotnet add $_ package --version '6.0.0' RabbitMQ.Client }
rabbitmq/rabbitmq-tutorials
dotnet/update.ps1
PowerShell
apache-2.0
212
Import-Module $PSScriptRoot\..\Helper.psm1 -Verbose:$false # Localized messages data LocalizedData { # culture="en-US" ConvertFrom-StringData @' AddingScopeMessage = Adding DHCP server scope with the given ScopeId ({0})... CheckScopeMessage = Checking DHCP server scope with the given ScopeId ({0...
puppetlabs/puppetlabs-dsc
lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerScope/MSFT_xDhcpServerScope.psm1
PowerShell
apache-2.0
21,564
$packageName = 'peazip' $installerType = 'EXE' $url = 'http://www.peazip.org/downloads/peazip-5.5.0.WINDOWS.exe' $url64 = 'http://www.peazip.org/downloads/peazip-5.5.0.WIN64.exe' $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' $validExitCodes = @(0) #please insert other valid exit codes here, exit codes ...
dtgm/chocolatey-packages
automatic/_output/peazip/5.5.0/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
512
$packageName = 'syncany' $fileType = 'exe' $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' $validExitCodes = @(0) try { Get-ItemProperty -Path @( 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninst...
dtgm/chocolatey-packages
automatic/_output/syncany/0.4.3-alpha/tools/chocolateyUninstall.ps1
PowerShell
apache-2.0
963
# ---------------------------------------------------------------------------------- # # 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...
hovsepm/azure-powershell
src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/ScenarioTests/SiteRecoveryTests.ps1
PowerShell
apache-2.0
11,548
<# .SYNOPSIS Runbook for shutdown the Azure VM based on CPU usage .DESCRIPTION Runbook for shutdown the Azure VM based on CPU usage .EXAMPLE .\AutoSnooze_CreateAlert_Parent.ps1 -WhatIf $false Version History v1.0 - Initial Release #> Param( [Parameter(Mandatory=$false,HelpMessage="Enter the value for Wh...
lizzha/azure-quickstart-templates
azure-resource-optimization-toolkit/scripts/Snooze/AutoSnooze_CreateAlert_Parent.ps1
PowerShell
mit
7,379
$PackageName = 'neo4j-community' # Per-package parameters $downloadUrl = 'http://neo4j.com/artifact.php?name=neo4j-community-3.5.0-alpha07-windows.zip' $md5Checksum = 'e2f3406b232e75a784607f395ed75b06' $neozipSubdir = 'neo4j-community-3.5.0-alpha07' # major.minor.update.build # Build is always 14 $privateJavaVersion = ...
glennsarti/neo4j-community-chocolatey
neo4j-community-3.5.0-alpha07/tools/chocolateyInstall.ps1
PowerShell
mit
12,077
Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent) # Load posh-git module from current directory Import-Module .\posh-git # If module is installed in a default location ($env:PSModulePath), # use this instead (see about_Modules for more information): # Import-Module posh-git # Set up a sim...
pstaszko/posh-git
profile.example.ps1
PowerShell
mit
609
param( [Parameter(Mandatory = $false, Position = 0)] [string] $Environment, [switch] $Silent ) Import-Module "$PSScriptRoot\modules\Configuration.psm1" $RepositoryRoot = [IO.Path]::GetFullPath("$PSScriptRoot\..\..\") if ([string]::IsNullOrWhiteSpace($Environment)) { $Environment = (New-PropertyContaine...
xyrus02/pacman
tools/pacman/LoadEnvironment.ps1
PowerShell
mit
509
git log --graph --full-history --all --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s %Cgreen(%cr) %C(bold blue)<%an>%Creset'"
madsbangh/misc-scripts
gg.ps1
PowerShell
mit
140
function Process{ Param( [ValidatePattern("^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})$")] [Parameter(Mandatory = $false)] [string] $validDateTIme = $null ) Write-Host $validDateTIme } Process Process -validDateTIme "2013-05-09 12:13:14" # will fail Process -validDateTI...
cpoDesign/powershellrepository
Basics/DateTimeValidationInParameter.ps1
PowerShell
mit
372
<# .SYNOPSIS Log an error message. .DESCRIPTION Log an error message to the log file, the event log and show it on the current console. It can also use an error record conataining an exception as input. The exception will be converted into a log message. .INPUTS Non...
claudiospizzi/ScriptLogger
ScriptLogger/Functions/Write-ErrorLog.ps1
PowerShell
mit
2,466
<#PSScriptInfo .VERSION 1.0.0 .GUID 80d306fa-8bd4-4a8d-9f7a-bf40df95e661 .AUTHOR DSC Community .COMPANYNAME DSC Community .COPYRIGHT DSC Community contributors. All rights reserved. .TAGS .LICENSEURI https://github.com/dsccommunity/SharePointDsc/blob/master/LICENSE .PROJECTURI https://github.com/dsccommunity/S...
PowerShell/xSharePoint
SharePointDsc/Examples/Resources/SPInstallLanguagePack/2-InstallLanguagePackInWindow.ps1
PowerShell
mit
1,242
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Update the _references.js file Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx # SIG # Begin signature block # MIIdkwYJKoZIhvcNAQcCoIIdhDCCHYACAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4...
MicrosoftLearning/20486-DevelopingASPNETMVCWebApplications
Allfiles/20486C/Mod12/LabFiles/PhotoSharingApplication_12_end/packages/Modernizr.2.6.2/Tools/uninstall.ps1
PowerShell
mit
10,822
function New-VsPhase { [CmdletBinding()] Param ( [Parameter(Mandatory=$True,Position=0)] [ValidateSet("clioutput","parser")] [string]$AppType, [Parameter(Mandatory=$False,Position=1)] [string]$NextPhase, [Parameter(Mandatory=$False)] [ar...
LockstepGroup/VigilantSpoon
src/powershell/cmdlets/New-VsPhase.ps1
PowerShell
mit
673
################################################# # Author: Tim Odell # OCSPUG Demonstration 5/17/2017 # # Tim@TheOdells.org # Twitter: @timodell # # Feel free to use, fork and improve. # These are scripts I use everyday to manage my lab. # ################################################# Clear-Host Set-Execu...
Chiliyago/SharePoint-Lab-Setup-via-ARM-and-DSC
DSC/SP-App2/Deploy.ps1
PowerShell
mit
2,241
# Copyright (c) Microsoft Corporation. All rights reserved. # See LICENSE.txt in the project root for license information. #requires -Version 4.0 #requires -Modules AzureRM.Profile, AzureRm.AzureStackAdmin Function CreateAzureStackEnvironment { Param( [Parameter(Mandatory=$true)] [Val...
Pyromaniaxxx/AzureStack-Tools
Infrastructure/AzureStack.Infra.psm1
PowerShell
mit
24,395
function Copy-DbaLinkedServer { <# .SYNOPSIS Copy-DbaLinkedServer migrates Linked Servers from one SQL Server to another. Linked Server logins and passwords are migrated as well. .DESCRIPTION By using password decryption techniques provided by Antti Rantasaari (NetSPI, 2014)...
sqlpadawan/dbatools
functions/Copy-DbaLinkedServer.ps1
PowerShell
mit
14,192
<# .SYNOPSIS T-Mon Port Monitoring .DESCRIPTION Probe used to check common ports are open. Eventually this will store the data in a sql table and the data may be used in other probes for discovering services to scan .PARAMETER Port Specify a port or several ports to check...
heldertyler/T-Mon
T-Mon Port Check Probe.ps1
PowerShell
mit
1,869
Function GetUsingVariablesV2 { Param ([scriptblock]$ScriptBlock) $errors = [System.Management.Automation.PSParseError[]] @() $Results = [Management.Automation.PsParser]::Tokenize($ScriptBlock.tostring(), [ref] $errors) $Results | Where-Object { $_.Content -match '^Using:' -AND $_.Type -eq 'Vari...
proxb/PoshRSJob
PoshRSJob/Private/GetUsingVariablesV2.ps1
PowerShell
mit
335
docker run --rm -it --entrypoint "/bin/bash" --name mydebian "debian/falco:0.1" docker exec -it --entrypoint "/bin/bash" --name mydebian "debian/falco:0.1" #docker run -d --name mydebian "debian/falco:0.1"
falcoprescher/DockerWS
Examples/Imagebuilding/00_basic_dockerfile/run.ps1
PowerShell
mit
205
$packageName = 'firefox-nightly' $softwareVersion = '56.0.1.2017071112-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/56.0.1.2017071112/tools/chocolateyUninstall.ps1
PowerShell
apache-2.0
817
function Get-Machine { <# .SYNOPSIS Retrieves one or more objects from Cimi. .DESCRIPTION Retrieves one or more objects from Cimi. .OUTPUTS This Cmdlet returns one or more objects from Cimi. On failure it returns $null. .INPUTS See PARAMETER section for a description of input parameters. .EXAMPLE -DFTODO- .LIN...
dfensgmbh/biz.dfch.PS.Cimi.Client
src/Get-Machine.ps1
PowerShell
apache-2.0
11,486
# # Module manifest for module 'PSGet_AzureRM.MachineLearning' # # Generated by: Microsoft Corporation # # Generated on: 11/3/2017 # @{ # Script module or binary module file associated with this manifest. # RootModule = '' # Version number of this module. ModuleVersion = '0.16.0' # Supported PSEditions # Compatible...
naveedaz/azure-powershell
src/ResourceManager/MachineLearning/AzureRM.MachineLearning.psd1
PowerShell
apache-2.0
5,028
############################################################################## ## ## Invoke-BinaryProcess ## ## From Windows PowerShell Cookbook (O'Reilly) ## by Lee Holmes (http://www.leeholmes.com/guide) ## ############################################################################## <# .SYNOPSIS Invokes a proces...
canadix/ch.canadix.PS.Scriplets
src/PowerShellCookbookModule/Invoke-BinaryProcess.ps1
PowerShell
apache-2.0
2,342
function New-SqlConnection { <# .SYNOPSIS Creates a new database connection. .DESCRIPTION Don't forget to close it when you're done! #> param( [string] # The name of the database. $Database = $RTDatabaseName ) Set-StrictMode -Version Latest ...
RivetDB/Rivet
Test/RivetTest/Functions/New-SqlConnection.ps1
PowerShell
apache-2.0
709
$ErrorActionPreference = 'Stop' $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $filePath = if ((Get-ProcessorBits 64) -and $env:chocolateyForceX86 -ne $true) { Write-Host "Installing 64 bit version" ; gi $toolsDir\*_x64.exe } else { Write-Host "Installing 32 bit version" ; gi $toolsDir\...
AdmiringWorm/chocolatey-coreteampackages
automatic/7zip.install/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
931
function Get-HttpWSUSServers { <# .SYNOPSIS Checks if the host recieves Windows updates over HTTP Author: Lee Christensen License: BSD 3-Clause Required Dependencies: None Optional Dependencies: None .DESCRIPTION This function checks to see if the ho...
leechristensen/Random
PowerShellScripts/Get-HttpWsusServers.ps1
PowerShell
bsd-3-clause
1,420
[CmdletBinding()] param( [Parameter()] [string] $SharePointCmdletModule = (Join-Path -Path $PSScriptRoot ` -ChildPath "..\Stubs\SharePoint\15.0.4805.1000\Microsoft.SharePoint.PowerShell.psm1" ` -Resolve) ) Import-Module -Name...
ykuijs/xSharePoint
Tests/Unit/SharePointDsc/SharePointDsc.SPWebAppThrottlingSettings.Tests.ps1
PowerShell
mit
12,356
#requires -version 5.0 #requires -modules dbatools <# .SYNOPSIS Disable and enable again all triggers in database .DESCRIPTION Disable and enable again all triggers in database https://jesspomfret.com/disable-all-triggers/ .PARAMETER database Database name #> $database = "AdventureWorks2017"; $svr =...
ktaranov/sqlserver-kit
PowerShell/Disable_Enable_All_Triggers_In_Database.ps1
PowerShell
mit
683
Function Invoke-FlashWindow { <# .SYSNOPSIS Flashes a window that has been hidden or minimized to the taskbar .DESCRIPTION Flashes a window that has been hidden or minimized to the taskbar .PARAMETER MainWindowHandle Handle of the window that will be se...
Alexandre-Machado/MonitorFactory
Components/Invoke-FlashWindow.ps1
PowerShell
mit
4,503
$packageName = 'avgantivirusfree' $installerType = 'EXE' $LCID = (Get-Culture).LCID $SelectedLanguage = "/SelectedLanguage=$LCID" $silentArgs = '/UILevel=silent /AppMode=setup /InstallToolbar=0 /ChangeBrowserSearchProvider=0 "$SelectedLanguage" /InstallSidebar=0 /ParticipateProductImprovement=0 /DontRestart /DisableSc...
dtgm/chocolatey-packages
automatic/_output/avgantivirusfree/15.0.5557/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
1,009
<# 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-NSLBVirtualServerRewritePolicyBinding.ps1
PowerShell
apache-2.0
3,184
function GetCurrentConfigurationOrDefault() { if ($psake.context.count -gt 0) { return $psake.context.peek().config } else { return $psake.config_default } }
rolfwessels/CoreDocker
var/psake/private/GetCurrentConfigurationOrDefault.ps1
PowerShell
apache-2.0
186
# Get network connections $networkListManager = [Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]"{DCB00C01-570F-4A9B-8D69-199FDBA5723B}")) $connections = $networkListManager.GetNetworkConnections() # Set network location to Private for all networks $connections | % {$_.GetNetwork().SetCategory(1)}
kamazee/vagrant
plugins/guests/windows/scripts/set_work_network.ps1
PowerShell
mit
317
$enumeration = @( 'AFSDBSubType' 'AMTRelayType' 'ATMAFormat' 'CAAFlag' 'CacheResourceType' 'CertificateType' 'CertificateUsage' 'CSYNCFlags' 'DigestType' 'DistanceType' 'DOALocation' 'DOAType' 'EDnsDNSSECOK' 'EDnsOptionCode' 'EncryptionAlgorithm' 'HeaderFl...
indented-automation/Indented.Net.Dns
Indented.Net.Dns/Indented.Net.Dns.psm1
PowerShell
mit
5,392
<# The MIT License (MIT) Copyright (c) 2015 James Corbould 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...
AzureAuto/AzurePowerShell
AzureSQLDatabase/SetupDB.ps1
PowerShell
mit
10,665
$errorActionPreference = 'Stop' Set-StrictMode -Version 'Latest' Describe 'xArchive Unit Tests' { BeforeAll { # Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment $script:testsFolderFilePath = Split-Path $PSScriptRoot -Parent $script:commonTestHelp...
lfshr/xPSDesiredStateConfiguration
Tests/Unit/MSFT_xArchive.Tests.ps1
PowerShell
mit
337,210
. '.\inc\Config.ps1' . '.\inc\Params.ps1' . '.\inc\Functions.ps1' # Main Program PushWim $wim_file
kireevco/wimaging
Push-WimBoot.ps1
PowerShell
mit
100
## PowerShell ISE: VIM Editor Style Theme ## <# .SYNOPSIS This script sets an ISE Theme to similar to the old VIM editor. .DESCRIPTION This script sets the key values in $PsIse.Options to values consistent with the VIM editor, beloved by many, particularly on the Powershell product team. This script ...
borkit/scriptdump
PowerShell/Working/Snippets/ISEVimEditorTheme.ps1
PowerShell
mit
3,577
Write-Host "Installing IIS..." Import-Module ServerManager $features = @( "Web-WebServer", "Web-Static-Content", "Web-Http-Errors", "Web-Http-Redirect", "Web-Stat-Compression", "Web-Filtering", "Web-Asp-Net45", "Web-Net-Ext45", "Web-ISAPI-Ext", "Web-ISAPI-Filter", "Web-Mgmt-Console", ...
ricardclau/packer-demos
provisioners/powershell/install-iis.ps1
PowerShell
mit
569
$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' # Import the Networking Common Modules Import-Module -Name (Join-Path -Path $modulePath ` -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` -ChildPath 'NetworkingDsc.Common.psm1...
PlagueHO/xNetworking
source/DSCResources/DSC_NetAdapterName/DSC_NetAdapterName.psm1
PowerShell
mit
11,232