Write BluGenieVerboseMsg
Write-BluGenieVerboseMsg is used to display Time Stamped, Verbose Messages to the screen
Write-BluGenieVerboseMsg [[-Message] <String>] [-Color <String>] [-Status <String>] [-CheckFlag <String>] [-ClearTimers] [-Walkthrough] [<CommonParameters>]
Write-BluGenieVerboseMsg is used to display Time Stamped, Verbose Messages to the screen
You can view overall progress, elapsed time from one message to the next, change color and even check for an existing flag before displaying the message.
Command: $null = Write-BluGenieVerboseMsg -ClearTimers
Description: Clear global tracking time stamps
Notes: If you don't pass it to $null you will get a $true/$false when the process has ran
Command: Write-BluGenieVerboseMsg -Message "Starting" -Color 'Yellow' -Status 'StartTimer' -CheckFlag MyVerboseParam
Description: Setup the 1st overall message and timestamp with a message in Yellow, only if MyVerboseParam variable either (Exists or is $true)
Notes: If -CheckFlag is used the variable name (not the variable - no dollar sign) needs to be set. If the variable is true or exists the message will show,
if the variable is either false or doesn't exists the message will not show
Command: Write-BluGenieVerboseMsg -Msg "Running a Sub Task" -Color 'Cyan' -Status 'StartTask'
Description: Start a new timestamp track, with a message in Cyan
Notes:
Command: Write-BluGenieVerboseMsg -Msg "Just another message" -Color 'White' -Status '....'
Description: Send a generic message in White, elasped time is based on the last StartTask Timestamp
Notes:
Command: Write-BluGenieVerboseMsg -Msg "Just another message 2" -Color 'White' -Status '....'
Description: Send a 2nd generic message in White, elasped time is based on the last StartTask Timestamp
Notes:
Command: Write-BluGenieVerboseMsg -Message "Stopping Sub Task" -Color 'Yellow' -Status 'StopTask'
Description: Stop and Reset the timestamp block, and display a message in Yellow
Notes:
Command: Write-BluGenieVerboseMsg -Msg "Stopping" -Color 'Yellow' -Status 'StopTimer' -CheckFlag MyVerboseParam
Description: Stop and Reset the timestamp block, remove all global time stamps, and display a message in Yellow, only if MyVerboseParam variable either (Exists or is $true)
Notes: If -CheckFlag is used the variable name (not the variable - no dollar sign) needs to be set. If the variable is true or exists the message will show,
if the variable is either false or doesn't exists the message will not show
Command: Write-BluGenieVerboseMsg -Help
Description: Call Help Information
Notes: If Help / WalkThrough is setup as a parameter, this script will be called to setup the Dynamic Help Menu if not the normal Get-Help will be called with the -Full parameter
Command: Write-BluGenieVerboseMsg -WalkThrough
Description: Call Help Information [2]
Notes: If Help / WalkThrough is setup as a parameter, this script will be called to setup the Dynamic Help Menu if not the normal Get-Help will be called with the -Full parameter
-Message <String>
Description: Message to display
Notes:
Alias: Msg
ValidateSet:
Required? false
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Color <String>
Description: Select the Color of the output
Notes: Default value is ( White )
Alias:
ValidateSet: 'Black','Blue','Cyan','DarkBlue','DarkCyan','DarkGray','DarkGreen','DarkMagenta','DarkRed','DarkYellow','Gray','Green','Magenta','Red','White','Yellow'
Required? false
Position? named
Default value White
Accept pipeline input? false
Accept wildcard characters? false
-Status <String>
Description: Set the type of Message
Notes: The elapsed time from one message to another depends on what Status type you select. The default value is '....' for generic, continued messaging
Alias:
ValidateSet: 'StopTimer','StartTimer','....','StartTask','StopTask'
Required? false
Position? named
Default value ....
Accept pipeline input? false
Accept wildcard characters? false
-CheckFlag <String>
Description: CheckFlag will allow you to check to see if another variable is either True/False or Exists/Not Exists.
Notes: This will allow you to show messages based on another set action.
Alias:
ValidateSet:
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ClearTimers [<SwitchParameter>]
Description: Clear the global tracking time stamps
Notes:
Alias:
ValidateSet:
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Walkthrough [<SwitchParameter>]
Description: Start the dynamic help menu system to help walk through the current command and all of the parameters
Notes:
Alias: Help
ValidateSet:
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Last modified 1yr ago