lib/rouge/demos/powershell in rouge-3.5.1 vs lib/rouge/demos/powershell in rouge-3.6.0
- old
+ new
@@ -1,49 +1,13 @@
-Function Get-IPv4Scopes
-<#
- .SYNOPSIS
- Read IPv4Scopes from an array of servers
- .PARAMETER Servers
- Specifies an array of servers
- .EXAMPLE
- Get-IPv4Scopes
-
- Will prompt for all inputs
-#>
+function Verb-Noun
{
- [CmdletBinding()]
- Param(
- # 1
- [parameter(
- Mandatory=$true,
- Position=0,
- ValueFromPipelineByPropertyName=$true,
- HelpMessage="Server List"
- )]
- [string[]]$Servers,
- #2
- [parameter(Mandatory=$false,ValueFromPipeline=$false)]
- [bool]$Unique=$false
- ) #EndParam
+ <#
+ .SYNOPSIS
+ Tells you what it does
- Begin {}
-
- Process {
- $arrayJobs=@()
- foreach ($server in $Servers) {
- $arrayJobs+=Invoke-Command -ComputerName $server -scriptblock {Get-DhcpServerv4Scope} -AsJob
- }
- $complete=$false
- while (-not $complete) {
- $arrayJobsInProgress= $arrayJobs | Where-Object { $_.State -match 'running' }
- if (-not $arrayJobsInProgress) { $complete=$true }
- }
- $Scopes=$arrayJobs|Receive-Job
- $UniqueScopes=$Scopes|Sort-Object -Property ScopeId -Unique
- }
-
- End {
- if ($Unique) { return $UniqueScopes }
- else { return $Scopes }
- }
-
-} #end function
+ .DESCRIPTION
+ Tells you what it does with more detail.
+ #>
+ param ([string]$Name, [string]$Extension = "txt", [string]$foo="bar")
+ $name = $name + "." + $extension
+ $name
+}