Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7768125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:50:30+00:00 2026-06-01T15:50:30+00:00

I am trying to setup my PowerShell command, so the Get-Help -full will show

  • 0

I am trying to setup my PowerShell command, so the Get-Help -full will show complete information about how to run my script. I have default values that I want to display in this help. I have the following:

<#
    .PARAMETER SenderEmail
    The name of the user who is sending the email message. Although not
    officially required, it will be checked to make sure it's not blank.
#>

Param (

   [String]
   [Parameter(
        Position=1,
        HelpMessage="Sender's Email Address")]
   $SenderEmail = "bob@fubar.com"
)

Yet, when I type Get-Help -detail, the following shows up.

-SenderEmail <String>
    The name of the user who is sending the email message. Although not
    officially required, it will be checked to make sure it's not blank.

    Required?                    false
    Position?                    2
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?

How do I get the help to show the default value of this parameter?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T15:50:31+00:00Added an answer on June 1, 2026 at 3:50 pm

    I don’t think you can get the default value to display in an advanced function in V2. I’ve even tried [System.ComponentModel.DefaultValueAttribute(“”)] with no luck. However, if it’s any consolation, this appears to work as-is in V3.

    V3 ONLY!!
    PS> Get-Help .\help.ps1 -full
    
    NAME
        C:\temp\help.ps1
    
    SYNOPSIS
    
    SYNTAX
        C:\temp\help.ps1 [[-SenderEmail] <String>] [<CommonParameters>]
    
    
    DESCRIPTION
    
    
    PARAMETERS
        -SenderEmail <String>
            The name of the user who is sending the email message. Although not
            officially required, it will be checked to make sure it's not blank.
    
            Required?                    false
            Position?                    2
            Default value                bob@fubar.com
            Accept pipeline input?       false
            Accept wildcard characters?  false
    
        <CommonParameters>
            This cmdlet supports the common parameters: Verbose, Debug,
            ErrorAction, ErrorVariable, WarningAction, WarningVariable,
            OutBuffer and OutVariable. For more information, see 
            about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 
    
    INPUTS
    
    OUTPUTS
    
    
    RELATED LINKS
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to run a Powershell script without leaving Eclipse IDE so I setup
I'm trying to setup a loop in Wordpress that will show all posts from
Trying to setup Eclispe. The Eclipse help/about/installed software says: Eclipse Platform 3.5.2 Subclipse 1.0.0
im trying to setup sqlite as a secondary adapter and have run into a
I'm trying setup a subset of boost and get it properly compiled using bjam,
Trying to setup and get going with the RestKit library for a cocoa project
I have a powershell cmdlet, and I can't seem to get the parameter sets
Trying to setup my laptop to edit and run my C# application which called
I'm trying to setup a simple has_many :through => association. I have 3 models.
Trying to setup a simple Thread/Poll table mapping. Here is what I have: Threads

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.