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 |
|---|---|---|---|---|---|
Start-Process "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" -Argument "node_modules/.bin/karma start karma.conf.js"
Start-Process "chrome" -Argument ".\SpecRunner.html" | aarce77/JSCodeKata | karma.ps1 | PowerShell | mit | 187 |
Given 'the module was named (\S*)' {
Param($Name)
$Script:ModuleName = $Name
$path = "$PSScriptRoot\.."
$module = Get-ChildItem -Path $path -Recurse -Filter "$ModuleName.psm1" -verbose
$module | should not benullorempty
$module.fullname | Should Exist
$Script:ModuleSource = "$PSScriptRoot\... | megamorf/CitrixImagingTools | Spec/module.Steps.ps1 | PowerShell | mit | 3,818 |
#requires -version 2
<#
.Synopsis
Test the Assert-NotExists cmdlet.
.Description
Test the Assert-NotExists cmdlet.
.Inputs
None
.Outputs
None
.Notes
=====================================================================
#Use an ArrayList as a logger.
#The log entries will be in $simpleLogger.
#
$simpleLogger = new-ob... | imfrancisd/PowerShell-Assert-Library | test/Layer2/Test-Assert-NotExists-Multiple.ps1 | PowerShell | mit | 39,155 |
@{
ModuleVersion = '1.0.0'
GUID = 'bd4390dc-a8ad-4bce-8d69-f53ccf8e4163'
Author = 'Luigi Grilli'
CompanyName = 'Luigi Grilli'
Copyright = 'Copyright (c) 2017 - 2019 Luigi Grilli. All rights reserved.'
Description = 'Powershell module for working with elasticsearch clusters'
PowerShellVersion = '5.1'
DotNetFrameworkVer... | gigi81/elastico | Elastico/Elastico.psd1 | PowerShell | mit | 5,746 |
function Start-DbaTrace {
<#
.SYNOPSIS
Starts SQL Server traces
.DESCRIPTION
Starts SQL Server traces
.PARAMETER SqlInstance
The target SQL Server instance
.PARAMETER SqlCredential
Login to the target instance using alternative credentials. Accepts PowerShell crede... | Splaxi/dbatools | functions/Start-DbaTrace.ps1 | PowerShell | mit | 3,522 |
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/New-PASGroup.Tests.ps1 | PowerShell | mit | 2,848 |
#requires -version 5.0
#define some properties
#add a constructor or two
#add some methods
#enhancements and an enumeration
#added tooling around the class and moved methods to external functions
#hide the Zip method
#added an enumeration
enum FileClass {
Script
Text
Office
Graphic
Executable
System
... | jdhitsolutions/Demo-Class-Based-Tools | Demo5.ps1 | PowerShell | mit | 4,075 |
@(
@{Name = "Open PowerShell" },
@{Name = "Open PowerShell (No Profile)" },
@{Name = "Open PowerShell (Administrator)" },
@{Name = "Open Command" },
@{Name = "Open Command (Administrator)" }
) | % {
$link = $_
Invoke-InstallStep "Removing '$($link.Name)' Shell Integration" {
@("*", "Directory\Background", "Fol... | paulmarsy/Console | Installation/Uninstall/General/Console/Console Shell Integration.ps1 | PowerShell | mit | 475 |
#requires -Version 3
function Get-RubrikModuleDefaultParameter
{
<#
.SYNOPSIS
Retrieves the default parameter values
.DESCRIPTION
The Get-RubrikModuleDefaultParameter will retrieve the default parameter values configured within the users options file.
.NOTES
Written by Mike Pres... | rubrikinc/PowerShell-Module | Rubrik/Public/Get-RubrikModuleDefaultParameter.ps1 | PowerShell | mit | 1,159 |
#Add Azure Account
Add-AzureAccount
#Get the subscription, and set the default subscription
Get-AzureSubscription | Select SubscriptionName
$SubscriptionName = Read-Host 'Which subscription would you like to use?'
Select-AzureSubscription -SubscriptionName $SubscriptionName –Default
#Switch to Azure Resource Manager
... | sviera91/DockerInLinux | VMwithDockerPS0.98.ps1 | PowerShell | apache-2.0 | 2,913 |
$packageName = 'dolphin'
$url = 'https://dl.dolphin-emu.org/builds/dolphin-master-5.0-5815-x64.7z'
$checksum = '5f5596933a11e99f3852edbf911ea98e0d5defcbba631701ab91ad12f8f4dba9'
$checksumType = 'sha256'
$url64 = $url
$checksum64 = $checksum
$checksumType64 = $checksumType
$toolsDir = "$(Split-Path -parent $MyInvocation... | dtgm/chocolatey-packages | automatic/_output/dolphin/5.0.5815/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 788 |
function New-ComplexPassword{
<#
.Synopsis
Generates one or more complex passwords designed to fulfill the requirements for Active Directory
.DESCRIPTION
Generates one or more complex passwords designed to fulfill the requirements for Active Directory
.EXAMPLE
New-ComplexPassword
... | MarvTheRobot/AutomatedDeploymentEngine | mtr.ADE/Functions/New-ComplexPassword.ps1 | PowerShell | apache-2.0 | 5,365 |
# Copyright 2012 Aaron Jensen
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | cloudoman/carbon | Carbon/IIS/Enable-IisSecurityAuthentication.ps1 | PowerShell | apache-2.0 | 2,755 |
function Add-VSGreengrassResourceDefinitionVersionResourceDataContainer {
<#
.SYNOPSIS
Adds an AWS::Greengrass::ResourceDefinitionVersion.ResourceDataContainer resource property to the template. <a name="aws-properties-greengrass-resourcedefinitionversion-resourcedatacontainer-description"></a>A contain... | scrthq/Vaporshell | VaporShell/Public/Resource Property Types/Add-VSGreengrassResourceDefinitionVersionResourceDataContainer.ps1 | PowerShell | apache-2.0 | 5,502 |
#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/Get-ValidateIsIP.ps1 | PowerShell | bsd-3-clause | 14,282 |
BeforeAll {
. $PSScriptRoot\demistomock.ps1
. $PSScriptRoot\SecurityAndCompliance.ps1
}
Describe 'StringRegexParse' {
Context "SuccesResults" {
It "No SuccesResults" {
$string = ''
$parsed_object = ParseSuccessResults $string -1
$parsed_object | Should -Be $null
... | demisto/content | Packs/EWS/Integrations/SecurityAndCompliance/SecurityAndCompliance.Tests.ps1 | PowerShell | mit | 6,556 |
Function Get-MVPProfileImage {
<#
.SYNOPSIS
Invoke the GetMVPProfileImage REST API to retrieve your MVP profile image
.DESCRIPTION
Gets your MVP profile image
.EXAMPLE
Get-MVPProfileImage
It gets your MVP profile image.
#>
[CmdletBinding()]
Param()
if (-not ($global:... | lazywinadmin/MVP | src/public/Get-MVPProfileImage.ps1 | PowerShell | mit | 1,048 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
Describe "Tests conversion of deserialized types to original type using object properties." -Tags "CI" {
BeforeAll {
# Create new types and test functions.
$type1,$type2,$type3,$type4 = Add-Type -PassThru -... | Cowmonaut/PowerShell | test/powershell/Language/Scripting/DeserializedTypeConversion.Tests.ps1 | PowerShell | mit | 8,040 |
$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/Invoke-DbaDbDataMasking.Tests.ps1 | PowerShell | mit | 3,623 |
. $PSScriptRoot\..\notepadplusplus.commandline\update.ps1
function global:au_BeforeUpdate {
$Latest.URL32 = $Latest.URL32_i
$Latest.URL64 = $Latest.URL64_i
$Latest.FileType = 'exe'
Get-RemoteFiles -Purge -NoSuffix
}
update -ChecksumFor none
| jberezanski/chocolatey-coreteampackages | automatic/notepadplusplus.install/update.ps1 | PowerShell | apache-2.0 | 254 |
# This PS module contains functions for Desired State Configuration (DSC) Registry provider. It enables querying, creation, removal and update of Windows registry keys through Get, Set and Test operations on DSC managed nodes.
# Fallback message strings in en-US
DATA localizedData
{
# culture = "en-US"
Convert... | cowofevil/puppetlabs-dsc | lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRegistryResource/MSFT_xRegistryResource.psm1 | PowerShell | apache-2.0 | 37,435 |
$ErrorActionPreference = 'Stop'
$toolsPath = Split-Path $MyInvocation.MyCommand.Definition
$packageArgs = @{
packageName = $Env:ChocolateyPackageName
fileType = $fileType
file = Get-Item $toolsPath\*.exe
silentArgs = '/VERYSILENT /NORESTART /SUPPRESSMSGBOXES /SP- /LOG="{0}/InnoInstall.... | jberezanski/chocolatey-coreteampackages | automatic/alldup/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 1,004 |
@{
# Script module or binary module file associated with this manifest.
ModuleToProcess = 'Malware-Detection.psm1'
# Version number of this module.
ModuleVersion = '2.0.0'
# ID used to uniquely identify this module
GUID = '3631650d-5f48-42f2-92de-5f0b3531dc4b'
# Author of this module
Author = 'PoshSec'
# Copyrigh... | jbarcia/PoshSec | PoshSec/Malware-Detection/Malware-Detection.psd1 | PowerShell | bsd-3-clause | 1,081 |
# Copyright (c) 2014-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under both the Apache 2.0 license (found in the
# LICENSE file in the root directory of this source tree) and the GPLv2 (found
# in the COPYING file in the root directory of this source tree).
# You may select, at... | jedi22/osquery | tools/provision/chocolatey/gflags-dev.ps1 | PowerShell | bsd-3-clause | 3,970 |
import-module virtualmachinemanager
$diskvols = @{}
function get_vms($vms){
$results = @{}
$vms | ForEach {
$vm_hash = @{}
$id = $_.ID
$vm_hash["Properties"] = $_
$vm_hash["Networks"] = $_.VirtualNetworkAdapters.IPv4Addresses
$vm_hash["DVDs"] = @($_.VirtualDVDDrives | Select -Expa... | KevinLoiseau/manageiq | app/models/manageiq/providers/microsoft/infra_manager/ps_scripts/get_inventory.ps1 | PowerShell | apache-2.0 | 2,747 |
# ----------------------------------------------------------------------------------
#
# 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... | yoavrubin/azure-powershell | src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/ScenarioTests/Common.ps1 | PowerShell | apache-2.0 | 2,717 |
Set-StrictMode -version Latest
Add-Type -assemblyName System.Windows.Forms
$dialog = New-Object System.Windows.Forms.OpenFileDialog
$dialog.Filter = 'CSV Files|*.csv|All Files|*.*'
$dialog.InitialDirectory = '.'
if ($dialog.ShowDialog() -ne "OK") {
exit 1
}
Import-Csv $dialog.FileName -Header "id","gr... | ishiharak/GroupingScript-for-Win | GroupingScript.ps1 | PowerShell | mit | 870 |
$ErrorActionPreference = 'Stop'
# *** Automatically filled ***
$packageArgs = @{
packageName = 'stellarium'
softwareName = 'Stellarium *'
fileType = 'exe'
url = 'https://github.com/Stellarium/stellarium/releases/download/v0.21.3/stellarium-0.21.3-win32.exe'
url64bit ... | Thilas/chocolatey-packages | stellarium/tools/chocolateyInstall.ps1 | PowerShell | mit | 841 |
param(
[Parameter()]
[string]$Channel = $null,
[Parameter()]
[string]$Bitness = "32",
[Parameter()]
[string]$SourceFileFolder = "SourceFiles",
[Parameter()]
[string]$Languages,
[Parameter()]
[string]$ExcludedApps,
[Parameter()]
[string]$AdditionalApps
)
# Depl... | OfficeDev/Office-IT-Pro-Deployment-Scripts | Office-ProPlus-Deployment/Setup-CMOfficeDeployment/DeploymentFiles/CM-OfficeDeploymentScript.ps1 | PowerShell | mit | 4,697 |
Function Get-UnityDisk {
<#
.SYNOPSIS
View details about disks on the system.
.DESCRIPTION
View details about disk on the system.
You need to have an active session with the array.
.NOTES
Written by Erwan Quelin under MIT licence - https://github.com/equelin/Unity-Powershell... | equelin/Unity-Powershell | Unity-Powershell/Public/Hardware/Get-UnityDisk.ps1 | PowerShell | mit | 2,055 |
$PackageName = 'neo4j-community'
# Per-package parameters
$downloadUrl = 'http://neo4j.com/artifact.php?name=neo4j-community-3.1.7-windows.zip'
$md5Checksum = '0c1679b2c230550d8bc04493784cd721'
$neozipSubdir = 'neo4j-community-3.1.7'
# major.minor.update.build
# Build is always 14
$privateJavaVersion = "8.0.131.11"
$pr... | glennsarti/neo4j-community-chocolatey | neo4j-community-3.1.7/tools/chocolateyInstall.ps1 | PowerShell | mit | 12,022 |
function Enable-WindowsRemoteManagement {
param(
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string]
$DomainName
)
Enable-NetFirewallRule -DisplayGroup "Windows Remote Management"
Set-Item -Path WSMan:\localhost\Client\TrustedHosts "*.$DomainName" -Force... | nicholasdille/DSCTooling | Bootstrapping.ps1 | PowerShell | mit | 28,515 |
param(
[string]$DownloadPath = "https://github.com/Stormancer/Sample_DedicatedClientServer/releases/download",
[string]$Version = "1.01",
[string]$FileName = "Stormancer_DCS_1.01.zip",
[string]$InstallPath = "C:\Workspace\Sample_DedicatedClientServer-Unreal\DedicatedServer\Plugins\UEStormancerPlugin\R... | Stormancer/Sample_DedicatedClientServer-Unreal | DedicatedServer/Plugins/UEStormancerPlugin/SetupResources.ps1 | PowerShell | mit | 2,231 |
<#
.SYNOPSIS
PowerShell implementation for Expiring Cache
.DESCRIPTION
Takes a ScriptBlock as execution and expiration policy.
ScriptBlock is stored along with its expiration policy.
Upon access, expiration policy is assessed. On expiration
the given ScriptBlock is executed and the value is retrieved.
This value is st... | hobelinm/PsxUtility | Main/Add-ExpiringCacheItem.ps1 | PowerShell | mit | 3,291 |
#
# FCOP V1.0 <http://github.com/dlid/fcop>
#
#
$path = Split-Path $script:MyInvocation.MyCommand.Path
[Reflection.Assembly]::LoadFile($path + "\bin\edtFTPnet.dll")
function Install-Fcop {
param (
[Parameter(Mandatory=$true)]
[string]$Config,
[Parameter(Mandatory=$false)]
[int]$Pre... | dlid/fcop | fcop.psm1 | PowerShell | mit | 35,979 |
function Set-xSPOListFolderCreation {
[CmdletBinding()]
param (
[Parameter(Mandatory,ValueFromPipeline,ValueFromPipelineByPropertyName)]
[uri]
$Url,
[Parameter(Mandatory,ValueFromPipeline,ValueFromPipelineByPropertyName)]
[string]
$Title,
[Parameter(Mand... | ChendrayanV/aOSComm-IndiaTour | public/Set-xSPOListFolderCreation.ps1 | PowerShell | mit | 890 |
function Invoke-OvfADTests
{
<#
.SYNOPSIS
Describe purpose of "Invoke-OvfADTests" in 1-2 sentences.
.DESCRIPTION
Add a more complete description of what the function does.
.PARAMETER SourceFolder
Describe parameter -SourceFolder.
.PARAMETER OutputFolder
Describe par... | PPOSHGROUP/PPoSh-Meetings | 06-2017/Pester_MateuszCzerniawski/Module/OVF/Public/Invoke-OvfADTests.ps1 | PowerShell | mit | 1,761 |
Write-Output @{
'psmake.mod.packaging' = '1.1.0.0';
'psmake.mod.update-version-info' = '1.2.0.0';
'psmake.mod.testing' = '1.1.0.0';
}
| wongatech/ServiceTesting.EndpointLauncher | make/Modules.ps1 | PowerShell | mit | 137 |
Write-Host "RECONHECENDO SEU USB!"
if((! $global:usbWatcherDestFolder) -or (! (Test-Path $global:usbWatcherDestFolder)))
{ Write-Error "Variável global `$usbWatcherDestFolder não encontrada. Verifique se ela está sendo setada no arquivo ps-usb-watcher.profile.ps1 corretamente ou execute o script novamente." }
... | wallybh/ps-usb-watcher | Import-USBFiles.ps1 | PowerShell | mit | 1,522 |
$packageName = 'ipinfooffline'
$url = 'http://www.nirsoft.net/utils/ipinfooffline.zip'
$checksum = '376b522c0af580610b83b49ceb707cdcf7b4bd91'
$checksumType = 'sha1'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$installFile = Join-Path $toolsDir "$($packageName).exe"
Install-ChocolateyZipPacka... | dtgm/chocolatey-packages | automatic/_output/ipinfooffline/1.43/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 632 |
#!powershell
# <COPYRIGHT>
# <CODEGENMETA>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.... | pyrotimux/server_playground | ansible/library/win_ad_xadou.ps1 | PowerShell | apache-2.0 | 13,321 |
$packageName = 'pstpassword.install'
$installerType = 'exe'
$silentArgs = '/S'
$validExitCodes = @(0)
$url = 'http://www.nirsoft.net/toolsdownload/pstpassword_setup.exe'
$checksum = '5208369969acc8467dd12abe9872e59372837f6f98549f24237e64f761a9cb57'
$checksumType = 'sha256'
$chocTempDir = Join-Path $Env:Temp "chocolat... | dtgm/chocolatey-packages | automatic/_output/pstpassword.install/1.20/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 1,154 |
$version = $args[0]
$formats = @("Html", "Dhtml", "Word", "Excel", "JSON")
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
Try
{
foreach ($format in $formats)
{
# Setup variables
$FeatureDirectory = $PSScriptRoot + "\src\Pickles\Examples"
$OutputDirectory = $PSScriptRoot... | ludwigjossieaux/pickles | testOutput.ps1 | PowerShell | apache-2.0 | 1,809 |
function New-VSPinpointBaiduChannel {
<#
.SYNOPSIS
Adds an AWS::Pinpoint::BaiduChannel resource to the template. A *channel* is a type of platform that you can deliver messages to. You can use the Baidu channel to send notifications to the Baidu Cloud Push notification service. Before you can use Amazon... | scrthq/Vaporshell | VaporShell/Public/Resource Types/New-VSPinpointBaiduChannel.ps1 | PowerShell | apache-2.0 | 14,516 |
$packageName = 'firefox-nightly'
$installerType = 'exe'
$silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-'
$url = 'https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/firefox-56.0a1.en-US.win32.installer.exe'
$checksum = 'dac22ba2e85573a5eb16db71c4a75b9cb8090b645f69f4547096a07a72aae64d'
$c... | dtgm/chocolatey-packages | automatic/_output/firefox-nightly/56.0.1.2017080112/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 1,131 |
$packageName = '{{PackageName}}'
$installerType = 'exe'
$url = '{{DownloadUrl}}'
$silentArgs = '/S'
$validExitCodes = @(0)
Install-ChocolateyPackage $packageName $installerType $silentArgs $url -validExitCodes $validExitCodes
| ebugusey/chocolatey-coreteampackages | automatic/pyhoca-gui/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 230 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
Describe "Experimental Feature Basic Tests - Feature-Disabled" -tags "CI" {
BeforeAll {
$skipTest = $EnabledExperimentalFeatures.Contains('ExpTest.FeatureOne')
if ($skipTest) {
Write-Verbose "Test Suite Skipped. ... | JamesWTruher/PowerShell-1 | test/powershell/engine/ExperimentalFeature/ExperimentalFeature.Basic.Tests.ps1 | PowerShell | mit | 24,246 |
$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/Import-DbaPfDataCollectorSetTemplate.Tests.ps1 | PowerShell | mit | 2,117 |
#
# 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... | newrelic-forks/cassandra | bin/cassandra.ps1 | PowerShell | apache-2.0 | 12,385 |
function New-BTVisual {
<#
.SYNOPSIS
Creates a new visual element for toast notifications.
.DESCRIPTION
The New-BTVisual function creates a new visual element for toast notifications, which defines all of the visual aspects of a toast.
.INPUTS
None
.OUTPUT... | Windos/BurntToast | BurntToast/Public/New-BTVisual.ps1 | PowerShell | mit | 3,038 |
# General Utility Functions
function Invoke-NullCoalescing {
$result = $null
foreach($arg in $args) {
if ($arg -is [ScriptBlock]) {
$result = & $arg
} else {
$result = $arg
}
if ($result) { break }
}
$result
}
Set-Alias ?? Invoke-N... | 1974kpkpkp/posh-git | Utils.ps1 | PowerShell | mit | 923 |
function Remove-JiraGroupMember {
# .ExternalHelp ..\JiraPS-help.xml
[CmdletBinding( SupportsShouldProcess, ConfirmImpact = 'High' )]
param(
[Parameter( Mandatory, ValueFromPipeline )]
[ValidateNotNullOrEmpty()]
[ValidateScript(
{
if (("JiraPS.Group" -noti... | AtlassianPS/JiraPS | JiraPS/Public/Remove-JiraGroupMember.ps1 | PowerShell | mit | 5,440 |
Param(
[Parameter(Mandatory=$true)]
[string]$vm_id,
[Parameter(Mandatory=$true)]
[string]$vmm_server_address,
[string]$proxy_server_address=$null
)
# Include the following modules
$Dir = Split-Path $script:MyInvocation.MyCommand.Path
. ([System.IO.Path]::Combine($Dir, "utils\write_messages.ps1"))
. ([System.... | jarig/vagrant-vmm | lib/vagrant-vmm/scripts/get_vm_status.ps1 | PowerShell | mit | 826 |
function Add-GitHubRunnerLabel {
<#
.SYNOPSIS
Add a new label to a GitHub Runner that's registered to a GitHub repository.
#>
[CmdletBinding()]
[OutputType('PSGitHub.RunnerLabels')]
param(
[Parameter(Mandatory, Position = 0)]
[string] $Owner,
[Parameter(Mandatory, Position = 1)]
... | pcgeek86/PSGitHub | Functions/Public/Actions/Add-GitHubRunnerLabel.ps1 | PowerShell | mit | 1,183 |
function Out-XmlDocument
{
<#
.SYNOPSIS
Xml output plugin for PScribo.
.DESCRIPTION
Outputs a xml representation of a PScribo document object.
#>
[CmdletBinding()]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments','pluginName')]
[Diagnostics.C... | iainbrighton/PScribo | Src/Plugins/Xml/Out-XmlDocument.ps1 | PowerShell | mit | 4,511 |
Function Get-CompInfo {
[CmdletBinding()]
Param(
#Want to support multiple computers
[Parameter(Mandatory = $True,
ValueFromPipeline = $true,
ValueFromPipelineByPropertyName = $true)]
[ValidateCount(0, 2)]
[String[]]$ComputerName,
#Switch to turn on Error logging
[Sw... | kidchenko/playground | powershell-advanced-tools-and-scripting-with-powershell/Mod5/6ParamCount.ps1 | PowerShell | mit | 424 |
Function New-UnityCIFSServer {
<#
.SYNOPSIS
Create an SMB/CIFS server.
.DESCRIPTION
Create an SMB/CIFS server.
You need to have an active session with the array.
.NOTES
Written by Erwan Quelin under MIT licence - https://github.com/equelin/Unity-Powershell/blob/master/LICENS... | equelin/Unity-Powershell | Unity-Powershell/Public/New-UnityCifsServer.ps1 | PowerShell | mit | 7,866 |
#Required -Version 3.0
function Main
{
# Uri
Write-Debug "Creating GitHub zip uri."
$GitHubURI = @{
github = "guitarrapc"
repository = "WebPlatformInstaller"
}
$uri = Get-GitHubRepositryURI @GitHubURI
# Directory
Write-Debug "Checking temp directory is already exist."
... | guitarrapc/WebPlatformInstaller | WebPlatformInstaller/Tools/RemoteInstall.ps1 | PowerShell | mit | 6,845 |
function BootstrapNuget {
param(
[Parameter(Mandatory=$true)][string]$ExistingNuget,
[Parameter(Mandatory=$true)][string]$packageFolder
)
exec { & $ExistingNuget install "NuGet.CommandLine" -Version "3.4.3" -OutputDirectory "$packageFolder" -NonInteractive -Verbosity detailed }
}
function InstallNugetPacka... | csMACnz/Beefeater | build/utils.ps1 | PowerShell | mit | 2,378 |
param (
# Specifies a pre-release build number. This is ignored if -Stable is used.
[int] $BuildNum,
# Indicates this is a Stable release. If set, the nuget version number is left unaltered.
[switch] $Stable,
# The configuration target for the build (e.g. Debug or Release)
[string] $Configuratio... | schyntax/cs-schyntax | build.ps1 | PowerShell | mit | 5,394 |
@{
Path = 'SharePointDsc.psd1'
}
# Waiting for ModuleBuilder to do away with this file
# when all parameters are provided to the function
| PowerShell/xSharePoint | SharePointDsc/build.psd1 | PowerShell | mit | 142 |
if (!(Test-Path env:POLARIS_VERSION)) {
throw "POLARIS_VERSION environment variable is not defined"
}
""
"Compiling executable"
# TODO: Uncomment the following once Polaris can do variable expansion of %LOCALAPPDATA%
# And remove the code setting these as defaults in `service/mod.rs`
# $script:INSTALL_DIR = "%LOCALA... | agersant/polaris | res/windows/release_script.ps1 | PowerShell | mit | 2,763 |
workflow Install-WindowsUpdate {
[CmdletBinding()]
param(
[Parameter(Mandatory=$false)]
[ValidateSet('All', 'Recommended')]
[string]
$Filter = 'Recommended'
,
[Parameter(Mandatory=$false)]
[switch]
$ScanOnly
,
[Paramete... | nicholasdille/PowerShell | Windows Update/Install-WindowsUpdate-Workflow.ps1 | PowerShell | mit | 3,587 |
$ErrorActionPreference = "Continue"
Write-Host "Checking if log folder exists and making it if not"
$Path = "C:\PowerShell Logs"
If (!(Test-Path -Path $Path )) {
New-Item -ItemType Directory -Path $Path
}
Else {
Write-Host "Folder exists, proceeding with script execution"
}
$Date = Get-Date -format MM.dd.yyyy
$c... | codycschmidt/Powershell-Scripts | Local-Admin/Change_Local_Admin_List.ps1 | PowerShell | mit | 3,821 |
################
# SYSKIT
# www.syskit.com
<#
Lists all Users in Active Directory. Run on Domain Controller.
#>
################
Get-ADUser -Filter * | select Name, DistinguishedName, Enabled, SID | Acceleratio/SysKitPowerShellScripts | PowerShell Scripts/AD/DC_GetAllUsers.ps1 | PowerShell | mit | 196 |
function Get-MrSqlInstance {
[CmdletBinding()]
param (
[Parameter(Mandatory,
ValueFromPipeline)]
[Alias('ServerName',
'PSComputerName')]
[string[]]$ComputerName,
[System.Management.Automation.Credential()]$Credential = [System.Management.Autom... | mikefrobbins/SQL | MrSQL/Public/Get-MrSqlInstance.ps1 | PowerShell | mit | 2,723 |
function Backup-DbaDatabase {
<#
.SYNOPSIS
Backup one or more SQL Sever databases from a single SQL Server SqlInstance.
.DESCRIPTION
Performs a backup of a specified type of 1 or more databases on a single SQL Server Instance. These backups may be Full, Differential or Transaction log backu... | alevyinroc/dbatools | functions/Backup-DbaDatabase.ps1 | PowerShell | mit | 38,618 |
param($installPath, $toolsPath, $package, $project)
Write-Host "Executing XSockets Uninstall.ps1"
Write-Host "Uninstall XSockets packages in the following order:"
Write-Host "1: Uninstall-Package XSockets"
Write-Host "2: Uninstall-Package XSockets.Server"
Write-Host "3: Uninstall-Package XSockets.Core"
Write-Host "4:... | reyx/Reyx.SocketChat | packages/XSockets.3.0.2/tools/uninstall.ps1 | PowerShell | mit | 354 |
$packageName = 'kcleaner'
$installerType = 'exe'
$silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-'
$url = 'http://www.kcsoftwares.com/files/kcleaner_lite.exe'
$checksum = '8303a84752166668d5bf70cfdd27b00d6e36e69ddc56262da7073e9cdbf7d6ba'
$checksumType = 'sha256'
$validExitCodes = @(0)
Install-ChocolateyPac... | dtgm/chocolatey-packages | automatic/_output/kcleaner/3.4.0.94/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 669 |
$packageName = '{{PackageName}}'
$url = '{{DownloadUrl}}'
$checksum = '{{Checksum}}'
$checksumType = 'sha256'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$installFile = Join-Path $toolsDir "$($packageName).exe"
try {
Get-ChocolateyWebFile -PackageName "$packageName" `
... | dtgm/chocolatey-packages | automatic/ftpdmin/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 528 |
# Copyright 2012 Aaron Jensen
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | michael-wolfenden/CodeCampServer | scripts/Carbon/IIS/Enable-IisDirectoryBrowsing.ps1 | PowerShell | bsd-3-clause | 1,875 |
# ----------------------------------------
# LANG 02: CREATE MULTILINGUAL CONTENT
# ----------------------------------------
param([string]$LogFolderPath)
$UserStory = "LANG_02"
$0 = $myInvocation.MyCommand.Definition
$CommandDirectory = [System.IO.Path]::GetDirectoryName($0)
$values = @{"User Story: " = $UserStor... | GSoft-SharePoint/Dynamite-Components | Source/GSoft.Dynamite.Models.CrossSitePublishingCMS/Modules/Multilingualism/LANG_02/Install-LANG02.ps1 | PowerShell | mit | 947 |
$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/Repair-DbaDbMirror.Tests.ps1 | PowerShell | mit | 996 |
Param($DCIPAddress,$DomainFullName,$DomainAdminName,$Password,$tempurl,$sakey)
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certifi... | MSSedusch/azure-quickstart-templates | sccm-technicalpreview/scripts/WorkFlow-Other.ps1 | PowerShell | mit | 8,990 |
Function New-GitLabRunner {
param(
[Parameter(Mandatory=$true)]
[string] $Token,
[Parameter(Mandatory=$true)]
[string] $Description,
[Parameter(Mandatory=$true)]
[string] $Tags,
[bool] $RunUntagged = $false,
[bool] $Locked = $true,
[Parame... | TerrapinStation/PSGitLab | PSGitLab/Public/Runners/New-GitLabRunner.ps1 | PowerShell | mit | 2,050 |
Start-AutoRestCodeGeneration -ResourceProvider "devspaces/resource-manager" -AutoRestVersion "v2" | ayeletshpigelman/azure-sdk-for-net | sdk/devspaces/Microsoft.Azure.Management.DevSpaces/src/generate.ps1 | PowerShell | mit | 97 |
<#
.SYNOPSIS
This script executes a file but first checks to see if any reboot operations are pending. If so, it will
reboot the computer to clear up any pending operations and then execute the file.
.EXAMPLE
PS> .\Start-ScriptWithPendingOperationCheck.ps1 -FilePath 'C:\Windows\System32\WindowsPowerShell\v1.0\powers... | Hurtrus/My-Learning-of-Powershell | PendingReboot.ps1 | PowerShell | mit | 7,479 |
ConvertFrom-StringData @'
Subject = 只今の時刻は
Format = {0}です
'@
| ototadana/JenkinsOnDesktop | JenkinsOnDesktop/Resources/Scripts/Businesses/Time-keeping/ja-JP/main.psd1 | PowerShell | mit | 96 |
function Remove-vROConfigurationElement {
<#
.SYNOPSIS
Remove a vRO Configuration Element
.DESCRIPTION
Remove a vRO Configuration Element
.PARAMETER Id
Action ID
.PARAMETER Force
If the configuration element is referenced by some workflows, it is considered to be 'in use'and ... | jakkulabs/PowervRO | src/Functions/Public/configuration-service/Remove-vROConfigurationElement.ps1 | PowerShell | mit | 1,778 |
############################################################################################################################################
# Script that allows to get the Workflow Service Status at both Web Application and Site Collection Level
# Required Parameters:
# -> $sSiteCUrl: Site Collection Url
# -> $sWebA... | CompartiMOSS/SharePoint-PowerShell | SharePoint/Administration/PS_Work_With_Workflows.ps1 | PowerShell | mit | 1,972 |
param(
[parameter(valuefrompipeline = $true, mandatory=$true)]
[type]
$type
)
process {
sleep -seconds 3;
write-progress -activity 'new-interfacewrapper' -currentOperation $type.Name
$t = $type
$className = 'BipsProxy' + $t.name
$typeName = $t.name;
new-item -name $className -type class ... | beefarino/bips | src/StudioShellScripts/new-interfacewrapper.ps1 | PowerShell | mit | 1,781 |
Get-ChildItem "$PSScriptRoot\libs" -Filter *.ps1 -Recurse |
? { -not ($_.Name.Contains(".Tests.")) } | % {
. $_.FullName
}
Get-ChildItem "$PSScriptRoot\functions" -Filter *.ps1 -Recurse |
? { -not ($_.Name.Contains(".Tests.")) } | % {
. $_.FullName
}
$nuget = "$PSScriptRoot\tools... | cwpdevteam/NScaffold | src/nudeploy/tools/nudeploy.psm1 | PowerShell | mit | 664 |
Import-Module ServerManager
# To list the feature names
#Get-WindowsFeature
# For a single feature and rebooting after
#Add-WindowsFeature SomeFeatureName -restart
# For multiple features at once
#Add-WindowsFeature Web-WebServer,NET-Framework-45-ASPNET,Web-Mgmt-Tools
# Enable IIS Features
Add-WindowsFeature Web-... | WaffleSquirrel/mick-nuggets | nugs/powershell-scripts/[DevOps]-Setup-IIS-ForAspNetWebApp.ps1 | PowerShell | mit | 371 |
#region Info
<#
#################################################
# modified by : Joerg Hochwald
# last modified : 2016-04-03
#################################################
Support: https://github.com/jhochwald/NETX/issues
#>
#endregion Info
#region License
<#
Copyright (c) 2012-2016, NET-Experts <h... | jhochwald/MyPowerShellStuff | Modules/ToolBox/Public/Set-Debug.ps1 | PowerShell | mit | 14,193 |
Configuration DomainComputer
{
# Import the required modules
Import-DscResource -Module xPSDesiredStateConfiguration
Import-DscResource -Module PSDesiredStateConfiguration
Import-DscResource -Module cWindowscomputer
Import-DscResource -Module cAzureAutomation
Import-DscResource -Module xPending... | devrandorfer/ScorchDev | Scripts/DomainComputer.ps1 | PowerShell | mit | 3,515 |
$erlangDir = App-Dir "Bench.Erlang"
$binDir = "$erlangDir\bin"
$ertsVersion = Get-AppConfigValue "Bench.Erlang" "ErtsVersion"
$ertsDir = "$erlangDir\erts-${ertsVersion}"
$bindirPath = $binDir.TrimEnd("\").Replace("\", "\\")
$rootdirPath = $erlangDir.TrimEnd("\").Replace("\", "\\")
$iniText = @("[erlang]")
$iniText +=... | mastersign/bench-apps-default | scripts/bench/erlang.env.ps1 | PowerShell | mit | 472 |
Describe "[$($Lab.Name)] SharePoint2016" -Tag SharePoint2016 {
Context "Role deployment successful" {
It "[SharePoint2016] Should return the correct amount of machines" {
(Get-LabVm -Role SharePoint2016).Count | Should -Be $(Get-Lab).Machines.Where({$_.Roles.Name -contains 'SharePoint2016'}).Count
... | AutomatedLab/AutomatedLab | AutomatedLabTest/internal/tests/SharePoint2016.tests.ps1 | PowerShell | mit | 1,078 |
$ErrorActionPreference = 'Stop'
if ((Get-OSArchitectureWidth 32) -or ($env:chocolateyForceX86 -eq 'true')) {
throw "This package doesn't support 32bit architecture"
}
$fileName = 'nomacs-3.12.1.zip'
$toolsPath = Split-Path $MyInvocation.MyCommand.Definition
$zip_path = "$toolsPath\$fileName"
Get-ChildItem $tools... | jberezanski/chocolatey-coreteampackages | automatic/nomacs.portable/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 573 |
$imageTimestamp = Get-Date -Format yyyy-MM-dd
$imageNameCreate = "FreeBSD10_3-" + $imageTimestamp
$vmImageName = "FreeBSD10_3-2016-10-13"
$version = "10.3.20161013"
$publishedDate = "10/13/2016"
$VHDFilePath = "C:\home\Work\Azure\vhd\FreeBSD_10_3_20161013_errata.vhd"
| clovertrail/rocket | powershell/BSDPublishImage/Mooncake/Oct13-2016/env_config.ps1 | PowerShell | apache-2.0 | 315 |
$packageName = 'firefox-nightly'
$installerType = 'exe'
$silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-'
$url = 'https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/firefox-53.0a1.en-US.win32.installer.exe'
$checksum = '28e34718bec5f475138f750a2555ed4f26675731442e36241fa33ffa8cce45e7'
$... | dtgm/chocolatey-packages | automatic/_output/firefox-nightly/53.0.1.2016111415/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 1,134 |
$packageName = 'kvrt'
$url = 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe'
$checksum = '48ad4e1d7a1f716cdf7923277828d96a5c054a9055876e87eec46cee61ee2a23'
$checksumType = 'sha256'
$toolsPath = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$installFile = Join-Path $toolsPath "kvr... | dtgm/chocolatey-packages | automatic/_output/kvrt/2017.03.27.1241/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 960 |
Update-ExecutionPolicy Unrestricted
Set-ExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
cinst console-devel
cinst sublimetext2
cinst sysinternals
cinst TelnetClient -source windowsFeatures
$sublimeDir = "$env:programfiles\Sublime Text 2"
Install... | smaglio81/boxstarter | BuildPackages/example-light/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 937 |
<#
.SYNOPSIS
Invoke-TwoTierSubCaPreConfig.ps1
.DESCRIPTION
This script installs the required Windows features to make the computer an Subordinate Enterprise CA and joins the computer to the domain specified.
.EXAMPLE
.\Invoke-TwoTierSubCaPreConfig -SubCaNetBIOSName 'CA01' -DomainNetBIOSNam... | aws-quickstart/quickstart-microsoft-activedirectory | scripts/archive/Invoke-TwoTierSubCaPreConfig.ps1 | PowerShell | apache-2.0 | 7,466 |
# ----------------------------------------------------------------------------------
#
# 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... | yantang-msft/azure-powershell | src/ResourceManager/Cdn/Commands.Cdn.Test/ScenarioTests/EndpointTests.ps1 | PowerShell | apache-2.0 | 23,369 |
param ([string]$config, [string]$target)
$documentsFolder = [environment]::getfolderpath("mydocuments");
$PSModuleHome = "$documentsFolder\WindowsPowerShell\Modules\OfficeDevPnP.PowerShell.Commands"
New-Item -Path $PSModuleHome -ItemType Directory -Force
Write-Host "Copying files from $target to $PSModuleHome"
Copy-... | ivanvagunin/PnP | Solutions/PowerShell.Commands/PostBuild.ps1 | PowerShell | apache-2.0 | 567 |
function mkfile{
[Cmdletbinding(SupportsShouldProcess=$TRUE)]
param
(
[parameter(Mandatory=$True, ValueFromPipeline=$True, Position=0)]
[String[]]$Creatingfile
)
If (Test-Path $Creatingfile)
{
Write-Host 'File already exist';
Return;
}
New-Item -Type Fi... | iamkarlson/dotfiles | powershell/autorun/file operations functions.ps1 | PowerShell | bsd-2-clause | 445 |
$ErrorActionPreference = "Stop"
"Usage:"
"make_principia_release mathematician culture date primary_ksp_version"
" compatibility_ksp_versions [branch]"
""
" ARGUMENT EXAMPLE VALUES"
" mathematician 陈景润"
" culture zh-CN"... | mockingbirdnest/Principia | make_principia_release.ps1 | PowerShell | mit | 3,881 |
if ($env:PACKER_BUILDER_TYPE -And $($env:PACKER_BUILDER_TYPE).startsWith("hyperv")) {
Write-Host Skip debloat steps in Hyper-V build.
} else {
Write-Host Downloading debloat zip
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$url="https://github.com/StefanScherer/Debloat-Windows... | brad0000/packer-windows | scripts/debloat-windows.ps1 | PowerShell | mit | 1,484 |
function Get-CsvColumns {
param (
[Parameter(Mandatory=$True,Position=1)]
[alias('p')]
[String] $Path,
[Parameter(Mandatory=$False,Position=2)]
[alias('d')]
[String] $Delimiter=',',
[alias('n')]
[Switch] $NoHeaders
)
BEGIN {}
PROCESS {... | craibuc/PsCsv | Functions/Get-CsvColumns.ps1 | PowerShell | mit | 746 |
$packageName = 'websitesniffer'
$url = 'http://www.nirsoft.net/utils/websitesniffer.zip'
$checksum = '016e73e8ec7ae07d713cab9e2782ff9334d07cad'
$checksumType = 'sha1'
$url64 = 'http://www.nirsoft.net/utils/websitesniffer-x64.zip'
$checksum64 = '35af2a9855c9ab5acbee4ba350fd6e464529cd87'
$checksumType64 = 'sha1'
$toolsDi... | dtgm/chocolatey-packages | automatic/_output/websitesniffer/1.45/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 951 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.