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
<# .Synopsis Short description .DESCRIPTION Long description .EXAMPLE Example of how to use this cmdlet .EXAMPLE Another example of how to use this cmdlet #> function Add-RegDeleteKeyValueType { [CmdletBinding()] [Alias()] [OutputType()] Param() Write-Verbose -Message 'Adding RegDelete...
MSAdministrator/PSRegistry
PSRegistry/Private/Add-RegDeleteKeyValueType.ps1
PowerShell
mit
826
#requires -Version 3 function Get-RubrikLogShipping { <# .SYNOPSIS Retrieves all log shipping configuration objects. Results can be filtered and sorted. .DESCRIPTION Retrieves all log shipping configuration objects. Results can be filtered and sorted. .NOTES Written by Chris Lumn...
rubrikinc/PowerShell-Module
Rubrik/Public/Get-RubrikLogShipping.ps1
PowerShell
mit
4,538
######################################################################################## ## Description: ## Add pvRDMA nic ## ## Revision: ## v1.0.0 - ruqin - 08/13/2018 - Build the script. ## v1.1.0 - boyang - 10/16/2019 - Skip test in these hosts hw NO support. ####################################################...
VirtQE-S1/ESX-LISA
setupscripts/add_pvrdma.ps1
PowerShell
apache-2.0
2,239
$packageName = 'manictime.install' $installerType = 'msi' $silentArgs = '/quiet /qn /norestart' $url = 'http://cdn.manictime.com/setup/v3_8_2_1/ManicTimeSetup.msi' $checksum = 'e6488bf5716bd44508b8a5a3e10c021777d0f854fd54de0d70f7d3b8e8046a16' $checksumType = 'sha256' $validExitCodes = @(0, 3010) Install-ChocolateyPack...
dtgm/chocolatey-packages
automatic/_output/manictime.install/3.8.2/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
668
$packageName = 'kvrt' $url = 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe' $checksum = '21f11b7a09d7f1fc3fe87eb48f994b9646b44d97' $checksumType = 'sha1' $toolsPath = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $installFile = Join-Path $toolsPath "kvrt.exe" try { Get-Chocolat...
dtgm/chocolatey-packages
automatic/_output/kvrt/2016.04.24.0109/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
931
$packageName = 'tortoisehg' $installerType = 'msi' $silentArgs = '/quiet /qn /norestart' $url = 'http://bitbucket.org/tortoisehg/files/downloads/tortoisehg-4.0.0-x86.msi' $checksum = '3d449b855ecf253b919bba3da6c94521ff0678328cb9cb5016dec4cede1b6180' $checksumType = 'sha256' $url64 = 'http://bitbucket.org/tortoisehg/fi...
dtgm/chocolatey-packages
automatic/_output/tortoisehg/4.0/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
1,032
function Add-VSGuardDutyFilterFindingCriteria { <# .SYNOPSIS Adds an AWS::GuardDuty::Filter.FindingCriteria resource property to the template. Represents a map of finding properties that match specified conditions and values when querying findings. .DESCRIPTION Adds an AWS::GuardDuty::Filte...
scrthq/Vaporshell
VaporShell/Public/Resource Property Types/Add-VSGuardDutyFilterFindingCriteria.ps1
PowerShell
apache-2.0
3,871
function Get-NtSystemInformation { <# .SYNOPSIS Returns various forms of internal OS information. PowerSploit Function: Get-NtSystemInformation Author: Matthew Graeber (@mattifestation) License: BSD 3-Clause Required Dependencies: None Optional Dependencies: None .DESCRIPTION Get-NtSyst...
nullbind/PowerSploit
ReverseEngineering/Get-NtSystemInformation.ps1
PowerShell
bsd-3-clause
54,434
cd c:\projects\yaml echo "" | Out-File -Encoding "ASCII" task.bat echo "call phpize 2>&1" | Out-File -Encoding "ASCII" -Append task.bat echo "call configure --with-php-build=c:\build-cache\deps --with-yaml --enable-debug-pack 2>&1" | Out-File -Encoding "ASCII" -Append task.bat echo "nmake /nologo 2>&1" | Out-File -Enco...
bd808/pecl-file_formats-yaml
.appveyor/build.ps1
PowerShell
mit
1,083
$CommandName = $MyInvocation.MyCommand.Name.Replace(".Tests.ps1", "") Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan . "$PSScriptRoot\constants.ps1" Describe "$CommandName Integration Tests" -Tags "IntegrationTests" { BeforeAll { $server = Connect-DbaInstance -SqlInstance $script:instan...
sqlpadawan/dbatools
tests/Stop-DbaXESession.Tests.ps1
PowerShell
mit
2,714
@{ # Script module or binary module file associated with this manifest ModuleToProcess = 'VS.psm1' # Version number of this module. ModuleVersion = '0.1' # ID used to uniquely identify this module GUID = 'a9610a6b-5f18-4859-b4ed-c0b61b356f35' # Author of this module Author = 'Microsoft Corporation' # Company or ve...
MicrosoftLearning/20486-DevelopingASPNETMVCWebApplications
Allfiles/20486C/Mod13/LabFiles/PhotoSharingApplication_13_begin/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/VS.psd1
PowerShell
mit
12,841
$packageName = 'whoistd.install' $installerType = 'exe' $url = 'http://www.nirsoft.net/utils/whoistd_setup.exe' $checksum = 'f21a52a6ef1e4bb1dfe0f295db883cd74fbdbf80' $checksumType = 'sha1' $silentArgs = '/S' $validExitCodes = @(0) Install-ChocolateyPackage -PackageName "$packageName" ` -File...
dtgm/chocolatey-packages
automatic/_output/whoistd.install/2.25/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
603
# # 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 n...
jasonwee/videoOnCloud
lib/cassandra/apache-cassandra-3.7/conf/cassandra-env.ps1
PowerShell
apache-2.0
18,868
function Invoke-Empire { <# .SYNOPSIS The main functionality of the Empire agent. Additional functionality can be loaded dynamically. Author: @harmj0y License: BSD 3-Clause .PARAMETER StagingKey The server staging key. .PARAMETER SessionKey ...
EmpireProject/Empire
data/agent/agent.ps1
PowerShell
bsd-3-clause
45,213
Configuration CreateRootDomain { Param( [Parameter(Mandatory)] [System.Management.Automation.PSCredential]$Admincreds, [Parameter(Mandatory)] [Array]$RDSParameters ) $DomainName = $RDSParameters[0].DomainName $DNSServer = $RDSParameters[0].DNSServer $Ti...
simongdavies/azure-quickstart-templates
101-rds-deployment-full-ha/dsc/deployrdslab.ps1
PowerShell
mit
21,156
$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/Set-DbaDbCompatibility.Tests.ps1
PowerShell
mit
1,002
function Open-ISEFunction { <# .SYNOPSIS Open a function in ISE .DESCRIPTION Open a function in ISE. Any function that can be obtained by (get-command <command>).definition. Pretty much anything that isn't compiled in a DLL or obfuscated in some other manner. .FUNCTIONALITY ...
DexterPOSH/PSDeploy
Tests/artifacts/Scripts/Open-ISEFunction.ps1
PowerShell
mit
1,369
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org...
arcadiahlyy/azure-powershell
src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/ScenarioTests/StorageInsightTests.ps1
PowerShell
apache-2.0
6,642
function Stop-vRAMachineGuestOS { <# .SYNOPSIS Shutdown a vRA Machine .DESCRIPTION Shutdown a vRA Machine .PARAMETER Id The ID of the vRA Machine .PARAMETER Name The Name of the vRA Machine .PARAMETER WaitForCompletion If this flag is added, this function will wait for the p...
jakkulabs/PowervRA
src/Functions/Public/iaas/Stop-vRAMachineGuestOS.ps1
PowerShell
mit
6,584
$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' # Import the Networking Resource Helper Module Import-Module -Name (Join-Path -Path $modulePath ` -ChildPath (Join-Path -Path 'FSRMDsc.ResourceHelper' ` -ChildPath 'FSRMDsc.Resourc...
PlagueHO/cFSRM
DSCResources/DSR_FSRMFileScreenTemplateAction/DSR_FSRMFileScreenTemplateAction.psm1
PowerShell
mit
24,722
Describe "[$($Lab.Name)] Tfs2017" -Tag Tfs2017 { Context "Role deployment successful" { It "[Tfs2017] Should return the correct amount of machines" { (Get-LabVm -Role Tfs2017).Count | Should -Be $(Get-Lab).Machines.Where({$_.Roles.Name -contains 'Tfs2017'}).Count } foreach ($vm in (...
AutomatedLab/AutomatedLab
AutomatedLabTest/internal/tests/Tfs2017.tests.ps1
PowerShell
mit
894
<# A Class with Methods dedicated to the Prep parameter in vamp. #> Class VampPrep { #Downloads the Nuget Package Provider static [void] BootstrapNuget () { #Ensure any errors within this method cause a stop of execution $ErrorActionPreference = 'Stop' #Attempt to install Nuget an...
bundyfx/vamp
private/vamp/prep.psm1
PowerShell
mit
5,695
Describe $($PSCommandPath -Replace ".Tests.ps1") { BeforeAll { #Get Current Directory $Here = Split-Path -Parent $PSCommandPath #Assume ModuleName from Repository Root folder $ModuleName = Split-Path (Split-Path $Here -Parent) -Leaf #Resolve Path to Module Directory $ModulePath = Resolve-Path "$Here\..\...
pspete/psPAS
Tests/Set-PASOpenIDConnectProvider.Tests.ps1
PowerShell
mit
2,828
<# Test-File #> # Include . .\..\Set-String.ps1 # Process Set-String -Path .\Example-FileToProcess.txt -Find 'sad' -Replace 'happy'
QuietusPlus/Set-String
Examples/Test-File.ps1
PowerShell
mit
138
# A configuration to Create High Availability Domain Controller $secpasswd = ConvertTo-SecureString "Adrumble@6" -AsPlainText -Force $domainCred = New-Object System.Management.Automation.PSCredential ("sva-dscdom\Administrator", $secpasswd) $safemodeAdministratorCred = New-Object System.Management.Automation.PSCr...
randorfer/RunbookExample
PowerShellModules/xActiveDirectory/2.8.0.0/Assert-HADC.ps1
PowerShell
mit
3,145
<# I am using this file to Guide me through Presentation and blog posts # # # TODO: 1. Git Integration with Git Hub start-process chrome.exe "http://www.notyourdadsit.com/blog/2018/4/3/cheatsheet-setup-github-on-visual-studio-code" I usually access github from within Visual Studio Code. As such, when I start...
mmuras-vmse/mmuras-vmse.github.io
_projects/Readme.ps1
PowerShell
mit
1,608
Function Get-IniContent { <# .Synopsis Gets the content of an INI file .Description Gets the content of an INI file and returns it as a hashtable .Notes Author : Oliver Lipkau <oliver@lipkau.net> Blog : http://oliver.lipkau.net/blog/ Source ...
Laoujin/dotfiles
config/PowerShell/scripts/lib/Get-IniContent.ps1
PowerShell
mit
3,127
function Set-UnattendedProductKey { [CmdletBinding()] param ( [Parameter(Mandatory = $true)] [string]$ProductKey, [switch] $IsKickstart, [switch] $IsAutoYast ) if (-not $script:un) { Write-Error 'No unattended file imported. Please use Import-UnattendedFile first' return...
AutomatedLab/AutomatedLab
AutomatedLabUnattended/Public/Set-UnattendedProductKey.ps1
PowerShell
mit
568
$config = [io.file]::ReadAllText("c:\config.psd1") | Invoke-Expression $script:Session = New-Object -ComObject Microsoft.Update.Session <# .SYNOPSIS Uses windows update API to check what patches need to be installed. .PARAMETER Skip Array of patches to skip. Uses powershell -Like syntax. #> function G...
wiltaylor/VMLab
Lab/Template/Windows10x64/scripts/03-InstallUpdates.ps1
PowerShell
mit
4,427
<# This function allows you to tweet from PowerShell. It DOES require you setup your own application at http://dev.twitter.com to get the following required items. * Consumer Key * Consumer Secret * OAuth Token * OAuth Token Secret You will need to insert them on the lines below. Usage: tweet -Message "Hello Twi...
alexinslc/poshtweet
tweet.ps1
PowerShell
mit
3,661
function Get-PaAddress { [CmdletBinding()] Param ( [Parameter(Mandatory=$False,Position=0)] [string]$Name, [Parameter(Mandatory=$False,Position=1)] [string]$Vsys, [Parameter(Mandatory=$False,Position=2)] [string]$Device ) $VerbosePrefix = "Get-PaAddress:" if ($global:PaD...
brianaddicks/poweralto3
poweralto3/src/cmdlets/Get-PaAddress.ps1
PowerShell
mit
2,607
Function Check-UserInOUPath() { param ( [parameter(Mandatory=$true)] [string]$ContainerPath, [parameter()] [bool]$IncludeSubContainers=$true ) $adSysInfo = Get-AdSystemInfo return checkInOUPath -DistinguishedName $adSysInfo.UserDistinguishedName -IncludeSubContainers $IncludeSubCon...
OfficeDev/Office-IT-Pro-Deployment-Scripts
Office-ProPlus-Deployment/Setup-GPOOfficeInstallation/DeploymentFiles/EnvironmentalFilter.ps1
PowerShell
mit
4,086
#requires -Version 3 function Get-RubrikOrganization { <# .SYNOPSIS Returns a list of all organizations. .DESCRIPTION This cmdlet returns all the organizations within Rubrik. Organizations are used to support Rubrik's multi-tenancy feature. .NOTES Written by Mike Fal ...
rubrikinc/PowerShell-Module
Rubrik/Public/Get-RubrikOrganization.ps1
PowerShell
mit
3,072
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.ps1", ".psm1") $pathtosut = join-path $here $sut iex ( ((gc $pathtosut -Raw) -replace '\$psscriptroot', $here) ) Describe 'how Resolve-ModuleMetadataFile responds' { Context 'when passed...
brianehlert/PoSh.org-DSC
Tooling/DscDeployment/DscDeployment.Tests.ps1
PowerShell
mit
4,600
Remove-Module Snap Import-Module .\Snap.psd1 #Install-SnapPackage 7zip -Verbose
timbodv/snap
reload.ps1
PowerShell
mit
80
<# VE_XD7StoreFront\VE_XD7StoreFrontAuthenticationService.Resources.psd1 #> ConvertFrom-StringData @' RunningAddSTFAuthenticationService = Running Add-STFAuthenticationService. RunningGetSTFAuthenticationService = Running Get-STFAuthenticationService for virtual path '{0}'. RunningRemoveSTFAuthent...
VirtualEngine/XenDesktop7
DSCResources/VE_XD7StoreFrontAuthenticationService/VE_XD7StoreFrontAuthenticationService.Resources.psd1
PowerShell
mit
754
$packageName = 'spark' $packageSearch = "$packageName 2.7.7*" $installerType = 'exe' $silentArgs = '-q' $validExitCodes = @(0) Get-ItemProperty -Path @('HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*', ...
dtgm/chocolatey-packages
automatic/_output/spark/2.7.7/tools/chocolateyUninstall.ps1
PowerShell
apache-2.0
896
$packageName = 'firefox-nightly' $installerType = 'exe' $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' $url = 'https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/firefox-61.0a1.en-US.win32.installer.exe' $checksum = '46bb03c10033e920f40f78a444dc75fc7d77b54836e152975bd394ae4d3efb35' $c...
dtgm/chocolatey-packages
automatic/_output/firefox-nightly/61.0.1.2018031800/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
1,131
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls" function GetElevation { if ($PSVersionTable.PSEdition -eq "Desktop" -or $PSVersionTable.Platform -eq "Win32NT" -or $PSVersionTable.PSVersion.Major -le 5) { [System.Security.Principal.WindowsPrincipal]$currentPrincipal = New-Object System.Sec...
pldmgg/misc-powershell
MyModules/GitEnv/GitEnv.psm1
PowerShell
apache-2.0
204,922
<# DESCRIPTION: Checks to make sure the specified static routes have been added. Add routes to check as: StaticRoute01 = ("source", "mask", "gateway"). To check for no extra persistent routes, use: StaticRoute01 = ("None", "", ""). Up to 99 routes can be checked. You must edit the setting...
My-Random-Thoughts/Server-QA-Checks
checks/network/c-net-09-static-routes.ps1
PowerShell
apache-2.0
6,502
<# © 2015 Microsoft Corporation. All rights reserved. This sample code is not supported under any Microsoft standard support program or service. This sample code is provided AS IS without warranty of any kind. Microsoft disclaims all implied warranties including, without limitation, any implied warrantie...
fullscale180/asm2arm
globalSettings.ps1
PowerShell
mit
1,409
$script:dscModuleName = 'ComputerManagementDsc' $script:dscResourceName = 'DSC_SystemLocale' function Invoke-TestSetup { try { Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop' } catch [System.IO.FileNotFoundException] { throw 'DscResource.Test module dependency not fo...
PlagueHO/xComputerManagement
tests/Unit/DSC_SystemLocale.Tests.ps1
PowerShell
mit
5,374
# Condensed version of PowerView that allows the user to run several important domain checks # quickly when they get onto a box by using the 'Get-DomainInfo' command function New-InMemoryModule { Param ( [Parameter(Position = 0)] [ValidateNotNullOrEmpty()] [String] $ModuleName =...
THEMVFFINMAN/Phishing
PowerViewCondensed.ps1
PowerShell
mit
64,939
$script:ErrorActionPreference = "Stop" $domain = .\Get-ConfigurationPropertyValue.ps1 Domain $userName = .\Get-ConfigurationPropertyValue.ps1 UserName $password = .\Get-ConfigurationPropertyValue.ps1 Password $computerName = .\Get-ConfigurationPropertyValue.ps1 SutComputerName $requestUrl = .\Get-ConfigurationPr...
XinwLi/Interop-TestSuites-1
SharePoint/Source/MS-LISTSWS/Adapter/SUTControlAdapter/Implementation/GetWebAppRecycleBin.ps1
PowerShell
mit
1,010
#example 1: $mailbox = Get-Mailbox testuser #example 2: $email = “testuser@contoso.com” $email.length $email.Split("@") #example 3: $mailbox | Get-Member $mailbox.MaxSendSize $mailbox.MaxSendSize.Value $mailbox.MaxSendSize.Value | Get-Member -MemberType Method $mailbox.MaxSendSize.Value.ToMB() #example 4: $name ...
mikepfeiffer/ex-2010-ps-cookbook
Chapter1/WorkingwithVariablesandObjects.ps1
PowerShell
mit
581
import-module au $releases = 'http://www.piriform.com/speccy/download/standard' function global:au_SearchReplace { @{ ".\tools\chocolateyInstall.ps1" = @{ "(^[$]url32\s*=\s*)('.*')" = "`$1'$($Latest.URL32)'" "(^[$]checksum32\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'" ...
lennartb-/chocolatey-coreteampackages
automatic/speccy/update.ps1
PowerShell
apache-2.0
856
# # Module manifest for module 'Microsoft.Azure.Commands.MachineLearning' # # Generated by: Microsoft Corporation # # Generated on: 3/7/2016 # @{ # Version number of this module. ModuleVersion = '0.9.0' # ID used to uniquely identify this module GUID = '9B00B730-E4BF-11E5-93D9-40A8F066D050' ...
yoavrubin/azure-powershell
src/ResourceManager/MachineLearning/Commands.MachineLearning/Microsoft.Azure.Commands.MachineLearning.dll-Help.psd1
PowerShell
apache-2.0
3,217
<# .SYNOPSIS Performs SQL Query in Local Database .DESCRIPTION Performs query in the SQL database to verify that the request data made for the API has been consumed by the backend service .NOTES File Name : sql_test.ps1 Author : Ismael Apolinário - ismaelapolinario@hotmail.com Require...
IAPOLINARIO/microsoft-ci-automation
test/sql_test.ps1
PowerShell
mit
1,628
InModuleScope Indented.StubCommand { Describe New-StubType { BeforeAll { function Test-TypeDefinition { param ( [String]$addTypeCommand ) $typeDefinition = ($addTypeCommand -replace "Add-Type.+?@'|'@").Trim() $...
indented-automation/Indented.StubCommand
Indented.StubCommand/test/public/New-StubType.tests.ps1
PowerShell
mit
14,953
<# .SYNOPSIS This Azure Automation Runbook, when triggered via Webhook, will look for Nano Server VMs with a Tag Text of 'CoreWebAppDemo' and attempt to deploy the .NET Core Web Application to that Nano Server. .DESCRIPTION When this Runbook is triggered via the Webhook: the rb-CoreWebAppDemo-Webhook, the following w...
starkfell/starkfell.github.io
runbooks/rb-Deploy-CoreWebAppDemo-To-Nano-Server.ps1
PowerShell
mit
17,756
function Get-ADSISchema { <# .SYNOPSIS The Get-ADSISchema function gather information about the current Active Directory Schema .DESCRIPTION The Get-ADSISchema function gather information about the current Active Directory Schema .PARAMETER PropertyType Specify the type of property to return .PARAMETER ClassName...
evetsleep/AdsiPS
AdsiPS/Public/Get-ADSISchema.ps1
PowerShell
mit
1,836
$ModuleName = 'PSCodeHealth' Import-Module "$PSScriptRoot\..\..\..\$ModuleName\$($ModuleName).psd1" -Force Describe 'Measure-FunctionTrapCatchCodePath' { InModuleScope $ModuleName { $Mocks = ConvertFrom-Json (Get-Content -Path "$($PSScriptRoot)\..\..\TestData\MockObjects.json" -Raw ) Context 'The...
MathieuBuisson/PSCodeHealth
Tests/Unit/Private/Measure-FunctionTrapCatchCodePath.Tests.ps1
PowerShell
mit
1,980
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $scriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent $client = New-Object "System.Net.WebClient" $url = "https://github.com/filipw/dotnet-script/releases/download/0.18.0/dotnet-script.0.18.0.zip" $file = "$scriptRoot/dotnet-script...
filipw/dotnet-script
build/install-dotnet-script.ps1
PowerShell
mit
415
$server = "server.domain.com" $currentpassword = "password" Connect-VIServer $server -User root -Password $currentpassword -WarningAction SilentlyContinue $myhost = get-vmhost $server $myhost.ConnectionState $myhost | Get-VMHostAuthentication Get-VMHostService -VMHost $myhost | where {$_.Key -eq "lwsmd"} | R...
ckite/PowerShell
host ad troubleshooting.ps1
PowerShell
mit
1,942
$f = ".\testExport.xlsx" rm $f -ErrorAction Ignore .\GenDates.ps1 | Export-Excel $f -Show -AutoSize -ConditionalText $( New-ConditionalText -ConditionalType NextWeek )
mrpullen/ImportExcel
Examples/ConditionalFormatting/Highlight-NextWeek.ps1
PowerShell
apache-2.0
186
function Get-CSslCertificateBinding { <# .SYNOPSIS Gets the SSL certificate bindings on this computer. .DESCRIPTION Windows binds SSL certificates to an IP addresses/port combination. This function gets all the SSL bindings on this computer, or a binding for a specific IP/port, or $nul...
pshdo/Carbon
Carbon/Functions/Get-SslCertificateBinding.ps1
PowerShell
apache-2.0
2,011
# # 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 License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
OneGet/cmdlet-testsuite
scripts/install-certificates.ps1
PowerShell
apache-2.0
2,889
import-module au $releases = 'https://www.sourcetreeapp.com' function global:au_SearchReplace { @{ 'tools\chocolateyInstall.ps1' = @{ "(^\s*packageName\s*=\s*)('.*')"= "`$1'$($Latest.PackageName)'" "(^\s*url\s*=\s*)('.*')" = "`$1'$($Latest.URL32)'" "(^\s*checksum\s...
octomike/chocolatey-coreteampackages
automatic/sourcetree/update.ps1
PowerShell
apache-2.0
854
<# .SYNOPSIS Get German Holidays via API and export them to CSV for Skype for Business (Online). .DESCRIPTION Get German Holidays via API and export them to CSV for Skype for Business (Online). We use the German service feiertage-api.de to fetch the list, that is a great wrapper for the G...
jhochwald/PowerShell-collection
Office365/Convert-HolidayFromApiToCsAutoAttendantHolidays.ps1
PowerShell
bsd-3-clause
13,570
task Clean { if (Test-Path $Output) { "Cleaning Output files in [$Output]..." $null = Get-ChildItem -Path $Output -File -Recurse | Remove-Item -Force -ErrorAction 'Ignore' "Cleaning Output directories in [$Output]..." $null = Get-ChildItem -Path $Output -Directory -R...
KevinMarquette/PSGraph
BuildTasks/Clean.Task.ps1
PowerShell
mit
399
$package = 'jdk7' $build = '18' $version = '45' try { $IsSytem32Bit = (($Env:PROCESSOR_ARCHITECTURE -eq 'x86') -and ` ($Env:PROCESSOR_ARCHITEW6432 -eq $null)) # http://www.oracle.com/technetwork/java/javase/downloads/index.html $url = if ($IsSytem32Bit) { "http://download.oracle.com/otn-pub/java/jdk/7u$...
Iristyle/ChocolateyPackages
JDK7/tools/chocolateyInstall.ps1
PowerShell
mit
1,324
param($installPath, $toolsPath, $package, $project) try { $projectFileNameWithoutExtension = [io.path]::GetFileNameWithoutExtension($project.FullName) $nuspecFileName = $projectFileNameWithoutExtension + ".nuspec" $destinationFile = $toolsPath + "\\" + $nuspecFileName $sourceFile = $toolsPath + "\\Package.templa...
Jeern/SimpleEventMonitor
packages/NuGet.Package.Builder.1.0.9/tools/Install.ps1
PowerShell
mit
665
[CmdletBinding()] param() . $PSScriptRoot\..\..\lib\Initialize-Test.ps1 $publishProfilePath = "$PSScriptRoot\data\NoAuthPublishProfile.xml" $applicationPackagePath = "random package path" $serviceConnectionName = "random connection name" $serviceFabricSdkModulePath = "$PSScriptRoot\data\ServiceFabricSDK.ps1" $appName...
ivyzhu/vsts-tasks
Tests/L0/ServiceFabricDeploy/NoAuthDeploy.ps1
PowerShell
mit
2,299
[CmdletBinding()] Param( [Parameter(Mandatory=$True)] [string] $BuildConfiguration ) #Install dnvm & scripts/Install-Dnvm.ps1 # Restore and build projects & scripts/Call-Dnu.ps1 restore .\src & scripts/Call-Dnu.ps1 build .\src\PartsUnlimitedWebsite --configuration $BuildConfiguration
Microsoft-Build-2016/CodeLabs-Data
Module3-MachineLearning/Source/Ex2/End/build.ps1
PowerShell
mit
289
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. # See the LICENSE file in the project root for more information. # Usage: # # . ParallelTestExecution.ps1 # cd <testFolder> (e.g. testFolder = src\System.Net.Security\tests\Functio...
Petermarcu/corefx
src/Common/tests/Scripts/Tools/ParallelTestExecution.ps1
PowerShell
mit
5,482
param( [Parameter(Mandatory=$true,Position=0)] [PSObject] $CreateUIDefinitionObject ) if (-not $CreateUIDefinitionObject.outputs.location) { throw "Location is missing from outputs" } if ("$($CreateUIDefinitionObject.outputs.location)".Trim() -ne '[location()]') { throw "CreateUIDefinition.outpu...
tibor19/azure-quickstart-templates
test/template-tests/testcases/CreateUIDefinition/Location-Should-Be-In-Outputs.test.ps1
PowerShell
mit
366
# The DSC configuration that will generate metaconfigurations # Courtesy of https://docs.microsoft.com/en-us/azure/automation/automation-dsc-onboarding#secure-registration [DscLocalConfigurationManager()] Configuration DscMetaConfigs { param ( [Parameter(Mandatory=$True)] [String]$RegistrationU...
Azure/azure-devtestlab
Artifacts/windows-desired-state-configuration-az-automation/DscMetaConfigs.ps1
PowerShell
mit
2,966
function InvokeMSBuildRunnerPostTest { $bootstrapperPath = GetBootsrapperPath $arguments = GetMSBuildRunnerPostTestArgs Invoke-BatchScript $bootstrapperPath -Arguments $arguments } function GetBootsrapperPath { $bootstrapperPath = GetTaskContextVariable "MSBuild.SonarQube.Internal.BootstrapperPath" if (!$boots...
cwoolum/vso-agent-tasks
Tasks/SonarQubePostTest/SonarQubePostTestImpl.ps1
PowerShell
mit
1,899
Get-VMHost |Sort Name |Get-View | Select Name, @{N=“Type“;E={$_.Hardware.SystemInfo.Vendor+ “ “ + $_.Hardware.SystemInfo.Model}}, @{N=“CPU“;E={“PROC:“ + $_.Hardware.CpuInfo.NumCpuPackages + “ CORES:“ + $_.Hardware.CpuInfo.NumCpuCores + “ MHZ: “ + [math]::round($_.Hardware.CpuInfo.Hz / 1000000, 0)}}, @{N=“MEM“;E={“” + ...
plbenpeterson/PowerCLI
source/Scripts/Hosts/HostHardware.ps1
PowerShell
mit
376
function Get-PSWSUSConfigSyncUpdateCategories { <# .SYNOPSIS Displays update product categories that you will sync from Windows Server Update Services (WSUS). .DESCRIPTION Displays update product categories that you will sync from Windows Server Update Services (WSUS). .NOTES Name: G...
proxb/PoshWSUS
Scripts/Get-PSWSUSConfigSyncUpdateCategories.ps1
PowerShell
mit
1,422
$PackageName = 'neo4j-lib-opencsv' try { # Get the NeoHome Dir # Try the local environment $neoHome = [string] (Get-EnvironmentVariable -Name 'NEO4J_HOME' -Scope 'Machine') # Failing that, try a registry hack if ($neoHome -eq '') { $neoHome = [string] ( (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_...
glennsarti/neo4j-community-chocolatey
neo4j-lib-opencsv-2.3/tools/chocolateyUninstall.ps1
PowerShell
mit
1,158
#TestTool.ps1 cls $psv2mode = $false; #Forces Powershell in V2 compatibility mode. if($psv2mode -and $PSVersionTable.PSVersion.Major -gt 2) #force testing to PSv2, no coloring or debugging in this mode. { #Write-Host "script:" $PSCommandPath #$policy = Get-ExecutionPolicy powershell.exe -Version 2 -Execu...
oddbear/Tools
PowerShell/HashTool/TestTool.ps1
PowerShell
mit
1,614
# There's usually much more than this in my profile! $SCRIPTPATH = "C:\Users\Speed\Documents\WindowsPowerShell" $PROGRAMPATH = "D:\Program Files (x86)" $VIMPATH = $PROGRAMPATH + "\vim\vim74\vim.exe" $VIMRUNTIME = $PROGRAMPATH + "\vim\vim74" Set-Alias vi $VIMPATH Set-Alias vim $VIMPATH Set-Alias c "cls" Fu...
speedmax123/Powershell_Configuration
profile.ps1
PowerShell
mit
2,216
# ============================================================================= # PowerShell profile # ============================================================================= # PowerShell settings if ([System.Environment]::OSVersion.Platform -Eq 'Unix') { Set-PSReadLineOption -HistorySavePath $env:XDG_CACHE_...
ccheetham/myenv
etc/windows/Microsoft.PowerShell_profile.ps1
PowerShell
mit
577
# Copyright (c) 2016 Microsoft. All Rights Reserved # Licensed under the MIT license. See LICENSE file in the project root for full license information. <# .SYNOPSIS Install the Xbox Live SDK into the Unity project .PARAMETER FromSource Build the SDK from the CSharpSource folder and copy the binaries. .PARAMETER F...
adityatMS/xbox-live-unity-plugin
Build/InstallXboxLiveSdk.ps1
PowerShell
mit
3,490
function Format-ServerRole { <# .SYNOPSIS Formats the output of Get-ServerRole.ps1 .EXAMPLE Get-ServerRole | Format-ServerRole.ps1 This script must be dot sourced (i.e., run '. .\Format-ServerRole') #> [CmdletBinding()] param ( [Parameter(Mandatory=$false,Val...
brsh/BGInfoConfigs
Scripts/PowerShell/Formats/Format-ServerRole.ps1
PowerShell
mit
883
$packageName = 'tflash' $url = 'http://www.nirsoft.net/utils/tflash.zip' $checksum = '0f322ad8750128ab96f329915baac31ae047129a' $checksumType = 'sha1' $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $installFile = Join-Path $toolsDir "$($packageName).exe" Install-ChocolateyZipPackage -PackageNam...
dtgm/chocolatey-packages
automatic/_output/tflash/1.00/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
618
$packageName = 'firefox-nightly' $softwareVersion = '58.0.1.2017092600-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.2017092600/tools/chocolateyUninstall.ps1
PowerShell
apache-2.0
817
$packageName = 'quiterss' $installerType = 'exe' $url = 'http://quiterss.org/files/0.18.4/QuiteRSS-0.18.4-Setup.exe' $checksum = '3196953a010792687fa72bb56993a0fd' $checksumType = 'md5' $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' $validExitCodes = @(0) Install-ChocolateyPackage -PackageName "$package...
dtgm/chocolatey-packages
automatic/_output/quiterss/0.18.4/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
642
$packageName = '{{PackageName}}' $url = '{{DownloadUrl}}' $checksum = '{{Checksum}}' $checksumType = 'sha256' $url64 = "$url" $checksum64 = "$checksum" $checksumType64 = "checksumType" $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" Install-ChocolateyZipPackage -PackageName "$packageName" ` ...
dtgm/chocolatey-packages
automatic/movefile/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
1,132
<# .SYNOPSIS start the asio dev server with integration database #> mvn -pl server exec:java
pyranja/asio
Run-DevServer.ps1
PowerShell
apache-2.0
96
$packageName = 'dolphin' $url = 'http://dl.dolphin-emu.org/builds/dolphin-master-5.0-2036-x64.7z' $checksum = '053f76d2aa43e487245be7d927a7844411a58edf616d6565d6ba4d71c1fd37bd' $checksumType = 'sha256' $url64 = $url $checksum64 = $checksum $checksumType64 = $checksumType $toolsDir = "$(Split-Path -parent $MyInvocation...
dtgm/chocolatey-packages
automatic/_output/dolphin/5.0.2036/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
790
#requires -version 2 <# .DESCRIPTION Github source indexer will index PDB files with HTTP source file references to a Github repository. - http://hamishgraham.net/post/GitHub-Source-Symbol-Indexer.aspx - Adapted from http://sourcepack.codeplex.com .PARAMETER symbolsFolder The path of the directory to recu...
ljw1004/pdb2github
github-sourceindexer.ps1
PowerShell
apache-2.0
14,345
# Starts a Ruby session docker run --name workshop_ruby -it -v c:/Users/dev/src/microservice_workshop/ruby_v2:/workshop -w /workshop fredgeorge/microservice_ruby:latest bash # Starts monitor_all. Ensure IP and port correct! docker exec -it workshop_ruby ruby ./lib/rental_offer/monitor_all.rb 192.168.254.120 5672 # St...
fredgeorge/microservice_workshop
ruby_v2/setup/rental_offer.ps1
PowerShell
apache-2.0
456
<# # ============================================================================ # Build # # WocketDb # Copyright (c) 2011 WocketWare LLC # # PSake Build script for compiling, testing, and packaging WocketDb. # # Since: 1.0 # ============================================================================ #> ...
WocketWare/WocketDb
build.ps1
PowerShell
bsd-3-clause
2,932
@{ GUID="EEFCB906-B326-4E99-9F54-8B4BB6EF3C6D" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" NestedModules="Microsoft.PowerShell.Commands.Management.dll" HelpInfoURI = 'https://aka...
PaulHigin/PowerShell
src/Modules/Unix/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1
PowerShell
mit
1,397
$name = "keepass.portable" $url = "http://downloads.sourceforge.net/project/keepass/KeePass%202.x/2.28/KeePass-2.28.zip" $tools = Split-Path $MyInvocation.MyCommand.Definition $content = Join-Path (Split-Path $tools) "content" $gui = Join-Path $content "KeePass.exe.gui" New-Item $content -Type Directory -Force | Ou...
dtgm/chocolatey-packages
automatic/_output/keepass.portable/2.28.0.1/tools/chocolateyInstall.ps1
PowerShell
apache-2.0
422
<# The MIT License (MIT) Copyright (c) 2015 Objectivity Bespoke Software Specialists 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 t...
Invenis/PSCI
PSCI/Public/deploy/DSL/ServerConnection.ps1
PowerShell
mit
7,595
#requires -RunAsAdministrator #requires -Version 4 $moduleName = 'Lability'; $repoRoot = (Resolve-Path "$PSScriptRoot\..\..\..\..").Path; Import-Module (Join-Path -Path $RepoRoot -ChildPath "$moduleName.psm1") -Force; Describe 'Unit\Src\Private\Resolve-ConfigurationDataPath' { InModuleScope $moduleName { ...
iainbrighton/Lability
Tests/Unit/Src/Private/Resolve-ConfigurationDataPath.Tests.ps1
PowerShell
mit
1,530
# file : babun.ps1 # author : seb! <sebi@sebi.one.pl> # license : MIT # This script: # * downloads babun from official website. # * unzip downloaded archive within user profile environment. # * locates babun installation batch file. # * makes a very silent installer for vagrant environment: # - every 'p...
a4099181/vagrant-officeVM
provision/powershell/babun.ps1
PowerShell
mit
1,697
function Install-Module($ModuleName) { $SourcePath = $SourcePath = "Modules\" + $ModuleName if(!(Test-Path $SourcePath)) { Write-Error ("{0} is missing, run create.ps1 first" -f $SourcePath) return; } $TargetPath = ("{0}\Documents\WindowsPowerShell\Modules\{1}" -f $env:USERPROFILE, $...
ravndal/cOneGet
install.ps1
PowerShell
mit
1,488
# Author: Miodrag Milic <miodrag.milic@gmail.com> # Last Change: 18-May-2016. <# .SYNOPSIS Create and optionaly store the TFS credentials #> function New-TFSCredential { [CmdletBinding()] param( # TFS credential [PSCredential] $Credential ) Write-Verbose "New TFS credentials for '$...
dandiddy/TFS
TFS/New-TFSCredential.ps1
PowerShell
mit
1,043
# This is for the current user only and only for Microsoft.Powershell console host $host.ui.rawui.foregroundcolor = "white" Import-Module PSReadLine Set-PSReadLineOption -HistoryNoDuplicates Set-PSReadLineOption -HistorySearchCursorMovesToEnd Set-PSReadLineOption -HistorySaveStyle SaveIncrementally Set-PSReadLineOpt...
CMCDragonkai/.dotfiles
Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1
PowerShell
mit
1,264
#ValidationTags#Messaging,FlowControl,Pipeline,CodeStyle# function Stop-Function { <# .SYNOPSIS Function that interrupts a function. .DESCRIPTION Function that interrupts a function. This function is a utility function used by other functions to reduce error catching over...
sqlpadawan/dbatools
internal/functions/Stop-Function.ps1
PowerShell
mit
11,407
class DnsNSEC3PARAMRecord : DnsResourceRecord { <# 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | HASH ALG | FLAGS | +--+--+--+--+--+--+--+--+--...
indented-automation/Indented.Net.Dns
Indented.Net.Dns/class/2.RecordTypes/DnsNSEC3PARAMRecord.ps1
PowerShell
mit
1,774
$serverName = "<<server>>.database.windows.net" $databaseName ="mydb" $userName = "labuser" $password = "password" function getData_New ($course, $URI) { $HTML = Invoke-WebRequest -Uri $URI $elements = $HTML.ParsedHtml.body.getElementsByClassName('coursePaper section') | Select OuterHTML ##Clear-Host ...
jiyongseong/AzureCommon
temp/UoA/courses_data_new.ps1
PowerShell
mit
4,005
function Export-DbaDacPackage { <# .SYNOPSIS Exports a dacpac from a server. .DESCRIPTION Using SQLPackage, export a dacpac from an instance of SQL Server. Note - Extract from SQL Server is notoriously flaky - for example if you have three part references to external databases it w...
kozloski/dbatools
functions/Export-DbaDacPackage.ps1
PowerShell
mit
14,693
Param( [string]$vroHost="localhost", [string]$vroPort="8281", [string]$user="vcoadmin", [string]$pass="vcoadmin", [Parameter(Mandatory=$true)] [string]$categoryId, [Parameter(Mandatory=$true)] [System.IO.FileInfo] $file ) #### Make no changes below this line ##############################...
burkeazbill/vroClientScripts
import-workflow.ps1
PowerShell
mit
3,730
if (-not ("SPLogLevel" -as [type])) { Add-Type -TypeDefinition @" public enum SPLogLevel { Normal, Verbose } "@ } [SPLogLevel]$Global:_logLevel = [SPLogLevel]::Normal Function Set-SPLogLevel() { Param ( [Parameter(Mandatory=$true)] [SPLogLevel]$Lo...
Encamina/Enmarcha-SharePoint-PowerShell
Enmarcha.SharePoint.PowerShell/EnmarchaFunctions.psm1
PowerShell
mit
69,497
#============================================================================== # You may need to change the execution policy in order to run this script # Run the following in powershell: # # Set-ExecutionPolicy RemoteSigned # #============================================================================== # # ...
stephane-martin/salt-debian-packaging
salt-2016.3.2/pkg/windows/build_env.ps1
PowerShell
apache-2.0
12,953