full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/PowerShellGallery/ConfluencePS/1.0.69/Public/Get-WikiSpace.ps1
Get-WikiSpace.ps1
function Get-WikiSpace { <# .SYNOPSIS Retrieve a listing of spaces in your Confluence instance. .DESCRIPTION Fetch all Confluence spaces, optionally filtering by Name/Key/ID. Input for all parameters is not case sensitive. Piped output into other cmdlets is generally tested and supported. ...
PowerShellCorpus/PowerShellGallery/ConfluencePS/1.0.69/Public/New-WikiLabel.ps1
New-WikiLabel.ps1
function New-WikiLabel { <# .SYNOPSIS Add a new global label to an existing Confluence page. .DESCRIPTION Add one or more labels to one or more Confluence pages. Label can be brand new. .EXAMPLE New-WikiLabel -Label alpha,bravo,charlie -PageID 123456 -Verbose Apply the labels alpha, br...
PowerShellCorpus/PowerShellGallery/ConfluencePS/1.0.69/Public/Get-WikiLabelApplied.ps1
Get-WikiLabelApplied.ps1
function Get-WikiLabelApplied { <# .SYNOPSIS Search for a label and get results of where it has been applied. .DESCRIPTION View pages, blogposts, etc. with the specified label. Optionally filter by space. Leverages the Confluence Query Language against the /search resource. .EXAMPLE Ge...
PowerShellCorpus/PowerShellGallery/ConfluencePS/1.0.69/Public/Get-WikiChildPage.ps1
Get-WikiChildPage.ps1
function Get-WikiChildPage { <# .SYNOPSIS For a given wiki page, list all child wiki pages. .DESCRIPTION Pipeline input of ParentID is accepted. This API method only returns the immediate children (results are not recursive). .EXAMPLE Get-WikiChildPage -ParentID 1234 | Select-Obje...
PowerShellCorpus/PowerShellGallery/ConfluencePS/1.0.69/Public/ConvertTo-WikiTable.ps1
ConvertTo-WikiTable.ps1
function ConvertTo-WikiTable { <# .SYNOPSIS Convert your content to Confluence's wiki markup table format. .DESCRIPTION Formats input as a table with a horizontal header row. This wiki formatting is an intermediate step, and would still need ConvertTo-WikiStorageFormat called against it. Th...
PowerShellCorpus/PowerShellGallery/ConfluencePS/1.0.69/Public/ConvertTo-WikiStorageFormat.ps1
ConvertTo-WikiStorageFormat.ps1
function ConvertTo-WikiStorageFormat { <# .SYNOPSIS Convert your content to Confluence's storage format. .DESCRIPTION To properly create/edit pages, content should be in the proper "XHTML-based" format. Invokes a POST call to convert from a "wiki" representation, receiving a "storage" response....
PowerShellCorpus/PowerShellGallery/ConfluencePS/1.0.69/Public/Get-WikiPageLabel.ps1
Get-WikiPageLabel.ps1
function Get-WikiPageLabel { <# .SYNOPSIS Returns the list of labels on a page. .DESCRIPTION View all labels applied to a page (specified by PageID). Currently accepts multiple pages only via piped input. .EXAMPLE Get-WikiPageLabel -PageID 123456 -Limit 500 Lists the labels applied...
PowerShellCorpus/PowerShellGallery/ConfluencePS/1.0.69/Public/New-WikiPage.ps1
New-WikiPage.ps1
function New-WikiPage { <# .SYNOPSIS Create a new page in your Confluence instance. .DESCRIPTION Create a new page in Confluence. Optionally include content in -Body. Content needs to be in "Confluence storage format;" see also -Convert. .EXAMPLE New-WikiPage -Title 'Test New Page' -Pa...
PowerShellCorpus/PowerShellGallery/ConfluencePS/1.0.69/Public/Remove-WikiPage.ps1
Remove-WikiPage.ps1
function Remove-WikiPage { <# .SYNOPSIS Trash an existing Confluence page. .DESCRIPTION Delete existing Confluence content by page ID. This trashes most content, but will permanently delete "un-trashable" content. Untested against non-page content, but probably works anyway. .EXAMPLE ...
PowerShellCorpus/PowerShellGallery/ConvertToClass/1.5/PSReadlineKeyHandler.ps1
PSReadlineKeyHandler.ps1
Set-PSReadlineKeyHandler -Key Ctrl+Shift+V ` -BriefDescription PasteAsClass ` -LongDescription 'Paste text on clipboard as a PowerShell class' ` -ScriptBlock { param($key, $arg) $newClass=(ConvertTo-Class ((Get-Clipboard) -join "`n")) [Microsoft.PowerShell.PSConsoleR...
PowerShellCorpus/PowerShellGallery/ConvertToClass/1.5/PasteAsClass.ps1
PasteAsClass.ps1
$sb = { $newFile = $psISE.CurrentPowerShellTab.Files.Add() $srcText = (Get-Clipboard) -join "`n" $newFile.Editor.Text=((ConvertTo-Class $srcText) -join "`r`n") Clear-Host } $psISE.CurrentPowerShellTab.AddOnsMenu.Submenus.Add("Paste as PowerShell Class", $sb, "ctrl+shift+v")
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Binding - Test Command Line VBscript with Process Start Events.ps1
Event Binding - Test Command Line VBscript with Process Start Events.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 12/14/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter, consumer, and binding that invokes a VBscript (intended to respond to user profile load events)...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Binding - ScriptFile - UFD Installed.ps1
Event Binding - ScriptFile - UFD Installed.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 12/7/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter, consumer, and binding that executes a VBscript file in response to a UFD being installed. ${S...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Test-PowerEvents.ps1
Test-PowerEvents.ps1
# Test WMI Query: select * from __InstanceOperationsEvent where TargetInstance ISA 'Win32_Process' Clear-Host # Enable verbose messages to be written to console output $VerbosePreference = 'Continue' $DebugPreference = 'Continue' #region Get script path #$MyInvocation.MyCommand.Path ${ScriptPath} = Split-P...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Binding - Event Log - Process Termination.ps1
Event Binding - Event Log - Process Termination.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/28/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter, consumer, and binding that logs process terminations to the Application event log. ${ScriptP...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Binding - Script - UFD Removed.ps1
Event Binding - Script - UFD Removed.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/29/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter, consumer, and binding that fires a VBscript in response to a UFD being removed. ${ScriptPath...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Binding - Script - Print Job Created.ps1
Event Binding - Script - Print Job Created.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/28/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter, consumer, and binding that fires a VBscript in response to a new print job. ${ScriptPath} = ...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Binding - ScriptFile - UFD Removed.ps1
Event Binding - ScriptFile - UFD Removed.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/29/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter, consumer, and binding that fires a VBscript in response to a UFD being removed. ${ScriptPath...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Binding - Script - Print Job Completed.ps1
Event Binding - Script - Print Job Completed.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/28/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter, consumer, and binding that fires a VBscript in response to a completed print job. ${ScriptPa...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Binding - Command Line - System Resumed - Restart Windows Service.ps1
Event Binding - Command Line - System Resumed - Restart Windows Service.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 7/9/2011 # Brief: This example shows how to use PowerEvents to create a WMI event filter, consumer, and binding # that shuts down a computer when Microsoft Outlook is started....
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Binding - Log File - Print Job Created.ps1
Event Binding - Log File - Print Job Created.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/28/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter, consumer, and binding that logs a new print job to a text file. ${ScriptPath} = Split-Path $...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Binding - Event Log - Process Creation.ps1
Event Binding - Event Log - Process Creation.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/28/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter, consumer, and binding that logs process creations to the Application event log. ${ScriptPath...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Binding - Log File - Print Job Completed.ps1
Event Binding - Log File - Print Job Completed.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/28/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter, consumer, and binding that logs a completed print job to a text file. ${ScriptPath} = Split-...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Binding - Command Line - Microsoft Outlook Started.ps1
Event Binding - Command Line - Microsoft Outlook Started.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 05/31/11 # Brief: This example shows how to use PowerEvents to create a WMI event filter, consumer, and binding # that shuts down a computer when Microsoft Outlook is started....
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Binding - Script - UFD Installed.ps1
Event Binding - Script - UFD Installed.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/29/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter, consumer, and binding that fires a VBscript in response to a UFD being installed. ${ScriptPa...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Binding - Command Line - User Profile Unloaded - Delete Unused Profiles.ps1
Event Binding - Command Line - User Profile Unloaded - Delete Unused Profiles.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 06/30/11 # Brief: This example shows how to use PowerEvents to create a WMI event filter, consumer, and binding that # removes all unused user profiles upon user logoff. ${...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/CommandLine - PowerShellTest.ps1
CommandLine - PowerShellTest.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/29/10 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that calls a script in response to a print job completing. New-WmiEventConsumer -Name Power...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/Script - Print Job Completed.ps1
Script - Print Job Completed.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/22/10 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that calls a script in response to a print job completing. $VBcode = @" set fso = CreateOb...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/Script - UFD Installed.ps1
Script - UFD Installed.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/22/10 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that calls a script in response to a USB flash drive (UFD) being installed. # Note: This i...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/CommandLine - Script With Args.ps1
CommandLine - Script With Args.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/29/10 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that calls a script in response to a print job completing. New-WmiEventConsumer -Name Scrip...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/Log File - Process Created.ps1
Log File - Process Created.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/22/10 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that writes to a log file. # The Text parameter is the message written to the event ...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/Script - UFD Removed.ps1
Script - UFD Removed.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/22/10 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that calls a script in response to a USB flash drive (UFD) being removed. # Note: This is ...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/Command Line - User Profile Unloaded - Delete Unloaded Profiles.ps1
Command Line - User Profile Unloaded - Delete Unloaded Profiles.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/28/10 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that runs a command line in response to a user profile being unloaded. # Note: This is not...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/Event Log - Process Termination.ps1
Event Log - Process Termination.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/21/10 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that writes to the event log. # The InsertionStringTemplates parameter is the messag...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/Command Line - User Profile Unloaded - Run VBscript.ps1
Command Line - User Profile Unloaded - Run VBscript.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/28/10 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that runs a command line in response to a user profile being unloaded. # Note: This is not...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/Script - Print Job Created.ps1
Script - Print Job Created.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/22/10 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that calls a script in response to a new print job being created. $VBcode = @" set fso = C...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/Log File - Process Terminated.ps1
Log File - Process Terminated.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/22/10 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that writes to a log file. # The Text parameter is the message written to the event ...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/Event Log - Process Creation.ps1
Event Log - Process Creation.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/21/10 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that writes to the event log. # The InsertionStringTemplates parameter is the messag...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/Log File - Print Job Created.ps1
Log File - Print Job Created.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/22/10 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that writes to a log file. # The Text parameter is the message written to the event ...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/ScriptFile - UFD Installed.ps1
ScriptFile - UFD Installed.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/30/10 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that calls a script in response to a USB flash drive (UFD) being removed. # Note: This is ...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/Command Line - Microsoft Outlook Started.ps1
Command Line - Microsoft Outlook Started.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 05/26/11 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that runs a command line in response to Microsoft Outlook being started. # Note that...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/Log File - Print Job Completed.ps1
Log File - Print Job Completed.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/22/10 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that writes to a log file. # The Text parameter is the message written to the event ...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/Command Line - User Profile Loaded.ps1
Command Line - User Profile Loaded.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/28/10 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that runs a command line in response to a user profile being loaded. # Note that the...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/ScriptFile - UFD Removed.ps1
ScriptFile - UFD Removed.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/30/10 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that calls a script in response to a USB flash drive (UFD) being removed. # Note: This is ...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/Windows/Command Line - System Resumed - Restart Windows Service.ps1
Command Line - System Resumed - Restart Windows Service.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/28/10 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that runs a command line in response to a user profile being loaded. # Note that the...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/Windows/Support/Restart Windows Service.ps1
Restart Windows Service.ps1
$ServiceName = 'PS3 Media Server' $Service = Get-WmiObject -Namespace root\cimv2 -Class Win32_Service -Filter "Name = '$Service'" $Service.StopService() $Service.StartService()
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Consumers/ConfigMgr/ConfigMgr - System Resource Created.ps1
ConfigMgr - System Resource Created.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 05/24/11 # Brief: This example shows how to use PowerEvents to create a WMI event consumer that calls a script in response to # a new System Center Configuration Manager syste...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/Event Filter - Microsoft Outlook Started.ps1
Event Filter - Microsoft Outlook Started.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 05/25/11 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects when Microsoft Outlook is started. # Note: This is not a complete working sampl...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/Windows/Event Filter - Print Job Created.ps1
Event Filter - Print Job Created.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/22/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects the creation of a new print job. # Note: This is not a complete working sample ...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/Windows/Event Filter - UFD Removed.ps1
Event Filter - UFD Removed.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/29/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects when a USB flash drive is removed. # Note: This is not a complete working sampl...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/Windows/Event Filter - Process Created.ps1
Event Filter - Process Created.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/22/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects the creation of a Windows process. # Processes are started and stopped co...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/Windows/Event Filter - System Resumed.ps1
Event Filter - System Resumed.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 7/9/2011 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects when the system has been resumed. # Note: This is not a complete working sample...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/Windows/Event Filter - User Profile Loaded.ps1
Event Filter - User Profile Loaded.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/28/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects when a user profile is loaded. # Note: This is not a complete working sample of...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/Windows/Event Filter - Process Terminated.ps1
Event Filter - Process Terminated.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/22/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects the termination of a Windows process. # Processes are started and stopped...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/Windows/Event Filter - Print Job Completed.ps1
Event Filter - Print Job Completed.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/22/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects the deletion of a print job. # If a print job is deleted, it mostly likel...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/Windows/Event Filter - User Profile Unloaded.ps1
Event Filter - User Profile Unloaded.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/29/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects when a user profile is unloaded. # Note: This is not a complete working sample ...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/Windows/Event Filter - UFD Installed.ps1
Event Filter - UFD Installed.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/28/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects when a USB flash drive is installed. # Note: This is not a complete working sam...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/ConfigMgr/Event Filter - ConfigMgr - Advertisement Deleted.ps1
Event Filter - ConfigMgr - Advertisement Deleted.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/22/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects the deletion of a System Center Configuration Mananger (ConfigMgr) advertisement. ...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/ConfigMgr/Event Filter - ConfigMgr - Collection Created.ps1
Event Filter - ConfigMgr - Collection Created.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/22/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects the creation of a new System Center Configuration Mananger (ConfigMgr) collection. ...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/ConfigMgr/Event Filter - ConfigMgr - Resource Created.ps1
Event Filter - ConfigMgr - Resource Created.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 05/24/11 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects the creation of a new System Center Configuration Mananger (ConfigMgr) system resou...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/ConfigMgr/Event Filter - ConfigMgr - Package Created.ps1
Event Filter - ConfigMgr - Package Created.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/22/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects the creation of a new System Center Configuration Mananger (ConfigMgr) package. # ...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/ConfigMgr/Event Filter - ConfigMgr - Advertisement Created.ps1
Event Filter - ConfigMgr - Advertisement Created.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/22/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects the creation of a new System Center Configuration Mananger (ConfigMgr) advertisemen...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/ConfigMgr/Event Filter - ConfigMgr - Package Deleted.ps1
Event Filter - ConfigMgr - Package Deleted.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/22/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects the deletion of a System Center Configuration Mananger (ConfigMgr) package. # ...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/ConfigMgr/Event Filter - ConfigMgr - Collection Deleted.ps1
Event Filter - ConfigMgr - Collection Deleted.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/22/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects the deletion of a System Center Configuration Mananger (ConfigMgr) collection. # ...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/Clustering/Event Filter - Cluster State Offline.ps1
Event Filter - Cluster State Offline.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 12/1/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects when a Microsoft cluster resource goes offline. # Note: This is not a complete w...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/Clustering/Event Filter - Cluster State Changed.ps1
Event Filter - Cluster State Changed.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 12/1/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects when a Microsoft cluster resource state changes for any reason. # Note: This is ...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/Clustering/Event Filter - Cluster State Online.ps1
Event Filter - Cluster State Online.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 12/1/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects when a Microsoft cluster resource comes online. # Note: This is not a complete w...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/Active Directory/Event Filter - Active Directory - User Created.ps1
Event Filter - Active Directory - User Created.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/28/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects the creation of a user object in Active Directory (AD). # Note: This is not a c...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/Active Directory/Event Filter - Active Directory - Computer Created.ps1
Event Filter - Active Directory - Computer Created.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/28/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects the creation of a computer object in Active Directory (AD). # Take note t...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/Active Directory/Event Filter - Active Directory - User Deleted.ps1
Event Filter - Active Directory - User Deleted.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/28/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects the deletion of a user object in Active Directory (AD). # Note: This is not a c...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Samples/Event Filters/Active Directory/Event Filter - Active Directory - Computer Deleted.ps1
Event Filter - Active Directory - Computer Deleted.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/28/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter that detects the deletion of a computer object in Active Directory (AD). # Take note t...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Functions/New-WmiEventConsumer.ps1
New-WmiEventConsumer.ps1
# TODO: Test creation of WMI Event Consumer on remote machine (should work fine) # TODO: Finish comment-based help (add several .Example) # TODO: Check for existence of script file during consumer creation # TODO: Consolidate certain parameters (eg. Message, Text, InsertionStringTemplate) that do more or less the ...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Functions/New-WmiEventFilter.ps1
New-WmiEventFilter.ps1
# TODO: Check if a filter with the same name already exists, and prompt user if they want to overwrite (use the -Force parameter) # TODO (DONE): Check if user is an administrator. If not, write an error message informing them of this, and hope they haven't set $ErrorActionPreference to 'SilentlyContinue' :) #region...
PowerShellCorpus/PowerShellGallery/PowerEvents/0.4/Functions/New-WmiFilterToConsumerBinding.ps1
New-WmiFilterToConsumerBinding.ps1
# TODO: Test creation of a new __FilterToConsumerBinding instance against a remote computer # TODO: Rename this cmdlet to New-WmiEventBinding for consistency? <# .Synopsis Creates a new binding between a WMI event filter and a WMI event consumer. .Description Creates a new binding between a WMI event fil...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xHostsFile/1-AddEntry.ps1
1-AddEntry.ps1
<# .EXAMPLE Add a new host to the host file #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xHostsFile HostEntry { ...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xHostsFile/2-RemoveEntry.ps1
2-RemoveEntry.ps1
<# .EXAMPLE Remove a host from the hosts file #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xHostsFile HostEntry { ...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xIPAddress/1-AddingStaticIP.ps1
1-AddingStaticIP.ps1
<# .EXAMPLE Disabling DHCP and adding a static IP Address for IPv6 #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DscResource -Module xNetworking Node $NodeName { xDhcpClient DisabledD...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xDefaultGatewayAddress/1-RemoveDefaultGateway.ps1
1-RemoveDefaultGateway.ps1
<# .EXAMPLE Removing the default gateway from an interface #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DscResource -Module xNetworking Node $NodeName { xDefaultGatewayAddress RemoveDe...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xDefaultGatewayAddress/2-SetDefaultGateway.ps1
2-SetDefaultGateway.ps1
<# .EXAMPLE Adding a default gateway to the interface #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DscResource -Module xNetworking Node $NodeName { xDefaultGatewayAddress SetDefaultGat...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xNetAdapterName/1-RenameNetAdapterMacAddress.ps1
1-RenameNetAdapterMacAddress.ps1
<# .EXAMPLE Rename three network adapters identified by MAC addresses to Cluster, Management and SMB and then enable DHCP on them. #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DSCResource -ModuleNam...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xNetAdapterName/2-RenameNetAdapterDriver.ps1
2-RenameNetAdapterDriver.ps1
<# .EXAMPLE Rename the first three network adapters with Driver Description matching 'Hyper-V Virtual Ethernet Adapter' in consequtive order to Cluster, Management and SMB and then enable DHCP on them. #> Configuration Example { param ( [Parameter()] [System.String[]] ...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xFirewall/3-xFirewall_AddFirewallRuleToExistingGroup.ps1
3-xFirewall_AddFirewallRuleToExistingGroup.ps1
<# .EXAMPLE Adding a firewall to an existing Firewall group 'My Firewall Rule' #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xFire...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xFirewall/1-xFirewall_AddFirewallRule.ps1
1-xFirewall_AddFirewallRule.ps1
<# .EXAMPLE Allow notepad to access ports on the Domain and Private Profiles #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xFirewa...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xFirewall/2-xFirewall_AddFirewallRule_AllParameters.ps1
2-xFirewall_AddFirewallRule_AllParameters.ps1
<# .EXAMPLE DSC configuration for Firewall Note: This configuration sample uses all Firewall rule parameters. It is only used to show example usage and should not be created. #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'local...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xFirewall/4-xFirewall_EnableBuiltInFirewallRule.ps1
4-xFirewall_EnableBuiltInFirewallRule.ps1
<# .EXAMPLE DSC configuration that enables the built-in Firewall Rule 'World Wide Web Services (HTTP Traffic-In)' #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking ...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xRoute/1-AddRoute.ps1
1-AddRoute.ps1
<# .EXAMPLE Add a net route to the Ethernet interface #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xRoute NetRoute1 { ...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xNetAdapterBinding/1-DisableIPv6.ps1
1-DisableIPv6.ps1
<# .EXAMPLE Disabling IPv6 for the Ethernet adapter #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xNetAdapterBinding DisableIPv6 ...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xNetAdapterLso/2-DisableLsoIPv4.ps1
2-DisableLsoIPv4.ps1
<# .EXAMPLE This configuration disables LSO for IPv4 on the network adapter. #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xNetAd...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xNetAdapterLso/1-DisableLsoIPv6.ps1
1-DisableLsoIPv6.ps1
<# .EXAMPLE This configuration disables LSO for IPv6 on the network adapter. #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xNetAd...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xNetAdapterRDMA/1-DisableRDMASettings.ps1
1-DisableRDMASettings.ps1
<# .EXAMPLE This configuration disables RDMA setting on the network adapter. #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xNetAda...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xNetAdapterRDMA/2-EnableRDMASettings.ps1
2-EnableRDMASettings.ps1
<# .EXAMPLE This configuration enables RDMA setting on the network adapter. #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xNetAdap...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xDnsServerAddress/2-xDnsServerAddress_PrimaryAndSecondary.ps1
2-xDnsServerAddress_PrimaryAndSecondary.ps1
<# .EXAMPLE Configure primary and secondary DNS Server addresses on the Ethernet adapter #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DscResource -Module xNetworking Node $NodeName { ...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xDnsServerAddress/1-xDnsServerAddress.ps1
1-xDnsServerAddress.ps1
<# .EXAMPLE Configure DNS Server for the Ethernet adapter #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DscResource -Module xNetworking Node $NodeName { xDnsServerAddress DnsServerAdd...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xDhcpClient/1-EnableDHCP.ps1
1-EnableDHCP.ps1
<# .EXAMPLE Enabling DHCP Client for the Ethernet Alias #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DscResource -Module xNetworking Node $NodeName { xDhcpClient EnableDhcpClient ...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xNetworkTeam/2-RemoveTeam.ps1
2-RemoveTeam.ps1
<# .EXAMPLE Removes the NIC Team for the listed interfacess. #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xNetworkTeam HostTeam ...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xNetworkTeam/1-AddNetworkTeam.ps1
1-AddNetworkTeam.ps1
<# .EXAMPLE Creates the Host Team with the NIC1 and NIC2 Interfaces #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xNetworkTeam Hos...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xNetBIOS/1-DisableNetBIOS.ps1
1-DisableNetBIOS.ps1
<# .EXAMPLE Disable NetBios on Adapter #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DscResource -ModuleName xNetworking node $NodeName { xNetBIOS DisableNetBIOS { ...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xNetConnectionProfile/1-SetNetConnectionProfile.ps1
1-SetNetConnectionProfile.ps1
<# .EXAMPLE Sets the Ethernet adapter to Public and IPv4/6 to Internet Connectivity #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DscResource -Module xNetworking Node $NodeName { xNet...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xNetworkTeamInterface/2-RemoveInterface.ps1
2-RemoveInterface.ps1
<# .EXAMPLE Remove a Network Team Interface #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xNetworkTeam HostTeam { ...
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xNetworkTeamInterface/1-AddInterface.ps1
1-AddInterface.ps1
<# .EXAMPLE Add New Network Team Interface #> Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xNetworkTeam HostTeam { ...