full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Private/TOC.Internal.ps1
TOC.Internal.ps1
#region TOC Private Functions function New-PScriboTOC { <# .SYNOPSIS Initializes a new PScribo Table of Contents (TOC) object. .NOTES This is an internal function and should not be called directly. #> [CmdletBi...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Private/LineBreak.Internal.ps1
LineBreak.Internal.ps1
#region LineBreak Private Functions function New-PScriboLineBreak { <# .SYNOPSIS Initializes a new PScribo line break object. .NOTES This is an internal function and should not be called directly. #> [CmdletBin...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Private/Section.Internal.ps1
Section.Internal.ps1
#region Section Private Functions function New-PScriboSection { <# .SYNOPSIS Initializes new PScribo section object. .NOTES This is an internal function and should not be called directly. #> [CmdletBinding()] ...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Private/Options.ps1
Options.ps1
function Merge-PScriboPluginOptions { <# .SYNOPSIS Merges the specified options along with the plugin-specific default options. #> [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param ( ## Default/document options [Parameter(Mandatory, ValueFromPipelineBy...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Private/TableStyle.Internal.ps1
TableStyle.Internal.ps1
#region TableStyle Private Functions function Add-PScriboTableStyle { <# .SYNOPSIS Defines a new PScribo table formatting style. .DESCRIPTION Creates a standard table formatting style that can be applied to the PScrib...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Private/Document.Internal.ps1
Document.Internal.ps1
#region Document Private Functions function New-PScriboDocument { <# .SYNOPSIS Initializes a new PScript document object. .NOTES This is an internal function and should not be called directly. #> [CmdletBinding...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Private/Table.Internal.ps1
Table.Internal.ps1
#region Table Private Functions function New-PScriboTable { <# .SYNOPSIS Initializes a new PScribo table object. .PARAMETER Name .PARAMETER Columns .PARAMETER ColumnWidths .PARAMETER Rows ...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Private/BlankLine.Internal.ps1
BlankLine.Internal.ps1
#region BlankLine Private Functions function New-PScriboBlankLine { <# .SYNOPSIS Initializes a new PScribo blank line break. .NOTES This is an internal function and should not be called directly. #> [CmdletBind...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Private/Logging.ps1
Logging.ps1
function WriteLog { <# .SYNOPSIS Writes message to the verbose, warning or debug streams. Output is prefixed with the time and PScribo plugin name. #> [CmdletBinding(DefaultParameterSetName = 'Verbose')] param ( ## Message to send to the Verbose stream [Parameter(Val...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Private/Conversion.ps1
Conversion.ps1
function ConvertPtToMm { <# .SYNOPSIS Convert points into millimeters #> [CmdletBinding()] [OutputType([System.Single])] param ( [Parameter(Mandatory, ValueFromPipeline)] [Alias('pt')] [System.Single] $Point ) process { return [System.Math]:...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Private/PageBreak.Internal.ps1
PageBreak.Internal.ps1
#region PageBreak Private Functions function New-PScriboPageBreak { <# .SYNOPSIS Creates a PScribo page break object. .NOTES This is an internal function and should not be called directly. #> [CmdletBinding()] ...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Private/Style.Internal.ps1
Style.Internal.ps1
#region Style Private Functions function Add-PScriboStyle { <# .SYNOPSIS Initializes a new PScribo style object. #> [CmdletBinding()] param ( ## Style name [Parameter(Mandatory, ValueFromPipeli...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Private/Paragraph.Internal.ps1
Paragraph.Internal.ps1
#region Paragraph Private Functions function New-PScriboParagraph { <# .SYNOPSIS Initializes a new PScribo paragraph object. .NOTES This is an internal function and should not be called directly. #> [CmdletBind...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Public/BlankLine.ps1
BlankLine.ps1
function BlankLine { <# .SYNOPSIS Initializes a new PScribo blank line object. #> [CmdletBinding()] param ( [Parameter(ValueFromPipeline, Position = 0)] [System.UInt32] $Count = 1 ) begin { <#! BlankLine.Internal.ps1 !#> } #end begin process { ...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Public/LineBreak.ps1
LineBreak.ps1
function LineBreak { <# .SYNOPSIS Initializes a new PScribo line break object. #> [CmdletBinding()] [OutputType([System.Management.Automation.PSCustomObject])] param ( [Parameter(Position = 0)] [ValidateNotNullOrEmpty()] [System.String] $Id = [System.Guid]::NewG...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Public/Table.ps1
Table.ps1
function Table { <# .SYNOPSIS Defines a new PScribo document table. .PARAMETER Name .PARAMETER InputObject .PARAMETER Hashtable .PARAMETER Columns .PARAMETER ColumnWidths .PARAMETER Headers .PARAMETER Style .PARAMETER List .PARAMETER Width ...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Public/PageBreak.ps1
PageBreak.ps1
function PageBreak { <# .SYNOPSIS Creates a PScribo page break object. #> [CmdletBinding()] [OutputType([System.Management.Automation.PSCustomObject])] param ( [Parameter(Position = 0)] [ValidateNotNullOrEmpty()] [System.String] $Id = [System.Guid]::NewGuid().To...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Public/Paragraph.ps1
Paragraph.ps1
function Paragraph { <# .SYNOPSIS Initializes a new PScribo paragraph object. #> [CmdletBinding()] [OutputType([System.Management.Automation.PSCustomObject])] param ( ## Paragraph Id and Xml element name [Parameter(Mandatory, ValueFromPipelineByPropertyName, Position = 0...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Public/Style.ps1
Style.ps1
function Resolve-PScriboStyleColor { <# .SYNOPSIS Resolves a HTML color format or Word color constant to a RGB value #> [CmdletBinding()] [OutputType([System.String])] param ( [Parameter(Mandatory, ValueFromPipeline, Position = 0)] [ValidateNotNull()] [System.St...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Public/TableStyle.ps1
TableStyle.ps1
function TableStyle { <# .SYNOPSIS Defines a new PScribo table formatting style. .DESCRIPTION Creates a standard table formatting style that can be applied to the PScribo table keyword, e.g. a combination of header and row styles and borders. .NOTES Not all p...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Public/Export-Document.ps1
Export-Document.ps1
function Export-Document { <# .SYNOPSIS Exports a PScribo document object to one or more output formats. #> [CmdletBinding()] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingEmptyCatchBlock','')] [OutputType([System.IO.FileInfo])] param ( ## PScribo document ...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Public/Section.ps1
Section.ps1
function Section { <# .SYNOPSIS Initializes a new PScribo section object. #> [CmdletBinding()] [OutputType([System.Management.Automation.PSCustomObject])] param ( ## PScribo section heading/name. [Parameter(Mandatory, Position = 0)] [System.String] $Name, ...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Public/Document.ps1
Document.ps1
function Document { <# .SYNOPSIS Initializes a new PScribo document object. #> [CmdletBinding()] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments','pluginName')] [OutputType([System.Management.Automation.PSCustomObject])] param ( ## PS...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Public/TOC.ps1
TOC.ps1
function TOC { <# .SYNOPSIS Initializes a new PScribo Table of Contents (TOC) object. #> [CmdletBinding()] [OutputType([System.Management.Automation.PSCustomObject])] param ( [Parameter(ValueFromPipeline)] [ValidateNotNullOrEmpty()] [System.String] $Name = 'Cont...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Public/DocumentOption.ps1
DocumentOption.ps1
function DocumentOption { <# .SYNOPSIS Initializes a new PScribo global/document options/settings. .NOTES Options are reset upon each invocation. #> [CmdletBinding(DefaultParameterSetName = 'Margin')] [Alias('GlobalOption')] param ( ## Forces document header to be d...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Plugins/OutXml.Internal.ps1
OutXml.Internal.ps1
#region OutXml Private Functions function OutXmlSection { <# .SYNOPSIS Output formatted Xml section. #> [CmdletBinding()] param ( ## PScribo document section [Parameter(Mandatory, ValueFromPipe...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Plugins/OutText.ps1
OutText.ps1
function OutText { <# .SYNOPSIS Text output plugin for PScribo. .DESCRIPTION Outputs a text file representation of a PScribo document object. #> [CmdletBinding()] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments','pluginName')] param (...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Plugins/OutHtml.ps1
OutHtml.ps1
function OutHtml { <# .SYNOPSIS Html output plugin for PScribo. .DESCRIPTION Outputs a Html file representation of a PScribo document object. #> [CmdletBinding()] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments','pluginName')] [Output...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Plugins/OutWord.Internal.ps1
OutWord.Internal.ps1
#region OutWord Private Functions function ConvertToWordColor { <# .SYNOPSIS Converts an HTML color to RRGGBB value as Word does not support short Html color codes #> [CmdletBinding()] param ( [Parameter(Mandat...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Plugins/OutWord.ps1
OutWord.ps1
function OutWord { <# .SYNOPSIS Microsoft Word output plugin for PScribo. .DESCRIPTION Outputs a Word document representation of a PScribo document object. #> [CmdletBinding()] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments','pluginName')...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Plugins/OutText.Internal.ps1
OutText.Internal.ps1
#region OutText Private Functions function New-PScriboTextOption { <# .SYNOPSIS Sets the text plugin specific formatting/output options. .NOTES All plugin options should be prefixed with the plugin name. #> [Cm...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Plugins/OutXml.ps1
OutXml.ps1
function OutXml { <# .SYNOPSIS Xml output plugin for PScribo. .DESCRIPTION Outputs a xml representation of a PScribo document object. #> [CmdletBinding()] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments','pluginName')] param ( ...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Src/Plugins/OutHtml.Internal.ps1
OutHtml.Internal.ps1
#region OutHtml Private Functions function New-PScriboHtmlOption { <# .SYNOPSIS Sets the text plugin specific formatting/output options. .NOTES All plugin options should be prefixed with the plugin name. #> [Cm...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example21.ps1
Example21.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example21 = Document -Name 'PScribo Example 21' { <# Styling can also be applied to tables - just like Paragraphs and Sections. Tables support additional styling options such as borders and cell ...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example15.ps1
Example15.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example15 = Document -Name 'PScribo Example 15' { <# You can optionally set the width of all columns by using the -ColumnWidths parameter on the 'Table' cmdlet. NOTE: You can only spec...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example28.ps1
Example28.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example28 = Document -Name 'PScribo Example 28' { <# Custom styling can also be applied to individual cells within a table. To flag an individual object property to apply a different style, an ad...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example14.ps1
Example14.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example14 = Document -Name 'PScribo Example 14' { <# By default, tables are configured to 100% of available width and to autofit the table's cell contents. You can override the table width, by sp...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example10.ps1
Example10.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example10 = Document -Name 'PScribo Example 10' { <# PScribo supports insertion of tables into a document. In it's simplest form, a collection of objects can be added to a document by using the 'Ta...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example27.ps1
Example27.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example27 = Document -Name 'PScribo Example 27' { <# Custom styling can also be applied to rows of one or more hashtables. The following defines a custom style that we will apply to particular ...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example07.ps1
Example07.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example7 = Document -Name 'PScribo Example 7' { <# Sections support automatic numbering, i.e. PScribo will automatically generate the section numbers/levels based on the nesting. To turn this on, u...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example13.ps1
Example13.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example13 = Document -Name 'PScribo Example 13' { <# To override the column headers, the -Columns and -Headers parameters can be used together. The -Headers parameter specifies the hea...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example24.ps1
Example24.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example24 = Document -Name 'PScribo Example 24' { <# The following example combines the creation of multiple custom styles with the definition of a custom table style. The custom "BlueZebra" tabl...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Demo02.ps1
Demo02.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; <# The document name is used in the file output #> $document = Document 'PScribo Demo 2' -Verbose { <# Enforce uppercase section headers/names Enable automatic section numbering Set the page siz...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example11.ps1
Example11.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example11 = Document -Name 'PScribo Example 11' { <# As the 'Table' keyword supports pipeline input, you can use the standard Powershell Sort-Object, Group-Object, Select-Object and Where-Object ...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example09.ps1
Example09.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example9 = Document -Name 'PScribo Example 9' { DocumentOption -EnableSectionNumbering -MarginTopAndBottom 72 -MarginLeftAndRight 54 TOC -Name 'Table of Contents' <# PScribo supports multiple t...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example19.ps1
Example19.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example19 = Document -Name 'PScribo Example 19' { <# Column widths can also be specified on -List tables. The total of the column widths must still total 100 (%), but only 2 widths are supported....
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example08.ps1
Example08.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example8 = Document -Name 'PScribo Example 8' { DocumentOption -EnableSectionNumbering -MarginTopAndBottom 72 -MarginLeftAndRight 54 <# A table of contents can be inserted into the document with the...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example26.ps1
Example26.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example26 = Document -Name 'PScribo Example 26' { <# There may be occassions when you need to highlight rows within a table. Before styling can be applied to a row (other than the table row and a...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example18.ps1
Example18.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example18 = Document -Name 'PScribo Example 18' { <# If you need to list an object's or hashtable's values in a list format, you can specify the -List parameter on the 'Table' cmdlet. Rather than...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example29.ps1
Example29.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example29 = Document -Name 'PScribo Example 29' { <# Custom styling can also be applied to individual keys of one or more hashtables. To apply a style to a particular hashtable key, ju...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example23.ps1
Example23.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example23 = Document -Name 'PScribo Example 23' { <# By default, PScribo adds padding to each table cell within a table. Different amounts of padding can be applied to the top, right, bottom and ...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example12.ps1
Example12.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example12 = Document -Name 'PScribo Example 12' { <# The 'Table' cmdlet supports filtering of object properties by using the -Columns parameter. The -Columns parameter specifies the object proper...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Demo01.ps1
Demo01.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; <# The document name is used in the file output #> $document = Document 'PScribo Demo 1' -Verbose { TOC -Name 'Table of Contents'; PageBreak; <# WARNING: Microsoft Word will include paragraphs...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example25.ps1
Example25.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example25 = Document -Name 'PScribo Example 25' { <# The following example combines the creation of multiple custom styles with the definition of a custom table style. The custom "BlueZebra" tabl...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example30.ps1
Example30.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example30 = Document -Name 'PScribo Example 30' { <# When sending PScribo output as a HTML email body, Outlook does not necessarily display the page styling/look-and-feel correctly. This can be s...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example01.ps1
Example01.ps1
<# From Powershell v3 onwards, the module should not need to be explicitly imported. It is included here to avoid any ambiguity. #> Import-Module PScribo -Force; <# We create a PScribo document with the 'Document' cmdlet. Inside the supplied script block, you can include any standard Powershell...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example20.ps1
Example20.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example20 = Document -Name 'PScribo Example 20' { <# Hashtables can also be used in -List view along with the -Width and -ColumnWidths parameters. The following example creates three t...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example22.ps1
Example22.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example22 = Document -Name 'PScribo Example 22' { <# A grid can be applied to a table by setting the -BorderWidth parameter. The border width is specified in points (pt). NOTE: Table b...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example04.ps1
Example04.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example4 = Document -Name 'PScribo Example 4' { Paragraph 'The default built-in style that is applied to paragraphs is named "Normal".' Paragraph 'You can apply an alternative color to a particular paragraph ...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example03.ps1
Example03.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; Document -Name 'PScribo Example 3' { <# By default, a PScribo document will default to an A4 page size. The default top and bottom pages margins are configured at 25.4mm (or 1 inch). The default ...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example05.ps1
Example05.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example5 = Document -Name 'PScribo Example 5' { <# Rather than specifying styling options on individual paragraphs, PScribo supports defining (or overriding the default styles) with your own. Cre...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example16.ps1
Example16.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example16 = Document -Name 'PScribo Example 16' { <# If you do not have a collection/array of objects that you wish to create a table from, PScribo supports creating a table from single ordered h...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example06.ps1
Example06.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example6 = Document -Name 'PScribo Example 6' { <# You can create a document structure with the 'Section' cmdlet. This is the only PScribo cmdlet that supports nesting of script blocks. S...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example17.ps1
Example17.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example17 = Document -Name 'PScribo Example 17' { <# To create a multi-row table from hashtables, simply create a collection/ array of ordered hashtables. NOTE: You must ensure that th...
PowerShellCorpus/PowerShellGallery/PScribo/0.7.15.63/Examples/Example02.ps1
Example02.ps1
param ([System.Management.Automation.SwitchParameter] $PassThru) Import-Module PScribo -Force; $example2 = Document -Name 'PScribo Example 2' { Paragraph 'This is an example that adds a single paragraph to the document that will be styled with the default style.' } <# Once we have a reference to a P...
PowerShellCorpus/PowerShellGallery/HipChatAdmin/1.1/Private/FormatCasedName.ps1
FormatCasedName.ps1
#requires -version 5 <# .SYNOPSIS Formats a first or last name. .DESCRIPTION This function will properly format a first or last name by ensuring that the first letter is a capital letter, and the other letters are lowercase. This function will strip out any spaces or special characters. .PARAMETER Nam...
PowerShellCorpus/PowerShellGallery/HipChatAdmin/1.1/Public/Remove-HipchatUserFromRoom.ps1
Remove-HipchatUserFromRoom.ps1
#requires -version 5 <# .SYNOPSIS Removes a HipChat user from a HipChat room. .DESCRIPTION Removes an existing HipChat user from an existing HipChat room. .PARAMETER MentionName Required: The user's mention name (@name). .PARAMETER RoomName Required: The name of the room. .PARAMETER ApiToken Required:...
PowerShellCorpus/PowerShellGallery/HipChatAdmin/1.1/Public/Send-HipchatMessage.ps1
Send-HipchatMessage.ps1
#requires -version 5 <# .SYNOPSIS Sends a message to a HipChat room. .DESCRIPTION Sends a message to a HipChat room. The message will always display as the user whom the API Token belongs to. If this will be used by an application or automated script, a dedicated user and API Token should be create...
PowerShellCorpus/PowerShellGallery/HipChatAdmin/1.1/Public/New-HipchatRoom.ps1
New-HipchatRoom.ps1
#requires -version 5 <# .SYNOPSIS Creates a new HipChat room. .DESCRIPTION Creates a new HipChat room using HipChat's API. The room is made public by default, but can be optionally made private. .PARAMETER Name Required: The name of the room. .PARAMETER Private Optional: Rooms are made public by defau...
PowerShellCorpus/PowerShellGallery/HipChatAdmin/1.1/Public/Remove-HipchatRoom.ps1
Remove-HipchatRoom.ps1
#requires -version 5 <# .SYNOPSIS Removes an existing HipChat room and kicks all users. .DESCRIPTION Removes an existing HipChat room using HipChat's API. If there are any users in the room, they will automatically be removed from the room. .PARAMETER Name Required: The name of the room. The name must...
PowerShellCorpus/PowerShellGallery/HipChatAdmin/1.1/Public/New-HipchatUser.ps1
New-HipchatUser.ps1
#requires -version 5 <# .SYNOPSIS Creates a new HipChat user account. .DESCRIPTION Creates a new HipChat user account using HipChat's API. The mention name is the user's first name and last name by default, but a custom mention name can be provided. .PARAMETER FirstName Required: The user's first name....
PowerShellCorpus/PowerShellGallery/HipChatAdmin/1.1/Public/Add-HipchatUserToRoom.ps1
Add-HipchatUserToRoom.ps1
#requires -version 5 <# .SYNOPSIS Adds a HipChat user to a HipChat room. .DESCRIPTION Adds an existing HipChat user to an existing HipChat room. .PARAMETER MentionName Required: The user's mention name (@name). .PARAMETER RoomName Required: The name of the room. .PARAMETER ApiToken Required: Your HipC...
PowerShellCorpus/PowerShellGallery/HipChatAdmin/1.1/Public/Remove-HipchatUser.ps1
Remove-HipchatUser.ps1
#requires -version 5 <# .SYNOPSIS Removes an existing HipChat user account. .DESCRIPTION Removes an existing HipChat user account using HipChat's API. This cmdlet accepts the e-mail address or mention name (@ name) of the user. .PARAMETER MentionName Required: The user's mention name (@ name). .PARAM...
PowerShellCorpus/PowerShellGallery/HipChatAdmin/1.1/Public/Get-HipchatUser.ps1
Get-HipchatUser.ps1
#requires -version 5 <# .SYNOPSIS Returns a list of all HipChat users. .DESCRIPTION Returns a list of all existing HipChat user accounts. .PARAMETER ApiToken Required: Your HipChat API Token. You can obtain an API Token from the HipChat website by navigating to Account Settings > API Access. .NOTES Ver...
PowerShellCorpus/PowerShellGallery/Emojis/0.1/tests.ps1
tests.ps1
#Get-UnicodeEmoji -
PowerShellCorpus/PowerShellGallery/TestPhoneNumber/1.0/PhoneNumber.Tests.ps1
PhoneNumber.Tests.ps1
Describe "Testing function Test-PhoneNumber" { Import-Module $PSScriptRoot\TestPhoneNumber.psm1 -Force It "should not validate phone numbers of the wrong length (1)" { $actual = Test-PhoneNumber 1 $actual | Should Be $false } It "should not validate phone numbers of the wrong...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDCharacterStyle.Tests.ps1
New-MDCharacterStyle.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") . "$here\$sut" Describe "New-MDCharacterStyle" { It "-Style Bold" { $text="Bold characters" New-MDCharacterStyle -Text $text -Style Bold | Should Be "**$text...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDList.Tests.ps1
New-MDList.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") . "$here\$sut" $newLine=[System.Environment]::NewLine Describe "New-MDList" { It "-Lines is null" { {New-MDList -Lines $null} | Should Throw "because it is null." ...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDInlineCode.ps1
New-MDInlineCode.ps1
<# .SYNOPSIS This commandlet output inline code in markdown syntax .DESCRIPTION This commandlet output inline code in markdown syntax by wrapping the text in ` .PARAMETER Text Any text .EXAMPLE New-MDInlineCode -Text "Inline Code" "Inline Code" | N...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDTable.ps1
New-MDTable.ps1
<# .SYNOPSIS This commandlet output a table in markdown syntax .DESCRIPTION This commandlet output quote in markdown syntax by adding a two rows for the header and then one line per entry in the array. .PARAMETER Object Any object .PARAMETER NoNewLine Contr...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDCode.Tests.ps1
New-MDCode.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") . "$here\$sut" $newLine=[System.Environment]::NewLine Describe "New-MDCode" { It "-Lines is null" { {New-MDCode -Lines $null} | Should Throw "because it is null." ...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDParagraph.ps1
New-MDParagraph.ps1
<# .SYNOPSIS This commandlet output paragraph in markdown syntax .DESCRIPTION This commandlet output paragraph in markdown syntax .PARAMETER Lines An array of lines to paragraph in markdown .PARAMETER NoNewLine Controls if a new line is added at the end of ...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDInlineCode.Tests.ps1
New-MDInlineCode.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") . "$here\$sut" Describe "New-MDInlineCode" { It "-Text provided" { $expected="``Inline``" New-MDInlineCode -Text "Inline" | Should Be $expected "Inl...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDLink.Tests.ps1
New-MDLink.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") . "$here\$sut" Describe "New-MDLink" { It "-Title not specified" { $link="http://example.com" $expected="[Link]($link)" New-MDLink -Text "Link" -Lin...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDLink.ps1
New-MDLink.ps1
<# .SYNOPSIS This commandlet output link in markdown syntax .DESCRIPTION This commandlet output link in markdown syntax like this [text](link "title") .PARAMETER Text Text of the link .PARAMETER Link The link .PARAMETER Title The title of ...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDTable.Tests.ps1
New-MDTable.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") . "$here\$sut" $VerbosePreference="SilentlyContinue" $newLine=[System.Environment]::NewLine Describe "New-MDTable" { It "-Object is null" { {New-MDTable -Object $null...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDCode.ps1
New-MDCode.ps1
<# .SYNOPSIS This commandlet output code block in markdown syntax .DESCRIPTION This commandlet output code blocke in markdown syntax by wrapping around ``` .PARAMETER Lines An array of lines to code block in markdown .PARAMETER Style The style of code. e.g...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDParagraph.Tests.ps1
New-MDParagraph.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") . "$here\$sut" $newLine=[System.Environment]::NewLine Describe "New-MDParagraph" { It "-Lines is null" { New-MDParagraph | Should Be ($newLine+$newLine) } ...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDList.ps1
New-MDList.ps1
<# .SYNOPSIS This commandlet output list in markdown syntax .DESCRIPTION This commandlet output list in markdown syntax. Depending if the list is unordered or ordere, the '- ' or '1. ' is added in front of each line .PARAMETER Lines An array of lines to make a list in mark...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDQuote.ps1
New-MDQuote.ps1
<# .SYNOPSIS This commandlet output quote in markdown syntax .DESCRIPTION This commandlet output quote in markdown syntax by adding a '> ' in front of each line .PARAMETER Lines An array of lines to quote in markdown .PARAMETER Level The level of quote ...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDImage.ps1
New-MDImage.ps1
<# .SYNOPSIS This commandlet output image in markdown syntax .DESCRIPTION This commandlet output image in markdown syntax like this ![alt text](link "title") .PARAMETER Source Text that represents the image source .PARAMETER Title The title of the image ...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDImage.Tests.ps1
New-MDImage.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") . "$here\New-MDLink.ps1" . "$here\$sut" Describe "New-MDImage" { Context "Parameter set Source" { It "-Title not specified & -AltTitle not specified" { ...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDCharacterStyle.ps1
New-MDCharacterStyle.ps1
<# .SYNOPSIS This commandlet output bold, italic or strikethrough in markdown syntax .DESCRIPTION This commandlet output bold, italic or strikethrough in markdown syntax by wrapping the text in **, * or ~~ respectively. .PARAMETER Text Any text .PARAMETER Style ...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDQuote.Tests.ps1
New-MDQuote.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") . "$here\$sut" $newLine=[System.Environment]::NewLine Describe "New-MDQuote" { It "-Lines is null" { {New-MDQuote -Lines $null} | Should Throw "because it is null." ...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDHeader.Tests.ps1
New-MDHeader.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") . "$here\$sut" $newLine=[System.Environment]::NewLine Describe "New-MDHeader" { It "-Level not provided" { $expected="# This is an H1" + $newLine (New-MDHea...
PowerShellCorpus/PowerShellGallery/MarkdownPS/1.4/New-MDHeader.ps1
New-MDHeader.ps1
<# .SYNOPSIS This commandlet output header in markdown syntax .DESCRIPTION This commandlet output header in markdown syntax by adding a '# ' .PARAMETER Text Any text .PARAMETER Level The level of header .PARAMETER NoNewLine Controls if a ne...
PowerShellCorpus/PowerShellGallery/Octoposh/0.6.9/OctoposhBootstrapper.ps1
OctoposhBootstrapper.ps1
##This script will get executed everytime the module gets imported $env:OctoposhModulePath = $PSScriptRoot $env:NugetRepositoryURL = "https://packages.nuget.org/api/v2" #"C:\Github\OctoPosh\Octoposh.Tests\TestAssets\Repository"
PowerShellCorpus/PowerShellGallery/xXMLConfigFile/2.0.0.0/Test/xXMLConfigFile.Integration.Tests.ps1
xXMLConfigFile.Integration.Tests.ps1
Import-Module $PSScriptRoot\..\DSCResources\xXMLConfigFile\xXMLConfigFile.psm1 #this function was taken from xExchange module function Test-AllTargetResourceFunctions { [CmdletBinding()] param([Hashtable]$Params, [string]$ContextLabel, [Hashtable]$ExpectedGetResults, [bool]$ExpectedTestResult = $true) ...
PowerShellCorpus/PowerShellGallery/xXMLConfigFile/2.0.0.0/Misc/New-XMLConfigFileResource.ps1
New-XMLConfigFileResource.ps1
$ConfigPath = New-xDscResourceProperty -Name ConfigPath -Type String -Attribute Key -Description 'Path to config file' $XPath = New-xDscResourceProperty -Name XPath -Type String -Attribute Key -Description 'XPath to use' $Name = New-xDscResourceProperty -Name Name -Type String -Attribute Key -Description 'Name of the...
PowerShellCorpus/PowerShellGallery/xXMLConfigFile/2.0.0.0/Examples/AddRemoveModifyAttributeNode/AddRemoveModifyAttributeNode.ps1
AddRemoveModifyAttributeNode.ps1
configuration AddRemoveModifyAttributeNode { param ( [string[]]$NodeName = 'localhost' ) Import-DscResource -Module xXMLConfigFile Node $NodeName { #ensure node with attribute SmtpSendLogFlushInterval exists and has specified value XMLConfigFile SMTPSendFlus...