code stringlengths 2 1.05M | repo_name stringlengths 5 101 | path stringlengths 4 991 | language stringclasses 3
values | license stringclasses 5
values | size int64 2 1.05M |
|---|---|---|---|---|---|
function New-DoubleIListConverter {
<#
.Description
Creates a new System.Windows.Media.Converters.DoubleIListConverter
.Synopsis
Creates a new System.Windows.Media.Converters.DoubleIListConverter
.Example
New-DoubleIListConverter
.Example
New-DoubleIListConv... | crazyxiang/ClangSetupvNext | bin/Modules/WPK/GeneratedControls/PresentationCore.ps1 | PowerShell | mit | 641,888 |
$packageName = '{{PackageName}}'
$installerType = 'exe'
$silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-'
$validExitCodes = @(0)
try {
Get-ItemProperty -Path @( 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*',
'HKLM:\Software\Microsoft\Windows\CurrentV... | maharishi/chocolatey-packages | automatic/nexusfont.install/tools/chocolateyUninstall.ps1 | PowerShell | apache-2.0 | 981 |
#
# Module manifest for module 'Nupkg'
#
# Generated by: jakub.pawlowski
#
# Generated on: 19.03.2016
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'Nupkg.psm1'
# Version number of this module.
ModuleVersion = '1.0.10'
# ID used to uniquely identify this mod... | qbikez/ps-csproj | src/Nupkg/Nupkg.psd1 | PowerShell | mit | 3,494 |
<#
.SYNOPSIS
Masks a reader input.
.DESCRIPTION
Masks a raeder input.
If the result returns null, try the parameter "-Verbose" to get more details.
.EXAMPLE
.LINK
https://github.com/erwindevreugd/PSDataConduIT
.EXTERNALHELP PSDataConduIT-help.xml
#>
function Invo... | erwindevreugd/PSDataConduIT | PSDataConduIT/Public/Invoke-MaskReaderInput.ps1 | PowerShell | mit | 2,761 |
<#
.SYNOPSIS
Account Management Settings File
.DESCRIPTION
File containing global settings for all account management scripts. Things like logging, database server and any other settings requiring passwords are in the secure file.
.NOTES
File Name : read-settings.ps1
Author : Kris Hagel - kris@krishagel... | krishagel/edage | modules/active-directory/inc/read-settings.ps1 | PowerShell | mit | 1,952 |
configuration Sample_cFSRMFileScreen_UsingTemplate
{
Import-DscResource -Module cFSRMFileScreens
Node $NodeName
{
cFSRMFileScreen DUsersFileScreens
{
Path = 'd:\users'
Description = 'File Screen for Blocking Some Files'
Ensure = 'Present'
Temp... | PlagueHO/cFSRMFileScreens | Examples/Sample_cFSRMFileScreen_UsingTemplate.ps1 | PowerShell | mit | 472 |
<#
This pester file is an example of how organize a pester test.
There tests are based to dummy scenario.
Replace all properties, and mock commands by yours.
#>
$ProjectPath = "$PSScriptRoot\..\..\.." | Convert-Path
$ProjectName = (Get-ChildItem $ProjectPath\*\*.psd1 | Where-Object -FilterScript {
... | PowerShell/xDnsServer | tests/Unit/Classes/DnsRecordPtr.v6.tests.ps1 | PowerShell | mit | 15,847 |
function Disable-WPFTextBox
{
<#
.SYNOPSIS
Function to disable a TextBox Control
.DESCRIPTION
Function to disable a TextBox Control
.PARAMETER TextBox
Specifies the TextBox Control
.EXAMPLE
PS C:\> Disable-WPFTextBox -Textbox $TextBox1
.NOTES
Francois-Xavier Cat
lazywinadmin.com
@lazywinadm
... | lazywinadmin/WPFPS | WPFPS/Public/Disable-WPFTextBox.ps1 | PowerShell | mit | 435 |
Function Connect-SQLite {
<#
.SYNOPSIS
Connect to SQLite Database file
.DESCRIPTION
Creates a SQLiteConnection Object.
.EXAMPLE
PS C:\> $conn = Connect-SQLite -Database <FilePath>
.EXAMPLE
PS C:\> $conn = Connect-SQLite -Database <FilePath> -Open
PS C:\> $conn
... | Proxx/Proxx.SQLite | public/Connect-SQLite.ps1 | PowerShell | mit | 2,904 |
properties {
$base_dir = resolve-path .
$build_dir = "$base_dir\_build"
$sln_file = "$base_dir\src\libcu.sln"
$tools_dir = "$base_dir\tools"
$version = "1.0.0"
$config_cpu = "Release.cpu"
$config_cpuD = "Debug.cpu"
$config_cu = "Release.cu"
$config_cuD = "Debug.cu"
$run_tests = $false
... | BclEx/libcu | default.ps1 | PowerShell | mit | 10,139 |
<#PSScriptInfo
.VERSION 1.0.0
.GUID f6bd598e-c87d-41a7-846d-56b39bc76197
.AUTHOR DSC Community
.COMPANYNAME DSC Community
.COPYRIGHT Copyright the DSC Community contributors. All rights reserved.
.TAGS DSCConfiguration
.LICENSEURI https://github.com/dsccommunity/FSRMDsc/blob/main/LICENSE
.PROJECTURI https://github.com/... | PlagueHO/FSRMDsc | source/Examples/Resources/FSRMFileScreenException/1-FSRMFileScreenException_Config.ps1 | PowerShell | mit | 1,130 |
$binRoot = $(Split-Path -parent $MyInvocation.MyCommand.Definition)
$packageFullName = Join-Path $binRoot ($packageName + '-' + $version)
$binPackageDir = Join-Path $packageFullName "bin"
$tmpPath = Join-Path $env:chocolateyPackageFolder tmp
$tarFile = $packageName + "Install"
$tarPath = Join-Path $tm... | Mistuke/GhcChoco | templates/chocolateyInstall-Template.ps1 | PowerShell | mit | 1,158 |
$packageName = '{{PackageName}}'
$installerType = 'EXE'
$32BitUrl = '{{DownloadUrl}}'
$silentArgs = '/S'
$validExitCodes = @(0)
Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$32BitUrl" -validExitCodes $validExitCodes
| ebugusey/chocolatey-coreteampackages | automatic/fiddler4/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 249 |
# ----------------------------------------------------------------------------------
#
# Copyright 2011 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... | yozik04/azure-sdk-tools | WindowsAzurePowershell/src/Management.SqlDatabase.Test/TestScripts/ResetPassword.ps1 | PowerShell | apache-2.0 | 2,971 |
$packageName = 'telegram.portable'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url = 'https://updates.tdesktop.com/tsetup/tportable.0.9.51.zip'
$checksum = '6cde0e9c45e4ab0846b1fefa55163e493695da5d15644727aaabb7aa847547c6'
$checksumType = 'sha256'
Install-ChocolateyZipPackage -PackageName "... | dtgm/chocolatey-packages | automatic/_output/telegram.portable/0.9.51/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 548 |
# we no longer use a dependeny on WindowsAzureLibsForNet
# Currently we MUST use version 2.5 and dependencies
# broke if the user has a more recent version
if(Test-Path "$env:ProgramFiles\Microsoft SDKs\Azure\.NET SDK\v2.5") {
Write-Host "Windows Azure Libraries for .net v2.5 is already installed."
return
}
In... | mwrock/boxstarter | BuildScripts/nuget/Boxstarter.Azure.PreInstall.ps1 | PowerShell | apache-2.0 | 723 |
$ErrorActionPreference = 'Stop';
$packageName= '{{PackageName}}'
$url = '{{DownloadUrl}}'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$packageArgs = @{
packageName = $packageName
unzipLocation = $toolsDir
fileType = 'EXE'
url = $url
softwareName = 'nt... | abejenaru/chocolatey-packages | automatic/nteract/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 699 |
$packageName = 'dolphin'
$url = 'https://dl.dolphin-emu.org/builds/dolphin-master-5.0-7494-x64.7z'
$checksum = '{checksum}'
$checksumType = 'sha256'
$url64 = $url
$checksum64 = $checksum
$checksumType64 = $checksumType
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
Install-ChocolateyZipPackage... | dtgm/chocolatey-packages | automatic/_output/dolphin/5.0.7494/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 737 |
<#
DESCRIPTION:
Check hibernation is turned off.
REQUIRED-INPUTS:
None
DEFAULT-VALUES:
None
DEFAULT-STATE:
Enabled
RESULTS:
PASS:
Hibernation is currently disabled
WARNING:
FAIL:
Hibernation is currently enabled
... | My-Random-Thoughts/Server-QA-Checks | checks/system/c-sys-15-hibernation.ps1 | PowerShell | apache-2.0 | 2,078 |
#$openCover = Get-ChildItem -Path "C:\Users\$([Environment]::UserName)\.nuget\packages\" -Filter "OpenCover.Console.exe" -Recurse | % { $_.FullName }
#$xUnit = Get-ChildItem -Path "C:\Users\$([Environment]::UserName)\.nuget\packages\" -Filter "xunit.console.exe" -Recurse | % { $_.FullName }
$openCover = "packages\Open... | misiek1984/NetDevPLWebsite | scripts/runCoverage.ps1 | PowerShell | mit | 1,335 |
. $PSScriptRoot\..\BigQuery\BqCmdlets.ps1
$project, $zone, $oldActiveConfig, $configName = Set-GCloudConfig
Describe "Get-BqDataset" {
It "should list datasets" {
try {
New-BqDataset "test_id_2"
New-BqDataset "test_id_3"
$a = Get-BqDataset
$a.Count | Should... | chrsmith/google-cloud-powershell | Google.PowerShell.IntegrationTests/BigQuery/BigQuery.BqDataset.Tests.ps1 | PowerShell | apache-2.0 | 15,985 |
# ----------------------------------------------------------------------------------
#
# 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... | devigned/azure-powershell | src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Test/ScenarioTests/Mab/ContainerTests.ps1 | PowerShell | apache-2.0 | 2,060 |
# ----------------------------------------------------------------------------------
#
# 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/... | AzureAutomationTeam/azure-powershell | src/StackAdmin/Azs.Compute.Admin/Tests/src/CommonModules.ps1 | PowerShell | apache-2.0 | 1,254 |
$ErrorActionPreference = 'Stop'
$packageName = 'reshack.portable'
$url32 = 'http://www.angusj.com/resourcehacker/resource_hacker.zip'
$checksum32 = 'c5a0e7f4b8f1089418520562c13d45f8e6fcfff65537830fb166f218b095708c'
$toolsPath = Split-Path $MyInvocation.MyCommand.Definition
$packageArgs = @{
packageName ... | sippi90/chocolateyautomaticpackages | reshack.portable/tools/chocolateyInstall.ps1 | PowerShell | mit | 761 |
$natsexe = Resolve-Path -Path $env:NATS_EXECUTABLE
$args = @("-a","127.0.0.1","-p","4222")
$ErrorActionPreference = "Stop"
$natstask = Start-Process -FilePath $natsexe -ArgumentList $args -NoNewWindow -PassThru
cargo test --verbose
$er = $LASTEXITCODE
$natstask.Kill()
exit $er | itn3000/simple_nats_client | appveyor-test.ps1 | PowerShell | mit | 283 |
# OMS Device Health connectivity test
# Test as user
$endPoints = @(
'v10.vortex-win.data.microsoft.com'
'settings-win.data.microsoft.com'
'watson.telemetry.microsoft.com'
'oca.telemetry.microsoft.com'
'vortex.data.microsoft.com'
)
$endPoints | %{ Test-NetConnection -Co... | alexverboon/posh | Azure/OMS/Test-connectivity.ps1 | PowerShell | mit | 1,596 |
$wheretosave = $pwd
# preserve wp-config.php
Move-Item "$wheretosave\wp-config.php" "$wheretosave\wpconfig.bak"
# remove files
Remove-Item -Recurse -Force "$wheretosave\wp-*"
Remove-Item -Recurse -Force "$wheretosave\*.php"
Remove-Item -Recurse -Force "$wheretosave\helion.exe"
Remove-Item -Recurse -Force "$wheretosa... | dwatrous/heliondemo-wordpress | clean.ps1 | PowerShell | mit | 485 |
<#
.EXAMPLE
This example enables Project Server in the current environment
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost {
SPProjectServerLicense ProjectLi... | BrunoReboul/SharePointDsc | Modules/SharePointDsc/Examples/Resources/SPProjectServerLicense/1-EnableProjectServer.ps1 | PowerShell | mit | 515 |
[CmdletBinding(PositionalBinding = $false)]
param(
[string]$artifacts = $null,
[string]$buildCounter = $null,
[switch]$ci
)
$ErrorActionPreference = 'Stop'
Import-Module -Force -Scope Local "$PSScriptRoot/../../../build/common.psm1"
$root = "$PSScriptRoot/.."
$project = "$root/src/Handyman.AspNetCore.csp... | JonasSamuelsson/Handyman | src/Handyman.AspNetCore/build/build.ps1 | PowerShell | mit | 680 |
Configuration AssignStaticIpAndDNS
{
import-dscresource -modulename xNetworking
xIPAddress setStaticIPAddress
{
IPAddress = $Node.IPAddress
InterfaceAlias = $Node.InterfaceAlias
DefaultGateway = $Node.DefaultGateway
SubnetMask = $Node.SubnetMask
AddressFamil... | nitinbps/DSCConfigurations | Pull Server/SetupDSCPullServer.ps1 | PowerShell | mit | 3,242 |
################################################################################
## File: Install-Haskell.ps1
## Desc: Install Haskell for Windows
################################################################################
# Get 3 latest versions of GHC, use OData query for that since choco search has issues ... | mattgwagner/New-Machine | .github-actions/images/win/scripts/Installers/Install-Haskell.ps1 | PowerShell | mit | 2,182 |
. $PSScriptRoot\Remove-VMShare.ps1
. $PSScriptRoot\Fakes\Fake_VM.ps1
Describe "Remove-VMShare" {
Context "Removes VM share from vm" {
$script:TestFlag = $false
$fakeVM = New-FakeVM -RemoveSharedFolder {
param($Name)
if($Name -eq "MyShare") { $script:TestFlag = $true }
}
It "Remove share" {
... | wiltaylor/VMLib | Src/PSVMLib/Remove-VMShare.tests.ps1 | PowerShell | mit | 407 |
$ErrorActionPreference = 'Stop';
$packageName = 'CiscoAgentDesktop'
$softwareName = 'CiscoAgentDesktop*'
$installerType = 'MSI'
$silentArgs = '/qn /norestart'
$validExitCodes = @(0, 3010, 1605, 1614, 1641)
if ($installerType -ne 'MSI') {
$validExitCodes = @(0)
}
$uninstalled = $false
[array]$key = Get-UninstallR... | Tervis-Tumbler/chocolateyautomaticpackages | Static/CiscoAgentDesktop/tools/chocolateyuninstall.ps1 | PowerShell | apache-2.0 | 1,240 |
cd (Split-Path $PSCommandPath -Parent)
ri .\imdb_tr.csv -EA SilentlyContinue
$rowNumber = 0
gci .\aclImdb\train\pos -Filter *.txt | % {
New-Object PSCustomObject -Property @{
text = cat $_.FullName;
polarity = "1";
rownumber = $rowNumber
}
$rowNumber += 1
} | Export-Csv ./imdb_tr.cs... | xunilrj/sandbox | courses/columbia-ia/sentiment/merge.ps1 | PowerShell | apache-2.0 | 342 |
properties{
$configuration = "Debug"
$build_number = 0
[switch]$teamcityBuild = $false
$chocolateyApiKey = ""
$chocolateyApiUrl = ""
[switch]$verbose = $false
}
$build_dir = (Split-Path $psake.build_script_file)
$add_includes = Join-Path $build_dir "add-includes.ps1"
& $add_includes @($build_d... | ewilde/crane | build/default.ps1 | PowerShell | apache-2.0 | 725 |
$packageName = '{{PackageName}}'
$packageSearch = 'Nullsoft Install System'
$installerType = 'exe'
$silentArgs = '/S'
$validExitCodes = @(0)
Get-ItemProperty -Path @( 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*',
'HKLM:\Software\Microsoft\Windows\CurrentVersion\Un... | maharishi/chocolatey-packages | automatic/nsis.install/tools/chocolateyUninstall.ps1 | PowerShell | apache-2.0 | 861 |
$packageName = 'mediainfo'
$installerType = 'exe'
$silentArgs = '/S'
$url = 'http://mediaarea.net/download/binary/mediainfo-gui/0.7.84/MediaInfo_GUI_0.7.84_Windows.exe'
$checksum = 'f4595841348e31f89a2265f9ba8acc650f296f5f'
$checksumType = 'sha1'
$validExitCodes = @(0)
Install-ChocolateyPackage -PackageName "$packageN... | dtgm/chocolatey-packages | automatic/_output/mediainfo/0.7.84/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 641 |
function New-VSDocDBDBSubnetGroup {
<#
.SYNOPSIS
Adds an AWS::DocDB::DBSubnetGroup resource to the template. The AWS::DocDB::DBSubnetGroup Amazon DocumentDB (with MongoDB compatibility resource describes a DBSubnetGroup. subnet groups must contain at least one subnet in at least two Availability Zones i... | scrthq/Vaporshell | VaporShell/Public/Resource Types/New-VSDocDBDBSubnetGroup.ps1 | PowerShell | apache-2.0 | 14,145 |
<#########################
0.0 General Information
#########################>
<# 0.1 Script Information #>
<#
Script Title: Computer Shop Utilities: Windows System Builder
Author Name: Justin Muniz
Software License: BSD2
Web Site: https://github.com/JustinMuniz/Computer-Shop-Utilities
File Na... | JustinMuniz/Computer-Shop-Utilities | Windows/PowerShell/Windows-System-Builder.ps1 | PowerShell | bsd-2-clause | 20,464 |
cd $HOME
if ((Test-Path $HOME\reports\) -eq $false){
mkdir $HOME\reports
}
$ReportsPath= "$HOME\reports"
cd $ReportsPath
$trace = ""
$TooOld = (Get-Date).AddDays(-90)
$Servers = Get-ADComputer -filter {whenChanged -gt $TooOld -and OperatingSystem -like "*server*" -and Enabled -eq $true} -properties whenChanged,... | djposh/djposh | DomainSurvey/ServersOSReports.ps1 | PowerShell | mit | 4,127 |
@{
AllNodes = @(
@{
NodeName = '*'
# Common networking
InterfaceAlias = 'Ethernet'
DefaultGateway = '192.168.3.1'
SubnetMask = 24
AddressFamily = 'IPv4'
DnsServerAddress = '4.2.2.2'
... | jdhitsolutions/PS-AutoLab-Env | Standalone/Archive/Deprecated-POC-StandAlone-Server-GUI/StandAlone-Server-Gui.psd1 | PowerShell | mit | 2,722 |
$imageTimestamp = Get-Date -Format yyyy-MM-dd
$dummyImageName = "FreeBSD11_1-2017-02-24"
$dummyVersion = "11.1.20170224"
$dummyPublishDate = "02/24/2017"
$dummyVHDFilePath = "C:\home\Work\Azure\vhd\FreeBSD_11_1_20170224.vhd"
# Specify the values of the following items before publishing images
... | clovertrail/rocket | powershell/BSDPublishImage/frbsd11-1/env_config.ps1 | PowerShell | apache-2.0 | 480 |
$currentPath = Split-Path -Parent $MyInvocation.MyCommand.Path
Write-Verbose -Message "CurrentPath: $currentPath"
# Load Common Code
Import-Module $currentPath\..\..\xSQLServerHelper.psm1 -Verbose:$false -ErrorAction Stop
function Get-TargetResource
{
[CmdletBinding()]
[OutputType([System.Collections.Hashtabl... | ferventcoder/puppetlabs-dsc | lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnService/MSFT_xSQLServerAlwaysOnService.psm1 | PowerShell | apache-2.0 | 3,620 |
# ----------------------------------------------------------------------------------
#
# 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/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Test/ScenarioTests/IaasVm/PolicyTests.ps1 | PowerShell | apache-2.0 | 2,380 |
#ValidationTags#Messaging,FlowControl,CodeStyle#
function Get-DbaCustomError {
<#
.SYNOPSIS
Gets SQL Custom Error Message information for each instance(s) of SQL Server.
.DESCRIPTION
The Get-DbaCustomError command gets SQL Custom Error Message information for each instance(s) of SQL Server.... | dsolodow/dbatools | functions/Get-DbaCustomError.ps1 | PowerShell | mit | 3,121 |
<#
This lab script serves the purpose of showing you how to create and connect two Azure labs in different resource groups e.g. in different locations
You will need an Azure subscription and both labs need to be created within the same subscription. Otherwise you can have a look at the other
options that Connect-Lab ... | AutomatedLab/AutomatedLab | LabSources/SampleScripts/Azure/VpnConnectedLab.ps1 | PowerShell | mit | 3,144 |
<#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/SPInstall/3-InstallSPFoundation.ps1 | PowerShell | mit | 1,270 |
# Copyright (c) @asmichi (https://github.com/asmichi). Licensed under the MIT License. See LICENCE in the project root for details.
#
# すべての Visual Studio インスタンスを更新する。管理者権限で実行する。
#Requires -Version 5.1 -RunAsAdministrator
Set-StrictMode -Version latest
$ErrorActionPreference = "Stop"
$vswhere = "C:\Program ... | asmichi/playground | src/Tools/UpdateAllVisualStudioInstances.ps1 | PowerShell | mit | 2,017 |
# Module manifest for module 'FreeLDAP'
#
# Generated by: Glen Buktenica
#
# Generated on: 25/07/2016
#
@{
# Script module or binary module file associated with this manifest
ModuleToProcess = ''
# Version number of this module.
ModuleVersion = '1.0.0.0'
# ID used to uniquely identify this module
GUID... | gbuktenica/FreeLDAP | FreeLDAP.psd1 | PowerShell | mit | 3,487 |
# Copyright (c) 2016 Microsoft Corporation. All Rights Reserved.
# Licensed under the MIT License (MIT)
<#
.SYNOPSIS
This downloads catalog items from a folder to disk
.DESCRIPTION
This downloads catalog items from a folder server to disk.
Currently the script only downloads reports, datasources, datasets... | sqlchicken/ReportingServicesTools | Functions/CatalogItems/Out-RsFolderContent.ps1 | PowerShell | mit | 3,221 |
@{
RootModule = 'ROIDLab.schema.psm1';
ModuleVersion = '1.0';
GUID = '96571b24-6b3e-4bf2-bdc5-677ad1bd3fe8';
Author = 'Iain Brighton';
CompanyName = 'Virtual Engine';
Copyright = '(c) 2017 Virtual Engine Limited. All rights reserved.';
Description = 'Virtual Engine RES ONE Identity Di... | VirtualEngine/RESONEServiceStore | DSCResources/ROIDLab/ROIDLab.psd1 | PowerShell | mit | 371 |
Function Get-TimedScreenshot {
<#
.SYNOPSIS
Get-TimedScreenshot
Author: Chris Campbell (@obscuresec)
License: BSD 3-Clause
.DESCRIPTION
A function that takes screenshots and saves them to a folder.
.PARAMETER $Path
Specifies the folder path.
.PARAMETER $Interval
Specifi... | jclosure/PSToolBox | TakeTimedSnapshot.ps1 | PowerShell | mit | 3,057 |
function Set-PowerCLITitle($vcenter) {
$productName = "PowerCLI"
$version = (get-module -Name VMware.VimAutomation.Core).Version
if($vcenter) { $windowTitle = "[{1}] - $productName {0}" -f $version, $vcenter }
else { $windowTitle = "$productName {0}" -f $version }
$host.ui.RawUI.WindowTitle = $wind... | abix-/powershell-practical | Aluminium/internal.ps1 | PowerShell | mit | 9,247 |
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/Mod10/LabFiles/PhotoSharingApplication_10_end/packages/Modernizr.2.6.2/Tools/common.ps1 | PowerShell | mit | 13,556 |
function Remove-AzrVirtualMachine
{
<#
.SYNOPSIS
This function is used to remove any Azure VMs as well as any attached disks. By default, this function creates a job
due to the time it takes to remove an Azure VM.
.EXAMPLE
PS> Get-AzureRmVm -Name 'BAPP07GEN22' | Remove-AzrVirtualMachine -Credential (Get-Cre... | alexverboon/posh | Azure/Utilities/Remove-AzrVirtualMachine.ps1 | PowerShell | mit | 5,176 |
#
# 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... | gregerts/debian-qpid-cpp | src/tests/run_acl_tests.ps1 | PowerShell | apache-2.0 | 3,503 |
<#
.SYNOPSIS
Create a StatusCake PageSpeed Test
.DESCRIPTION
Creates a new StatusCake PageSpeed Test using the supplied parameters.
.PARAMETER APICredential
Credentials to access StatusCake API
.PARAMETER Name
Name for PageSpeed test
.PARAMETER WebsiteURL
URL that should be checked
.PARAMETER Locat... | Oliver-Lii/statuscake-helpers | StatusCake-Helpers/Public/PageSpeed/New-StatusCakeHelperPageSpeedTest.ps1 | PowerShell | apache-2.0 | 4,527 |
<#
.Synopsis
Builds a release of Node.js Tools for Visual Studio from this branch.
.Description
This script is used to build a set of installers for Node.js Tools for
Visual Studio based on the code in this branch.
The assembly and file versions are generated automatically and provided by
modi... | mjbvz/nodejstools | Nodejs/Setup/BuildRelease.ps1 | PowerShell | apache-2.0 | 26,517 |
& (Join-Path -Path $PSScriptRoot -ChildPath 'RivetTest\Import-RivetTest.ps1' -Resolve)
function Start-Test
{
Start-RivetTest
}
function Stop-Test
{
Stop-RivetTest
}
function Test-ShouldCreateRealColumn
{
@'
function Push-Migration
{
Add-Table -Name 'Foobar' -Column {
Real... | RivetDB/Rivet | Test/Test-AddRealColumn.ps1 | PowerShell | apache-2.0 | 1,544 |
$ErrorActionPreference = 'Stop';
$packageName = 'collectdwin'
$softwareName = 'CollectdWinService'
$installerType = 'MSI'
$silentArgs = '/qn /norestart'
$validExitCodes = @(0, 3010, 1605, 1614, 1641)
if ($installerType -ne 'MSI') {
$validExitCodes = @(0)
}
$uninstalled = $false
$local_key = 'HKCU:\Software... | kkzinger/chocolatey-packages-new | manual/collectdwin/tools/chocolateyuninstall.ps1 | PowerShell | apache-2.0 | 1,615 |
## Import the common AD functions
$adCommonFunctions = Join-Path `
-Path (Split-Path -Path $PSScriptRoot -Parent) `
-ChildPath '\MSFT_xADCommon\MSFT_xADCommon.psm1'
Import-Module -Name $adCommonFunctions
# Localized messages
data localizedData
{
# culture="en-US"
ConvertFrom-StringData @'
... | puppetlabs/puppetlabs-dsc | lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomain/MSFT_xADDomain.psm1 | PowerShell | apache-2.0 | 15,147 |
$logpath = "C:\inetpub\logs\"
$daystokeep = 30
get-childitem -LiteralPath $logpath -Include *.log -Recurse |
where-object { -not $_.PSIsContainer } |
where-object { $_.LastWriteTime -lt ((get-date).AddDays((-1 * $daystokeep))) } |
remove-item
| amochumber/stuffz | scripts/powershell/cleanup_IIS_logs.ps1 | PowerShell | mit | 250 |
param(
[string]$testMachineGroup,
[string]$dropLocation,
[string]$sourcefilters,
[string]$testFilterCriteria,
[string]$testRunTitle,
[string]$platform,
[string]$configuration,
[string]$runSettingsFile,
[string]$codeCoverageEnabled,
[string]$overrideRunParams,
[string]$testCon... | alexmullans/vsts-tasks | Tasks/RunDistributedTests/RunDistributedTests.ps1 | PowerShell | mit | 14,222 |
$ErrorActionPreference = 'Stop';
$packageArgs = @{
packageName = $env:ChocolateyPackageName
softwareName = 'WiX Toolset*'
fileType = 'exe'
silentArgs = '/uninstall /quiet'
validExitCodes= @(@(0))
}
$uninstalled = $false
[array]$key = Get-UninstallRegistryKey @packageArgs | Where-Object { $_.Bun... | jberezanski/chocolatey-coreteampackages | automatic/wixtoolset/tools/chocolateyUninstall.ps1 | PowerShell | apache-2.0 | 925 |
function Exec-CommandCore([string]$command, [string]$commandArgs, [switch]$useConsole = $true) {
$startInfo = New-Object System.Diagnostics.ProcessStartInfo
$startInfo.FileName = $command
$startInfo.Arguments = $commandArgs
$startInfo.UseShellExecute = $false
$startInfo.WorkingDirectory = Get-Location
if ... | DustinCampbell/roslyn | src/Setup/Installer/tools/utils.ps1 | PowerShell | apache-2.0 | 5,185 |
[Reflection.Assembly]::LoadWithPartialName("System.Web")
$client = new-object System.Net.WebClient
$shell_app = new-object -com shell.application
$scriptpath = $MyInvocation.MyCommand.Path
#
# Requirements
# Install and setup Java
# Install open ssl : https://code.google.com/p/openssl-for-windows/downloads/list
# Upd... | iambmelt/azure-activedirectory-library-for-android | brokerRedirectPrint.ps1 | PowerShell | apache-2.0 | 2,277 |
Describe "Get-Variable DRT Unit Tests" -Tags "CI" {
It "Get-Variable of not existing variable Name should throw ItemNotFoundException"{
try {
Get-Variable -EA Stop -Name nonexistingVariableName
Throw "Execution OK"
}
catch {
$_.FullyQualifiedErrorId | Should be "VariableNotFound,Microsoft.Po... | KarolKaczmarek/PowerShell | test/powershell/Modules/Microsoft.PowerShell.Utility/Get-Variable.Tests.ps1 | PowerShell | mit | 6,115 |
configuration vFile {
<#
.SYNOPSIS
Downloads files from file or web servers based on the URI.
.NOTES
Requires the xRemoteFile resource from the xPSDesiredStateConfiguration module.
#>
param (
## The key used for the resource to avoid only being able to downloa... | VirtualEngine/VirtualEngineLab | DSCResources/vFile/vFile.schema.psm1 | PowerShell | mit | 2,743 |
function Get-GeoIP([Parameter(Mandatory=$true)][string]$IP)
{
<#
.SYNOPSIS
Get-GeoIP returns the country of an IP address
.DESCRIPTION
Each IP block is assigned to a specific organization. This function queries the webservicex.net API to retrieve the last known country for a specific... | dendory/scripts | Get-GeoIP.psm1 | PowerShell | mit | 812 |
@{
# Version number of this module.
moduleVersion = '0.0.1'
# ID used to uniquely identify this module
GUID = 'f5a5f169-7026-4053-932a-19a7c37b1ca5'
# Author of this module
Author = 'DSC Community'
# Company or vendor of this module
CompanyName = 'DSC... | PowerShell/xHyper-V | source/xHyper-V.psd1 | PowerShell | mit | 2,508 |
$dir = Split-Path $MyInvocation.MyCommand.Path -Parent
function ShouldBuild {
[CmdletBinding()]
param(
[string]$SourceRoot,
[string]$DestinationPath
)
return $true
}
function CheckoutFile {
[CmdletBinding()]
param(
[Parameter(Mandatory=$true, HelpMessage="The file to check out for edit.")]
[string]$Ite... | vc3/ExoWeb | ExoWeb/Client/tools/powershell/lib/SourceControl.ps1 | PowerShell | mit | 547 |
<#
.SYNOPSIS
Mandatory Reboot Custom Detection Method
.DESCRIPTION
This script will read the last time a system rebooted from the event viewer logs. It then calculates the number of days since that time. If the number of days equals or exceeds the RebootThreshold variable, the script will exit with a retur... | MicksITBlogs/PowerShell | MandatoryRebootCustomDetection.ps1 | PowerShell | mit | 3,434 |
function Remove-JiraIssueAttachment {
# .ExternalHelp ..\JiraPS-help.xml
[CmdletBinding( ConfirmImpact = 'High', SupportsShouldProcess, DefaultParameterSetName = 'byId' )]
param(
[Parameter( Position = 0, Mandatory, ValueFromPipelineByPropertyName, ParameterSetName = 'byId' )]
[ValidateNotNu... | AtlassianPS/JiraPS | JiraPS/Public/Remove-JiraIssueAttachment.ps1 | PowerShell | mit | 5,990 |
#Loading external functions file
.\functions.ps1
#SetUp Local Variables
Framework "4.0"
$base_dir = resolve-path .
$package_dir = "$base_dir\..\package\"
$src_folder = "$base_dir\..\src"
$web_package_location = "$src_folder\GiveCRM.Web\obj\release\Package\PackageTmp"
task default -depends Package
task C... | GiveCampUK/GiveCRM | build/package.ps1 | PowerShell | mit | 491 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
Describe 'Basic engine APIs' -Tags "CI" {
Context 'powershell::Create' {
It 'can create default instance' {
[powershell]::Create() | Should -Not -BeNullOrEmpty
}
It 'can create instance... | Cowmonaut/PowerShell | test/powershell/engine/Api/BasicEngine.Tests.ps1 | PowerShell | mit | 3,673 |
[CmdletBinding()]
Param (
[Parameter(Mandatory=$True)]
[string] $ArtifactPath,
[Parameter(Mandatory=$True)]
[string] $APIViewUri,
[Parameter(Mandatory=$True)]
[string] $APIKey,
[Parameter(Mandatory=$True)]
[string] $APILabel,
[string] $PackageName,
[string] $ConfigFileDir = ""
)
# Submit API revie... | tg-msft/azure-sdk-tools | eng/common/scripts/Create-APIReview.ps1 | PowerShell | mit | 5,007 |
#region
# Code from Ben Armstrong https://blogs.msdn.microsoft.com/virtual_pc_guy/2010/09/23/a-self-elevating-powershell-script/
# Get the ID and security principal of the current user account
$myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent()
$myWindowsPrincipal=new-object System.Security.Pr... | MS-MatthewWalker/LabBuilderLabs | SetupLab.ps1 | PowerShell | mit | 15,087 |
function Get-PScriboParagraphRun
{
<#
.SYNOPSIS
Converts a string of text into multiple strings to create Word
paragraph runs for PageNumber and TotalPages field replacements.
#>
[CmdletBinding()]
param
(
## Paragraph text to convert into Word paragraph runs for field replacement... | iainbrighton/PScribo | Src/Private/Get-PScriboParagraphRun.ps1 | PowerShell | mit | 3,948 |
configuration DscPullServer
{
Import-DscResource -ModuleName PSDesiredStateConfiguration
Import-DscResource -ModuleName xPSDesiredStateConfiguration
$DscStudio = $ConfigurationData.NonNodeData.DscStudio
node $AllNodes.NodeName
{
WindowsFeature DSCServiceFeature
{
Ensure... | BrianFarnhill/DSCStudio | modules/DscStudioExampleTemplates/DSCTemplates/DscPullServer.ps1 | PowerShell | mit | 896 |
#requires -version 4
function Edit-PuptrConfig {
<#
.SYNOPSIS
Edit a UcsPuptr configuration file
.DESCRIPTION
This function will use Invoke-Item to open a configuration file
in the default .ps1 editor
.PARAMETER Name
Name of the configuration
Can g... | FooBartn/Ucs-Puptr | Ucs-Puptr/Functions/Edit-PuptrConfig.ps1 | PowerShell | apache-2.0 | 1,560 |
# powershell v2 compatibility
$psVer = $PSVersionTable.PSVersion.Major
if ($psver -ge 3) {
function Get-ChildItemDir {Get-ChildItem -Directory $args}
} else {
function Get-ChildItemDir {Get-ChildItem $args}
}
$packageName = '{{PackageName}}'
$typName = 'IOProtocolExt'
$packageSearch = 'KeePass Password Safe'
$url ... | dtgm/chocolatey-packages | automatic/keepass-plugin-ioprotocolext/tools/chocolateyInstall.ps1 | PowerShell | apache-2.0 | 2,858 |
<#
These tests can not be run in AppVeyor as this will cause the network
adapter to disconnect and terminate the build.
They can only be run if two teaming compatible network adapters are
present on the test machine and the adapters can be safely used in
a team during the test process.
Loopbac... | PowerShell/xNetworking | tests/Integration/DSC_WaitForNetworkTeam.Integration.Tests.ps1 | PowerShell | mit | 4,116 |
@{
# Script module or binary module file associated with this manifest.
ModuleToProcess = 'CodeExecution.psm1'
# Version number of this module.
ModuleVersion = '1.0.0.0'
# ID used to uniquely identify this module
GUID = 'a8a6780b-e694-4aa4-b28d-646afa66733c'
# Author of this module
Author = 'Matthew Graeber'
# Co... | nullbind/PowerSploit | CodeExecution/CodeExecution.psd1 | PowerShell | bsd-3-clause | 2,730 |
<#
.NOTES
https://github.com/equelin/vmware-powercli-workflows
#>
[cmdletbinding()]
param(
[string[]]$Task = 'default'
)
if (!(Get-Module -Name Pester -ListAvailable)) { Install-Module -Name Pester -Scope CurrentUser }
if (!(Get-Module -Name psake -ListAvailable)) { Install-Module -Name psake -Scope CurrentUser }... | equelin/vmware-powercli-workflows | Scripts/TagsAutomatedMgmt/build.ps1 | PowerShell | mit | 420 |
param($installPath, $toolsPath, $package, $project)
$project.DTE.ItemOperations.Navigate('https://github.com/bitstadium/HockeySDK-Windows/blob/preseason/README.md')
| nguyendotuong/sse | packages/HockeySDK.WPF.4.1.6/tools/Init.ps1 | PowerShell | mit | 166 |
########################################################################
#
# Linux on Hyper-V and Azure Test Code, ver. 1.0.0
# Copyright (c) Microsoft Corporation
#
# All rights reserved.
# Licensed under the Apache License, Version 2.0 (the ""License"");
# you may not use this file except in compliance with th... | chvalean/lis-test | WS2012R2/lisa/setupscripts/STOR_VSS_BackupRestore_ISCSI.ps1 | PowerShell | apache-2.0 | 5,728 |
########################################
# Private module variables.
########################################
# TODO: It would be better if the Out-Default function resolved the underlying Out-Default
# command in the begin block. This would allow for supporting other modules that override
# Out-Default.
$script:outDef... | crimdon/SQLToolkit | SqlBackup/ps_modules/VstsTaskSdk/OutFunctions.ps1 | PowerShell | mit | 3,341 |
@{
ModuleVersion = '1.0.1';
GUID = 'b448139d-59e3-4906-a8cb-edec73eb278b';
Author = 'Iain Brighton';
CompanyName = 'Virtual Engine';
Copyright = '(c) 2016 Virtual Engine Limited. All rights reserved.';
Description = 'The PrinterManagement DSC resources can automate the creation of local pr... | VirtualEngine/PrinterManagement | PrinterManagement.psd1 | PowerShell | mit | 529 |
function Set-UnattendedYastPackage
{
param
(
[string[]]$Package
)
$packagesNode = $script:un.SelectSingleNode('/un:profile/un:software/un:patterns', $script:nsm)
foreach ($p in $Package)
{
$packageNode = $script:un.CreateElement('pattern', $script:nsm.LookupNamespace('un'))
... | AutomatedLab/AutomatedLab | AutomatedLabUnattended/Private/Suse/Set-UnattendedYastPackage.ps1 | PowerShell | mit | 418 |
#
# DEBUGGING:
# 1. clone the azure-pipelines-task-lib to the same level as cols-agent-tasks
# Import-Module ..\..\..\azure-pipelines-task-lib\powershell\VstsTaskSdk -ArgumentList @{ NonInteractive = $true } -Verbose:$true
# 3. Invoke this script
#
param(
[string]$pat = (Read-Host -Prompt "PAT")
)
$vstsAcc = "... | colindembovsky/cols-agent-tasks | Tasks/DacPacReport/TestScript.ps1 | PowerShell | mit | 1,146 |
<#
.EXAMPLE
This example shows how to set the maximum memory
configuration option with the automatic configuration.
In the event this is applied to a Failover Cluster Instance (FCI), the
ProcessOnlyOnActiveNode property will tell the Test-TargetResource function
to evaluate if any changes are neede... | PowerShell/xSQLServer | Examples/Resources/SqlServerMemory/2-SetMaxMemoryToAuto.ps1 | PowerShell | mit | 1,024 |
Param()
# import class and function
$ScriptPath = $PSScriptRoot
$DlibDotNetRoot = Split-Path $ScriptPath -Parent
$ScriptPath = Join-Path $DlibDotNetRoot "nuget" | `
Join-Path -ChildPath "BuildUtils.ps1"
import-module $ScriptPath -function *
$OperatingSystem="ios"
# Store current directory
$Current = Ge... | takuya-takeuchi/DlibDotNet | nuget/BuildIOS.ps1 | PowerShell | mit | 1,477 |
#requires -Version 2
function Test-Ping
{
[CmdletBinding()]
Param(
[Parameter(Mandatory = $True,Position = 0)]
[string[]]$ComputerName
)
Begin{}
Process{
$Connectivity = @()
$Connectivity += Test-Connection -ComputerName $Compute... | psrdrgz/PowerShell | ARTools/Public/Test-Ping.ps1 | PowerShell | mit | 683 |
Function Get-SFSpbmPolicyName{
<#
.Synopsis
Creates a string based on values related to a SolidFire volume that can be used to generate
VMware Storage Policy Based Management policies.
.Description
Creates a string name based on values related to a SolidFire volume.
Pulls the QoS profile for... | solidfire/PowerShell | SPBM/SolidFire-SPBM.psm1 | PowerShell | mit | 19,556 |
BeforeAll {
$msys2Dir = "C:\msys64\usr\bin"
$originalPath = $env:PATH
}
Describe "MSYS2 packages" {
BeforeEach {
$env:PATH = "$msys2Dir;$env:PATH"
}
It "msys2Dir exists" {
$msys2Dir | Should -Exist
}
$TestCases = @(
@{ ToolName = "bash.exe" }
)
if ((Test-I... | mattgwagner/New-Machine | .github-actions/images/win/scripts/Tests/MSYS2.Tests.ps1 | PowerShell | mit | 1,944 |
<#
[Environment]::SetEnvironmentVariable("ElasticUri", "http://localhost:9200", "User")
$env:ElasticUri = "http://localhost:9200"
Indices API declarations
Index operations:
https://msdn.microsoft.com/en-us/library/dn798918.aspx
https://netfxharmonics.com/2015/11/learningelasticps
#>
$CURL="Invoke-RestMethod"
if (!(G... | banban/OhMySearch | BackEnd/ElasticSearch.Helper.psm1 | PowerShell | mit | 5,804 |
$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... | PowerShell/xNetworking | source/DSCResources/DSC_NetBios/DSC_NetBios.psm1 | PowerShell | mit | 7,376 |
@{
RootModule = 'vAppV5.schema.psm1';
ModuleVersion = '1.0';
GUID = '78e97b82-fbf1-4874-88b5-26aae104c9b7';
Author = 'Iain Brighton';
CompanyName = 'Virtual Engine';
Copyright = '(c) 2016 Virtual Engine Limited. All rights reserved.';
Description = 'Virtual Engine App-V 5.1 DSC composite re... | VirtualEngine/VirtualEngineLab | DSCResources/vAppV5/vAppV5.psd1 | PowerShell | mit | 334 |
function Add-ObjectDetail
{
<#
.SYNOPSIS
Decorate an object with
- A TypeName
- New properties
- Default parameters
.DESCRIPTION
Helper function to decorate an object with
- A TypeName
- New properties
- Default paramet... | janegilring/PSVersion | Functions/Private/Add-ObjectDetail.ps1 | PowerShell | mit | 5,348 |
# run notepad
param($path);
$BIN_PATH = split-path -parent $MyInvocation.MyCommand.Definition;
$HELPERS_PATH = "$BIN_PATH\..\helpers";
$notepadPath = (& "$HELPERS_PATH\get-config.ps1" "npp");
start-process $notepadPath -argumentList $path;
| hezymal/quick-ps | bin/qnote.ps1 | PowerShell | apache-2.0 | 243 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.