full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/PowerShellGallery/PoshRegistry/0.0.2/Public/Remove-RegValue.ps1
Remove-RegValue.ps1
function Remove-RegValue { <# .SYNOPSIS Deletes the specified registry value from local or remote computers. .DESCRIPTION Use Remove-RegValue to delete the specified registry value from local or remote computers. .PARAMETER ComputerName An array of computer names. The def...
PowerShellCorpus/PowerShellGallery/Forge.Module/0.4.1/_Context.ps1
_Context.ps1
$Script:SourceRoot = Join-Path $PSScriptRoot Templates
PowerShellCorpus/PowerShellGallery/Forge.Module/0.4.1/New-ForgeModuleFunction.ps1
New-ForgeModuleFunction.ps1
<# Copyright 2016 Dominique Broeglin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softw...
PowerShellCorpus/PowerShellGallery/Forge.Module/0.4.1/New-ForgeModule.ps1
New-ForgeModule.ps1
<# Copyright 2016 Dominique Broeglin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softw...
PowerShellCorpus/PowerShellGallery/Forge.Module/0.4.1/Templates/Build.InvokeBuild/build.settings.ps1
build.settings.ps1
############################################################################### # Customize these properties and tasks for your module. ############################################################################### # ----------------------- Basic properties -------------------------------- # The name of your module ...
PowerShellCorpus/PowerShellGallery/Forge.Module/0.4.1/Templates/Build.InvokeBuild/build.ps1
build.ps1
#Requires -Modules InvokeBuild Import-Module InvokeBuild # Builds the module by invoking Invoke-Build on the .build.ps1 script. Invoke-Build -File $PSScriptRoot\.build.ps1 -Task Build
PowerShellCorpus/PowerShellGallery/Forge.Module/0.4.1/Templates/Build.PSake/build.settings.ps1
build.settings.ps1
############################################################################### # Customize these properties and tasks for your module. ############################################################################### Properties { # ----------------------- Basic properties -------------------------------- # The...
PowerShellCorpus/PowerShellGallery/Forge.Module/0.4.1/Templates/Build.PSake/build.psake.ps1
build.psake.ps1
#Requires -Modules psake ############################################################################## # DO NOT MODIFY THIS FILE! Modify build.settings.ps1 instead. ############################################################################## ########################################################################...
PowerShellCorpus/PowerShellGallery/Forge.Module/0.4.1/Templates/Build.PSake/build.ps1
build.ps1
#Requires -Modules psake # Builds the module by invoking psake on the build.psake.ps1 script. Invoke-PSake $PSScriptRoot\build.psake.ps1 -taskList Build
PowerShellCorpus/PowerShellGallery/cMsmq/1.0.3/SourceFiles/GenerateCMsmqDll.ps1
GenerateCMsmqDll.ps1
<# Compiles the cMsmq.cs source file into the cMsmq.dll library. It implements the MQGetQueueSecurity function to retrieve information from the access control security descriptors of MSMQ queues. #> $TypeDefinition = Get-Content -Path "$PSScriptRoot\cMsmq.cs" | Out-String Add-Type -TypeDefinition $TypeDefiniti...
PowerShellCorpus/PowerShellGallery/cMsmq/1.0.3/Examples/Sample_cMsmq.ps1
Sample_cMsmq.ps1
configuration Sample_cMsmq { Import-DscResource -ModuleName PSDesiredStateConfiguration Import-DscResource -ModuleName cMsmq # Ensure the Message Queueing is installed. WindowsFeature MSMQ { Ensure = 'Present' Name = 'MSMQ' } # Ensure the MSMQ service is runni...
PowerShellCorpus/PowerShellGallery/cMsmq/1.0.3/ResourceDesignerScripts/GenerateCMsmqQueueSchema.ps1
GenerateCMsmqQueueSchema.ps1
#requires -Version 4.0 -Modules xDSCResourceDesigner $ModuleName = 'cMsmq' $ResourceName = 'cMsmqQueue' $DscResourceProperties = @( (New-xDscResourceProperty -Type String -Attribute Write -Name Ensure -ValidateSet 'Absent', 'Present' -Description "Indicates whether the queue exists.") (New-xDscResou...
PowerShellCorpus/PowerShellGallery/cMsmq/1.0.3/ResourceDesignerScripts/GenerateCMsmqQueuePermissionEntrySchema.ps1
GenerateCMsmqQueuePermissionEntrySchema.ps1
#requires -Version 4.0 -Modules xDSCResourceDesigner $ModuleName = 'cMsmq' $ResourceName = 'cMsmqQueuePermissionEntry' $DscResourceProperties = @( (New-xDscResourceProperty -Type String -Attribute Write -Name Ensure -ValidateSet 'Absent', 'Present' -Description "Indicates whether the permission entry exi...
PowerShellCorpus/PowerShellGallery/cMsmq/1.0.3/Tests/ResourceDesignerTests.ps1
ResourceDesignerTests.ps1
#requires -Version 4.0 -Modules xDSCResourceDesigner Split-Path -Path $PSScriptRoot -Parent | Join-Path -ChildPath 'DSCResources' | Get-ChildItem -Directory | Test-xDscResource -Name {$_.FullName} -Verbose
PowerShellCorpus/PowerShellGallery/poshdog/0.0.5/Private/Get-DDKey.ps1
Get-DDKey.ps1
function Get-DDKey { <# .SYNOPSIS Search for API or App keys in different places .DESCRIPTION Get-DDKey will search for keys in different places: - in a standard JSON file within the user directory by default - in environment variables - in a specific JSON fi...
PowerShellCorpus/PowerShellGallery/poshdog/0.0.5/Private/New-DDQuery.ps1
New-DDQuery.ps1
function New-DDQuery { <# .SYNOPSIS Make a request to the API with the parameters entered by the user .DESCRIPTION .PARAMETER APIVersion Version of the API, defaults to v1 .PARAMETER EndPoint The API endpoint, as defined on http://docs.datadoghq.com/api/?lang=console, ...
PowerShellCorpus/PowerShellGallery/poshdog/0.0.5/Private/Compare-HashTable.ps1
Compare-HashTable.ps1
# Inspired from https://github.com/stuartleeks/PesterMatchHashtable function Compare-Hashtable { [CmdletBinding()] param ( [Parameter( Position=0, Mandatory=$True )] [hashtable]$value, [Parameter( Position=1, Mandatory=$True ...
PowerShellCorpus/PowerShellGallery/poshdog/0.0.5/Public/Suspend-DDMonitor.ps1
Suspend-DDMonitor.ps1
function Suspend-DDMonitor { <# .SYNOPSIS Mutes Datadog monitors. Either all of them with -All or a specific one with -MonitorID .DESCRIPTION .EXAMPLE # Mute all monitors Suspend-DDMonitor -All .EXAMPLE # Mute a single monitor Suspend-DD...
PowerShellCorpus/PowerShellGallery/poshdog/0.0.5/Public/Get-DDTag.ps1
Get-DDTag.ps1
function Get-DDTag { <# .SYNOPSIS Retrieves a mapping of tags to hosts for your whole infrastructure when called with -All, or the list of tags that apply to a given host when called with -Hostname. .DESCRIPTION .PARAMETER All Returns a mapping of tags to hosts for your whole infrastructur...
PowerShellCorpus/PowerShellGallery/poshdog/0.0.5/Public/Suspend-DDHost.ps1
Suspend-DDHost.ps1
function Suspend-DDHost { <# .SYNOPSIS Mutes Datadog hosts. .PARAMETER Hostname A hostname as shown on Datadog's Infrastructure List .PARAMETER Message A message to associate with the muting of this host .PARAMETER EndDate A Datetime object representing when the mute s...
PowerShellCorpus/PowerShellGallery/poshdog/0.0.5/Public/New-DDSearch.ps1
New-DDSearch.ps1
function New-DDSearch { <# .SYNOPSIS Search for entities from the last 24 hours in Datadog. .DESCRIPTION .PARAMETER Query The query string. .PARAMETER Facet Limits results to an object type, chosen from: hosts, metrics. .EXAMPLE # Search for metric or ho...
PowerShellCorpus/PowerShellGallery/poshdog/0.0.5/Public/Get-DDMonitor.ps1
Get-DDMonitor.ps1
function Get-DDMonitor { <# .SYNOPSIS Retrieves a list of all existing Datadog monitors with -All or a specific one with -MonitorID. .DESCRIPTION .PARAMETER All Retrieves all monitors. Incompatible with -MonitorID. .PARAMETER MonitorId A Datadog Monitor ID. Incompatible with -...
PowerShellCorpus/PowerShellGallery/poshdog/0.0.5/Public/Remove-DDMonitor.ps1
Remove-DDMonitor.ps1
function Remove-DDMonitor { <# .SYNOPSIS Remove a Datadog monitor. .DESCRIPTION .PARAMETER MonitorObject A Datadog Monitor object. Can be created from scratch or passed from the pipeline .EXAMPLE # Enter confirmation when asked Remove-DDMonitor -Monitor...
PowerShellCorpus/PowerShellGallery/poshdog/0.0.5/Public/Resume-DDHost.ps1
Resume-DDHost.ps1
function Resume-DDHost { <# .SYNOPSIS Unmutes Datadog hosts. .DESCRIPTION .PARAMETER Hostname A hostname as shown on Datadog's Infrastructure List .EXAMPLE # Unmute a host called myhost Resume-DDHost -Hostname myhost .LINK http://doc...
PowerShellCorpus/PowerShellGallery/poshdog/0.0.5/Public/Resume-DDMonitor.ps1
Resume-DDMonitor.ps1
function Resume-DDMonitor { <# .SYNOPSIS Unmutes Datadog monitors. Either all of them with -All or a specific one with -MonitorID .DESCRIPTION .PARAMETER All A switch to resume all monitors. Incompatible with all other parameters. .PARAMETER MonitorID A Datadog ...
PowerShellCorpus/PowerShellGallery/poshdog/0.0.5/Public/Set-DDConfiguration.ps1
Set-DDConfiguration.ps1
function Set-DDConfiguration { <# .SYNOPSIS Creates a configuration file with Datadog keys to be used in subsequent requests .DESCRIPTION .EXAMPLE # Write keys in the standard Env:APPDATA\PoshDog\keys.json file Set-DDConfiguration -DDAPIKey somekey -DDAppKey somekey ...
PowerShellCorpus/PowerShellGallery/poshdog/0.0.5/Public/New-DDMonitor.ps1
New-DDMonitor.ps1
function New-DDMonitor { <# .SYNOPSIS Create a new Datadog monitor by using parameters or by providing a custom object. .DESCRIPTION .PARAMETER MonitorObject A Datadog Monitor object. Can be created from scratch or retrieved with Get-DDMonitor, edited and fed to New-DDMonitor. If i...
PowerShellCorpus/PowerShellGallery/poshdog/0.0.5/Public/Add-DDTag.ps1
Add-DDTag.ps1
function Add-DDTag { <# .SYNOPSIS Add tags to a host. .DESCRIPTION .PARAMETER Hostname A hostname as shown on Datadog's Infrastructure List page. .Parameter Tags String or array of strings representing the tags to apply to the host. .PARAMETER Source Specify a sou...
PowerShellCorpus/PowerShellGallery/poshdog/0.0.5/Public/Edit-DDMonitor.ps1
Edit-DDMonitor.ps1
function Edit-DDMonitor { <# .SYNOPSIS Edit a Datadog monitor .DESCRIPTION .PARAMETER MonitorObject # A Datadog Monitor object. Can be created from scratch or retrieved with Get-DDMonitor, edited and fed to Edit-DDMonitor. If it's the later, the commandlet will make sure th...
PowerShellCorpus/PowerShellGallery/DebugPx/1.0.3.14/functions/Disable-EnterDebuggerCommand.ps1
Disable-EnterDebuggerCommand.ps1
<############################################################################# The DebugPx module provides a set of commands that make it easier to debug PowerShell scripts, functions and modules. These commands leverage the native debugging capabilities in PowerShell (the callstack, breakpoints, error output and t...
PowerShellCorpus/PowerShellGallery/DebugPx/1.0.3.14/functions/Enable-EnterDebuggerCommand.ps1
Enable-EnterDebuggerCommand.ps1
<############################################################################# The DebugPx module provides a set of commands that make it easier to debug PowerShell scripts, functions and modules. These commands leverage the native debugging capabilities in PowerShell (the callstack, breakpoints, error output and t...
PowerShellCorpus/PowerShellGallery/DebugPx/1.0.3.14/functions/Get-CommandDebugMode.ps1
Get-CommandDebugMode.ps1
<############################################################################# The DebugPx module provides a set of commands that make it easier to debug PowerShell scripts, functions and modules. These commands leverage the native debugging capabilities in PowerShell (the callstack, breakpoints, error output and t...
PowerShellCorpus/PowerShellGallery/DebugPx/1.0.3.14/functions/Set-CommandDebugMode.ps1
Set-CommandDebugMode.ps1
<############################################################################# The DebugPx module provides a set of commands that make it easier to debug PowerShell scripts, functions and modules. These commands leverage the native debugging capabilities in PowerShell (the callstack, breakpoints, error output and t...
PowerShellCorpus/PowerShellGallery/DebugPx/1.0.3.14/scripts/Export-BinaryModule.ps1
Export-BinaryModule.ps1
<############################################################################# The DebugPx module provides a set of commands that make it easier to debug PowerShell scripts, functions and modules. These commands leverage the native debugging capabilities in PowerShell (the callstack, breakpoints, error output and t...
PowerShellCorpus/PowerShellGallery/RyanAirPS/1.0/Get-RyanAirSchedules.ps1
Get-RyanAirSchedules.ps1
<# .SYNOPSIS This commandlet queries ryan air api for rountrip available flights .DESCRIPTION This commandlet queries ryan air api for available flights during specific dates .PARAMETER Origin The IATA code of origin airport .PARAMETER Destination The IATA...
PowerShellCorpus/PowerShellGallery/RyanAirPS/1.0/Get-RyanAirCommon.ps1
Get-RyanAirCommon.ps1
<# .SYNOPSIS This commandlet queries ryan air api for countries, cities and airports .DESCRIPTION This commandlet queries ryan air api for countries, cities and airports .PARAMETER Type One of the Countries, Cities or Airports .EXAMPLE Get-RyanAirCommon -Ty...
PowerShellCorpus/PowerShellGallery/RyanAirPS/1.0/Get-RyanAirFlights.ps1
Get-RyanAirFlights.ps1
<# .SYNOPSIS This commandlet queries ryan air api for rountrip available flights .DESCRIPTION This commandlet queries ryan air api for available flights during specific dates .PARAMETER Origin The IATA code of origin airport .PARAMETER Destination The IATA...
PowerShellCorpus/PowerShellGallery/PSOD/1.0/Func_New-OneDriveFolder.ps1
Func_New-OneDriveFolder.ps1
################################################################################ # Author : Antony Onipko # Copyright : (c) 2016 Antony Onipko. All rights reserved. ################################################################################ # This work is licensed under the # Creative Commons Attribution...
PowerShellCorpus/PowerShellGallery/PSOD/1.0/Func_Get-OneDriveChildItem.ps1
Func_Get-OneDriveChildItem.ps1
################################################################################ # Author : Antony Onipko # Copyright : (c) 2016 Antony Onipko. All rights reserved. ################################################################################ # This work is licensed under the # Creative Commons Attribution...
PowerShellCorpus/PowerShellGallery/PSOD/1.0/PSOD.helpers.ps1
PSOD.helpers.ps1
################################################################################ # Author : Antony Onipko # Copyright : (c) 2016 Antony Onipko. All rights reserved. ################################################################################ # This work is licensed under the # Creative Commons Attribution...
PowerShellCorpus/PowerShellGallery/PSOD/1.0/Func_Invoke-OneDriveApiCall.ps1
Func_Invoke-OneDriveApiCall.ps1
################################################################################ # Author : Antony Onipko # Copyright : (c) 2016 Antony Onipko. All rights reserved. ################################################################################ # This work is licensed under the # Creative Commons Attribution...
PowerShellCorpus/PowerShellGallery/PSOD/1.0/Func_Get-OneDriveItem.ps1
Func_Get-OneDriveItem.ps1
################################################################################ # Author : Antony Onipko # Copyright : (c) 2016 Antony Onipko. All rights reserved. ################################################################################ # This work is licensed under the # Creative Commons Attribution...
PowerShellCorpus/PowerShellGallery/PSOD/1.0/Func_Remove-OneDriveItem.ps1
Func_Remove-OneDriveItem.ps1
################################################################################ # Author : Antony Onipko # Copyright : (c) 2016 Antony Onipko. All rights reserved. ################################################################################ # This work is licensed under the # Creative Commons Attribution...
PowerShellCorpus/PowerShellGallery/PSOD/1.0/Func_Get-OneDriveContent.ps1
Func_Get-OneDriveContent.ps1
################################################################################ # Author : Antony Onipko # Copyright : (c) 2016 Antony Onipko. All rights reserved. ################################################################################ # This work is licensed under the # Creative Commons Attribution...
PowerShellCorpus/PowerShellGallery/PSOD/1.0/Func_Move-OneDriveItem.ps1
Func_Move-OneDriveItem.ps1
################################################################################ # Author : Antony Onipko # Copyright : (c) 2016 Antony Onipko. All rights reserved. ################################################################################ # This work is licensed under the # Creative Commons Attribution...
PowerShellCorpus/PowerShellGallery/PSOD/1.0/Func_Get-OneDriveAuthToken.ps1
Func_Get-OneDriveAuthToken.ps1
################################################################################ # Author : Antony Onipko # Copyright : (c) 2016 Antony Onipko. All rights reserved. ################################################################################ # This work is licensed under the # Creative Commons Attribution...
PowerShellCorpus/PowerShellGallery/PSOD/1.0/Func_New-OneDriveToken.ps1
Func_New-OneDriveToken.ps1
################################################################################ # Author : Antony Onipko # Copyright : (c) 2016 Antony Onipko. All rights reserved. ################################################################################ # This work is licensed under the # Creative Commons Attribution...
PowerShellCorpus/PowerShellGallery/PSOD/1.0/Func_Set-OneDriveContent.ps1
Func_Set-OneDriveContent.ps1
################################################################################ # Author : Antony Onipko # Copyright : (c) 2016 Antony Onipko. All rights reserved. ################################################################################ # This work is licensed under the # Creative Commons Attribution...
PowerShellCorpus/PowerShellGallery/PSOD/1.0/Func_Copy-OneDriveItem.ps1
Func_Copy-OneDriveItem.ps1
################################################################################ # Author : Antony Onipko # Copyright : (c) 2016 Antony Onipko. All rights reserved. ################################################################################ # This work is licensed under the # Creative Commons Attribution...
PowerShellCorpus/PowerShellGallery/gpowmi/1.0.6.0/build.ps1
build.ps1
#build module script [cmdletbinding()] Param( [string]$ModuleFileName = "GPOWMI.psm1" , [string]$ProjectUrl = "https://bitbucket.org/torgro/gpowmi/overview" , [switch]$Major , [switch]$Minor , [switch]$LoadModule ) cd C:\Users\Tore\Dropbox\SourceTreeRepros\gpowmi -ErrorA...
PowerShellCorpus/PowerShellGallery/gpowmi/1.0.6.0/Functions/Get-GPOWmiFilter.ps1
Get-GPOWmiFilter.ps1
function Get-GPOWmiFilter { <# .Synopsis Gets all Group Policy Filters or by name .DESCRIPTION This cmdlet depends on the GroupPolicy module .EXAMPLE Get-GPOWmiFilter Lists all (if any) WMIFilter configured in Group Policy Management .EXAMPLE Get-GPOWmiFilter -Name HR Get a WMIFilter n...
PowerShellCorpus/PowerShellGallery/gpowmi/1.0.6.0/Functions/Set-GPOWmiFilter.ps1
Set-GPOWmiFilter.ps1
function Set-GPOWmiFilter { <# .Synopsis Links a Group Policy to a WMIFilter .DESCRIPTION This cmdlet depends on the GroupPolicy module. Apply a WMI filter to any Group Policy configured in Active Directory .EXAMPLE Set-GPOWmiFilter -WMIFilterName HR -GroupPolicyName MyGPO Links the WMIfilter nam...
PowerShellCorpus/PowerShellGallery/DSCR_AutoLogon/2.0.1/Example/DSCR_AutoLogon_Example.ps1
DSCR_AutoLogon_Example.ps1
$output = 'C:\MOF' $ConfigurationData = @{ AllNodes = @( @{ NodeName = 'localhost' PsDscAllowPlainTextPassword = $true } ) } Configuration DSCR_AutoLogon_Example { param ( [Parameter(Mandatory)] [PSCredential] $AutoLogonC...
PowerShellCorpus/PowerShellGallery/DSCR_AutoLogon/2.0.1/Utils/LSAUtil.ps1
LSAUtil.ps1
# C# Code to P-invoke LSA functions. # This code is copied from PInvoke.net # http://www.pinvoke.net/default.aspx/advapi32.lsaretrieveprivatedata Add-Type @" using System; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Text; namespace PInvoke.LSAUtil { public class...
PowerShellCorpus/PowerShellGallery/CommonUtilities/1.0/CommonUtilities.prepare.ps1
CommonUtilities.prepare.ps1
<# MIT License Copyright © 2016 by Gee Law Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, di...
PowerShellCorpus/PowerShellGallery/EzPath/0.2/EzPath/Remove-EzPath.ps1
Remove-EzPath.ps1
function Remove-EzPath () { [CmdletBinding()] Param () DynamicParam { $ParameterName = "Name" $RuntimeParameterDictionary = New-Object System.Management.Automation.RuntimeDefinedParameterDictionary $AttributeCollection = New-Object System.Collections.ObjectModel.Collection[System.Attribute] ...
PowerShellCorpus/PowerShellGallery/EzPath/0.2/EzPath/Add-EzPath.ps1
Add-EzPath.ps1
function Add-EzPath () { [CmdletBinding()] Param () DynamicParam { $ParameterName = "Name" $RuntimeParameterDictionary = New-Object System.Management.Automation.RuntimeDefinedParameterDictionary $AttributeCollection = New-Object System.Collections.ObjectModel.Collection[System.Attribute] ...
PowerShellCorpus/PowerShellGallery/EzPath/0.2/EzPath/Import-EzPaths.ps1
Import-EzPaths.ps1
function Import-EzPaths () { [CmdletBinding()] Param ( # JSON File to import [Parameter(Mandatory = $False)] [String] $JsonFile = (Join-Path "$HOME" ".ezpaths.json"), # Clear before importing [Parameter(Mandatory = $False)] [Switch] $Clear ) PROCESS { if (-no...
PowerShellCorpus/PowerShellGallery/EzPath/0.2/EzPath/EzPathData.ps1
EzPathData.ps1
class EzPathData { EzPathData() { $this.OriginalPath = $ENV:Path $this.AvailablePaths = @{} $this.UsedPaths = New-Object System.Collections.ArrayList } [HashTable] $AvailablePaths [System.Collections.ArrayList] $UsedPaths [String] $OriginalPath [String] BuildPath () { $Path = $...
PowerShellCorpus/PowerShellGallery/EzPath/0.2/EzPath/Commands.ps1
Commands.ps1
. "$PSScriptRoot\Import-EzPaths.ps1" . "$PSScriptRoot\Add-EzPath.ps1" . "$PSScriptRoot\Remove-EzPath.ps1" function Reset-EzPaths () { $env:Path = $Script:Data.Reset() Write-Output "PATH reset" } function Get-EzPaths () { $Keys = $Script:Data.AvailablePaths.Keys | Sort-Object foreach ($Key in $K...
PowerShellCorpus/PowerShellGallery/PowerForensics/1.1.1/BinShredDemo/Import-HelloWorldBitmap.ps1
Import-HelloWorldBitmap.ps1
$r = forensicbinshred .\hello_world.bmp .\bitmap.bst $rows = $r.dibHeader.bitmapHeight $r.pixelData.rows[($rows - 1)..0] | % { -join ($_.Pixels | % { if( $_.Pixel[0] ) { ' ' } else { '*' } }) }
PowerShellCorpus/PowerShellGallery/PowerForensics/1.1.1/Tests/PowerForensics.Tests.ps1
PowerForensics.Tests.ps1
# TODO: # Add tests for pipeline input Import-Module -Force $PSScriptRoot\..\PowerForensics.psd1 Describe 'Copy-ForensicFile' { Context 'ByPath ParameterSet' { It 'should work with explicit parameters' { { Copy-ForensicFile -Path C:\Windows\System32\config\SOFTWARE -Destination C:...
PowerShellCorpus/PowerShellGallery/LXCAPSTool/1.1.0/Sample/End_To_End.ps1
End_To_End.ps1
<# End_to_end.ps1 - Example scripts to illustrate how to end to end rollout the new system via PowerShell. - Manage system, firmware update, configuration, os deployment. Lenovo Copyright © Copyright Lenovo 2015. LIMITED AND RESTRICTED RIGHTS NOTICE: If data or software is delivered pursuant a General Services A...
PowerShellCorpus/PowerShellGallery/LXCAPSTool/1.1.0/Sample/OS_Deployment.ps1
OS_Deployment.ps1
<# OS_Deployment.ps1 - Example scripts to illustrate how to deploy os image to target systems. Lenovo Copyright © Copyright Lenovo 2015. LIMITED AND RESTRICTED RIGHTS NOTICE: If data or software is delivered pursuant a General Services Administration “GSA” contract, use, reproduction, or disclosure is subject to ...
PowerShellCorpus/PowerShellGallery/LXCAPSTool/1.1.0/Sample/Monitor_Events.ps1
Monitor_Events.ps1
<# Monitor_Events.ps1 - Example scripts to illustrate how to monitor the events on LXCA server. Lenovo Copyright © Copyright Lenovo 2015. LIMITED AND RESTRICTED RIGHTS NOTICE: If data or software is delivered pursuant a General Services Administration “GSA” contract, use, reproduction, or disclosure is subject to...
PowerShellCorpus/PowerShellGallery/LXCAPSTool/1.1.0/Sample/View_Systems.ps1
View_Systems.ps1
<# View_Systems.ps1 - Example scripts to illustrate how to view the managed systems on lxca server. Lenovo Copyright © Copyright Lenovo 2015. LIMITED AND RESTRICTED RIGHTS NOTICE: If data or software is delivered pursuant a General Services Administration “GSA” contract, use, reproduction, or disclosure is subjec...
PowerShellCorpus/PowerShellGallery/LXCAPSTool/1.1.0/Sample/BulkImport_And_Configuration.ps1
BulkImport_And_Configuration.ps1
<# BulkImport_And_Configuration.ps1 - Example scripts to illustrate how to bulk import multiple systems and configuration. Lenovo Copyright © Copyright Lenovo 2015. LIMITED AND RESTRICTED RIGHTS NOTICE: If data or software is delivered pursuant a General Services Administration “GSA” contract, use, reproduction, ...
PowerShellCorpus/PowerShellGallery/LXCAPSTool/1.1.0/Sample/View_Events.ps1
View_Events.ps1
<# View_Events.ps1 - Example scripts to illustrate how to view the events on LXCA server. Lenovo Copyright © Copyright Lenovo 2015. LIMITED AND RESTRICTED RIGHTS NOTICE: If data or software is delivered pursuant a General Services Administration “GSA” contract, use, reproduction, or disclosure is subject to restr...
PowerShellCorpus/PowerShellGallery/LXCAPSTool/1.1.0/Sample/Manage_Systems.ps1
Manage_Systems.ps1
<# Manage_Systems.ps1 - Example scripts to illustrate how to manage systems on LXCA server. Lenovo Copyright © Copyright Lenovo 2015. LIMITED AND RESTRICTED RIGHTS NOTICE: If data or software is delivered pursuant a General Services Administration “GSA” contract, use, reproduction, or disclosure is subject to res...
PowerShellCorpus/PowerShellGallery/LXCAPSTool/1.1.0/Sample/Config_Systems.ps1
Config_Systems.ps1
<# Config_Systems.ps1 - Example scripts to illustrate how to deploy config pattern to target systems. Lenovo Copyright © Copyright Lenovo 2015. LIMITED AND RESTRICTED RIGHTS NOTICE: If data or software is delivered pursuant a General Services Administration “GSA” contract, use, reproduction, or disclosure is subj...
PowerShellCorpus/PowerShellGallery/LXCAPSTool/1.1.0/Sample/Firmware_Update.ps1
Firmware_Update.ps1
<# Firmware_Update.ps1 - Example scripts to illustrate how to update firmware. Lenovo Copyright © Copyright Lenovo 2015. LIMITED AND RESTRICTED RIGHTS NOTICE: If data or software is delivered pursuant a General Services Administration “GSA” contract, use, reproduction, or disclosure is subject to restrictions set...
PowerShellCorpus/PowerShellGallery/PingMe/1.0/Get-Ping.ps1
Get-Ping.ps1
function Get-Ping { <# .Synopsis Gets things to ping .Description Gets things to ping, and resolves the ping if you use -Resolve. .Example Get-Ping .Example Get-Ping -Resolve .Link Add-Ping .Link Remove-Ping .Link Cl...
PowerShellCorpus/PowerShellGallery/PingMe/1.0/Clear-Ping.ps1
Clear-Ping.ps1
function Clear-Ping { <# .Synopsis Clears the ping cache .Description Clears the ping cache .Example Clear-Ping #> param() $script:PingList = @{} }
PowerShellCorpus/PowerShellGallery/PingMe/1.0/Add-Ping.ps1
Add-Ping.ps1
function Add-Ping { <# .Synopsis Adds a thing to ping .Description Adds a computer, DNS name, or URL to ping .Example # 'Pings' start-automating.com (really, downloads a webpage) Add-Ping start-automating.com .Link Remove-Ping .Link ...
PowerShellCorpus/PowerShellGallery/PingMe/1.0/Watch-Ping.ps1
Watch-Ping.ps1
function Watch-Ping { <# .Synopsis Watches the things to ping .Description Watches the things to ping Green is Good Red is Wrong .Example Watch-Heatmap .Link Add-Ping .Link Remove-Ping .Link Get...
PowerShellCorpus/PowerShellGallery/PingMe/1.0/Remove-Ping.ps1
Remove-Ping.ps1
None
PowerShellCorpus/PowerShellGallery/AzureRM.ContainerRegistry/0.2.0/ResourceManagerStartup.ps1
ResourceManagerStartup.ps1
# ---------------------------------------------------------------------------------- # # 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.apach...
PowerShellCorpus/PowerShellGallery/Parser/1.0.13/Tests/Parser.Test.ps1
Parser.Test.ps1
using module ColoredText using module Parser using module .\Rules.psm1 $text = @' [19/01/16 00:00:00] WARNING : Warning Message [19/01/16 00:00:00] ERROR : Error Message [19/01/16 00:00:00] INFO : Info Message '@ $global:calback = { param ( [Parser.Node]$node, [Object]$writer ...
PowerShellCorpus/PowerShellGallery/SSRS/1.3.0/Normalize-SSRSFolder.ps1
Normalize-SSRSFolder.ps1
function Normalize-SSRSFolder ( [string]$Folder ) { $script:ErrorActionPreference = 'Stop' if (-not $Folder.StartsWith('/')) { $Folder = '/' + $Folder } if($Folder.EndsWith('/')) { $Folder = $Folder.Substring(0, $Folder.Length -1) } return $Folder }
PowerShellCorpus/PowerShellGallery/SSRS/1.3.0/Publish-SSRSSolution.ps1
Publish-SSRSSolution.ps1
function Publish-SSRSSolution{ #requires -version 2.0 [CmdletBinding()] # Path is the full path to the solution file, including the file name. # i.e. D:\dev\Reports\Reports.sln param ( [parameter(Mandatory=$true)] [ValidateScript({ Test-Path -Path $_ -PathType Leaf })] [string] $Solution, [pa...
PowerShellCorpus/PowerShellGallery/SSRS/1.3.0/New-SSRSDataSet.ps1
New-SSRSDataSet.ps1
function New-SSRSDataSet ( $Proxy, [string]$RsdPath, [string]$Folder, [bool]$Overwrite=$false, $DataSourcePaths ) { $script:ErrorActionPreference = 'Stop' Write-Verbose "Processing DataSet '$RsdPath'..." $Folder = Normalize-SSRSFolder -Folder $Folder $Name = [System.IO.Path]::GetFileNameWitho...
PowerShellCorpus/PowerShellGallery/SSRS/1.3.0/New-SSRSFolder.ps1
New-SSRSFolder.ps1
function New-SSRSFolder ( $Proxy, [string] $Name, [switch] $Recursing ) { $script:ErrorActionPreference = 'Stop' if (!$recursing) { Write-Verbose "Creating SSRS folder '$Name'" } $Name = Normalize-SSRSFolder -Folder $Name if ($Proxy.GetItemType($Name) -ne 'Folder') { $Parts = $Name -s...
PowerShellCorpus/PowerShellGallery/SSRS/1.3.0/Publish-SSRSProject.ps1
Publish-SSRSProject.ps1
function Publish-SSRSProject{ #requires -version 2.0 # https://github.com/timabell/ssrs-powershell-deploy [CmdletBinding()] param ( [parameter(Mandatory=$true)] [ValidatePattern('\.rptproj$')] [ValidateScript({ Test-Path -PathType Leaf -Path $_ })] [string] $Path, [parameter(Mandatory=$false...
PowerShellCorpus/PowerShellGallery/SSRS/1.3.0/New-SSRSDataSource.ps1
New-SSRSDataSource.ps1
function New-SSRSDataSource ( $Proxy, [string]$RdsPath, [string]$Folder, [bool]$Overwrite ) { $script:ErrorActionPreference = 'Stop' Write-Verbose "Processing DataSource '$RdsPath'..." $Folder = Normalize-SSRSFolder -Folder $Folder [xml]$Rds = Get-Content -Path $RdsPath $ConnProps = $Rds.Rpt...
PowerShellCorpus/PowerShellGallery/SSRS/1.3.0/New-SSRSReport.ps1
New-SSRSReport.ps1
function New-SSRSReport ( $Proxy, [string]$RdlPath ) { $script:ErrorActionPreference = 'Stop' [xml]$Definition = Get-Content -Path $RdlPath $NsMgr = New-XmlNamespaceManager $Definition d $RawDefinition = Get-Content -Encoding Byte -Path $RdlPath $Name = $_.Name -replace '\.rdl$','' $DescProp =...
PowerShellCorpus/PowerShellGallery/SSRS/1.3.0/Get-SSRSProjectConfiguration.ps1
Get-SSRSProjectConfiguration.ps1
function Get-SSRSProjectConfiguration{ #requires -version 2.0 [CmdletBinding()] param ( [parameter(Mandatory=$true)] [ValidatePattern('\.rptproj$')] [ValidateScript({ Test-Path -PathType Leaf -Path $_ })] [string] $Path, [parameter(Mandatory=$true)] [string] $Configuration ) $scr...
PowerShellCorpus/PowerShellGallery/SSRS/1.3.0/New-XmlNamespaceManager.ps1
New-XmlNamespaceManager.ps1
function New-XmlNamespaceManager ($XmlDocument, $DefaultNamespacePrefix) { $script:ErrorActionPreference = 'Stop' $NsMgr = New-Object -TypeName System.Xml.XmlNamespaceManager -ArgumentList $XmlDocument.NameTable $DefaultNamespace = $XmlDocument.DocumentElement.GetAttribute('xmlns') if ($DefaultNamespace -an...
PowerShellCorpus/PowerShellGallery/SSRS/1.3.0/Get-SSRSCredential.ps1
Get-SSRSCredential.ps1
Function Get-SSRSCredential { [CmdletBinding(SupportsShouldProcess=$true)] param ( [string] $username, [string] $password ) $script:ErrorActionPreference = 'Stop' $pass = ConvertTo-SecureString -AsPlainText -Force -String $password $user = $username $cred = new-object -typename System.Managem...
PowerShellCorpus/PowerShellGallery/SSRS/1.3.0/New-SSRSWebServiceProxy.ps1
New-SSRSWebServiceProxy.ps1
Function New-SSRSWebServiceProxy { #requires -version 2.0 [CmdletBinding()] param ( [parameter(Mandatory=$true)] [ValidatePattern('^https?://')] [string] $Uri, [System.Management.Automation.PSCredential] $Credential ) $script:ErrorActionPreference = 'Stop' Set-StrictMode -Version Late...
PowerShellCorpus/PowerShellGallery/Eventbrite/0.0.2/Eventbrite.Full.Tests.ps1
Eventbrite.Full.Tests.ps1
$Here = Split-Path -Parent $MyInvocation.MyCommand.Path $PrivateFunctions = Get-ChildItem "$here\Private\" -Filter '*.ps1' -Recurse | Where-Object {$_.name -NotMatch "Tests.ps1"} $PublicFunctions = Get-ChildItem "$here\Public\" -Filter '*.ps1' -Recurse | Where-Object {$_.name -NotMatch "Tests.ps1"} $PrivateFunct...
PowerShellCorpus/PowerShellGallery/Eventbrite/0.0.2/Eventbrite.Min.Tests.ps1
Eventbrite.Min.Tests.ps1
$Here = Split-Path -Parent $MyInvocation.MyCommand.Path $PrivateFunctions = Get-ChildItem "$here\Private\" -Filter '*.ps1' -Recurse | Where-Object {$_.name -NotMatch "Tests.ps1"} $PublicFunctions = Get-ChildItem "$here\Public\" -Filter '*.ps1' -Recurse | Where-Object {$_.name -NotMatch "Tests.ps1"} $PrivateFunct...
PowerShellCorpus/PowerShellGallery/Eventbrite/0.0.2/Eventbrite.Norm.Tests.ps1
Eventbrite.Norm.Tests.ps1
$Here = Split-Path -Parent $MyInvocation.MyCommand.Path $PrivateFunctions = Get-ChildItem "$here\Private\" -Filter '*.ps1' -Recurse | Where-Object {$_.name -NotMatch "Tests.ps1"} $PublicFunctions = Get-ChildItem "$here\Public\" -Filter '*.ps1' -Recurse | Where-Object {$_.name -NotMatch "Tests.ps1"} $PrivateFunct...
PowerShellCorpus/PowerShellGallery/Eventbrite/0.0.2/Public/Get/Get-EventbriteEvents.ps1
Get-EventbriteEvents.ps1
function Get-EventbriteEvents { <# .Synopsis This Function will Get all EventBrite Events .DESCRIPTION To be completed .EXAMPLE Get-EventbriteEvents -EventbrightToken $env:EventbriteToken .PARAMETER EventbriteToken Unique Token as can be obtained from the EventBrite API Pages #...
PowerShellCorpus/PowerShellGallery/Eventbrite/0.0.2/Public/Get/Get-EventbriteEvent.ps1
Get-EventbriteEvent.ps1
function Get-EventbriteEvent { <# .Synopsis This Function will Get a specific EventBrite Event .DESCRIPTION To be completed .EXAMPLE Get-EventbriteEvent -EventbrightToken $env:EventbriteToken -EventID 1234376727438 .PARAMETER EventbriteToken Unique Token as can be obtained from the EventBrite...
PowerShellCorpus/PowerShellGallery/Eventbrite/0.0.2/Public/Get/Get-EventbriteOrders.ps1
Get-EventbriteOrders.ps1
function Get-EventbriteOrders { <# .Synopsis This Function will Get all EventBrite Orders .DESCRIPTION To be completed .EXAMPLE Get-EventbriteOrders -EventbrightToken $env:EventbriteToken .PARAMETER EventbriteToken Unique Token as can be obtained from the EventBrite API Pages #> [cmd...
PowerShellCorpus/PowerShellGallery/Eventbrite/0.0.2/Public/Get/Get-EventbriteVenue.ps1
Get-EventbriteVenue.ps1
function Get-EventbriteVenue { <# .Synopsis This Function will return the venue object from an EventBrite event .DESCRIPTION To be completed .EXAMPLE Get-EventbriteVenue -EventbrightToken $env:EventbriteToken -VenueID $venueID .PARAMETER VenueID An interger that uniquely identifies the venue ...
PowerShellCorpus/PowerShellGallery/Eventbrite/0.0.2/Public/Get/Get-EventbriteEventQuestions.ps1
Get-EventbriteEventQuestions.ps1
function Get-EventbriteEventQuestions { <# .Synopsis This Function will Get all Questions from a specificed EventBrite Event .DESCRIPTION To be completed .EXAMPLE Get-EventbriteEventQuestions -EventbrightToken $env:EventbriteToken -EventID 1232786423 .PARAMETER EventbriteToken Unique Token as ...
PowerShellCorpus/PowerShellGallery/Eventbrite/0.0.2/Public/Get/Get-EventAttendee.ps1
Get-EventAttendee.ps1
function Get-EventAttendee { <# .Synopsis This Function will return the attendees for an EventBrite event .DESCRIPTION To be completed .EXAMPLE Get-EventAttendees -EventbrightToken $env:EventbriteToken -Location Manchester -Month February -Year 2016 .PARAMETER EventbriteToken Unique Token as ...
PowerShellCorpus/PowerShellGallery/Eventbrite/0.0.2/Public/Get/Tests/Get-EventbriteOrders.Tests.ps1
Get-EventbriteOrders.Tests.ps1
Describe 'Get-EventbriteOrders Tests' { Context 'Parameters for Get-EventbriteOrders'{ It 'Has a Parameter called EventbriteToken' { $Function.Parameters.Keys.Contains('EventbriteToken') | Should Be 'True' } It 'EventbriteToken Parameter is Identified as Mandatory bei...
PowerShellCorpus/PowerShellGallery/Eventbrite/0.0.2/Public/Get/Tests/Get-EventbriteVenue.Tests.ps1
Get-EventbriteVenue.Tests.ps1
Describe 'Get-EventbriteVenue Tests' { Context 'Parameters for Get-EventbriteVenue'{ It 'Has a Parameter called EventbriteToken' { $Function.Parameters.Keys.Contains('EventbriteToken') | Should Be 'True' } It 'EventbriteToken Parameter is Identified as Mandatory being...