What's the standard header in PowerShell scripts (documentation)?

Can anyone tell me what the "standard header" that I see in a lot of PowerShell scripts is all about? I have been unable to find any explanation so far.
Here's a snippet:
<#
.SYNOPSIS
Counts the Grateful Dead shows in my archives
.DESCRIPTION
This script looks at my GD archive, and uses folder names to
determine show type (aud, sbd, etc), and checks to see what
shows have checked MD5s
.NOTES
File Name : count-gdshows.ps1
Author : Thomas Lee - [email protected]
Requires : PowerShell V2 CTP3
.LINK

The help data can be used inside a function body or in a script. A script is not much different than a function, actually you can think of it as a function *without* a name, the name is the script name. You can a function like:
function foo
<# 
.SYNOPSIS 
    Counts the Grateful Dead shows in my archives
#>
   param($a,$b)
   $a+$b
And execute it like:
foo -a 3  -b 4
or write the function body in a script file called foo.ps1 :
## foo.ps1 ##
<# 
.SYNOPSIS 
    Counts the Grateful Dead shows in my archives
#>
   param($a,$b)
   $a+$b
and execute it like so:
.\foo.ps1 -a 3 -b 4
they give the same output. Windows 7 is goiung to RTM soon and as you probably know PowerShell v2 ships with it, so you can switch to v2 in the very near future. I'm working with v2 since the CTP versions (on my production machine) and it is working very good, lots of new exiting stuff!
As for functions vs scripts... it depends. On my personal machine I save my functions in various ways. I categorize them and save each bunch in a seperate script file (i.e. utilities.ps1, exchange.ps1, ad.ps1 etc). Some files I use more on a regular basis so I dot-source them in my profile, other scripts I load when I need. v2 introduced a module concept so the next evolution of my script files will turn into modules.  I also implement some functions in ps1xml files, these are used to extend objects , via PowerShells' Extended Type System (ETS), you can find an example on my blog (http://blogs.microsoft.co.il/blogs/scriptfanatic/archive/2009/05/31/getting-certificates-expiration.aspx).
Shay Levy [MVP]
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar

Similar Messages

  • What is the use of read_text in scripts?

    hi
    what is the use of read_text in scripts?

    HI,
    in genral read_text FM is used to display the Text maintained in standardtransactions like ME21n/ va01 ,,, if u wanna display this text, u shud use READ_TEXT by passing th erelavnt parametsr like object, id, text, lang.
    in case o f scripts, there is no need to call this FM, when u r including the standard text using menu--include -standard text, here u shud give the object, id, text, lang..(this is simialr to standard text) then script will display the text mainatined in the standard transactions.
    Regards,
    Naveen

  • What are the standard Solutions available for Complaints Management in CRM?

    Dear all,
    What are the standard solutions available in SAP CRM to receive and process complaints through Customer Interaction Center.
    Our requirement is to receive and register complaints from contact center and process them by integrating back end ECC and BIW systems.
    As per my understanding we can not integrate ECC transactions in CASE Management while CASES are being created through Interaction Center.
    Please help me to map the following requirement successfully into SAP.
    How to register the complaint through Interaction Center?
    How this complaint information is communicated in back end ECC system?
    How to track the status and solution of the complaint available in back end ECC system?
    How the complaints are stored in ECC system?
    After creation of a complaint, can we trigger an automatic email on back end ECC system user with all complaint relevant data?
    Kindly help me to understand the process.
    Best regards,
    Raghu ram.

    You can analyse this [link |http://help.sap.com/saphelp_crm60/helpdata/en/68/691976cd2ef845a4e62437a82b67df/frameset.htm]for more information. Additionaly the tree hierarchy links contain some process flows where it explains you briefly the big picture of the process, in standard SAP CRM Complaint Manaagement Scenario.
    BR,
    Cenk Sezgin

  • What is the STANDARD Web Template in BI 7.0?

    Hello guys,
    Do you know what is the Standard Web Template in BI 7.0?
    Today we only use Workbooks and the java is already installed.
    Do we have to do some configuration in this Web template for our first execution?
    Thank you,
    Carlos Edaurdo

    Hi,
      0ANALYSIS_PATTERN is the standard Web template for the BI Queries when executed through Web.
      We can copy this template to a Ztemplate and make the changes necessory based on project need and can be assigned
      as default  in Configuration settings .
    Thanks,
    Prakash

  • What are the standard IDOC's available in IDES? where can i see in IDES?

    Dear All,
    Can any body let me know what are the standard IDOC's available in IDES? What is the path for the same?
    Thanks in advance for replies
    regards
    srikanth

    Hi,
    IDOCs are intermediatery Documents, we can check for IDOCS using Tcode
    WE01 : Create IDOC
    WE02 : Display IDOC
    WE19 : Reprocess IDOC
    etc
    Thanks
    Kalyan

  • Invoice list: What is the standard setting for output type LR00 ?

    Hello all,
    They have messed up our system. What are the standard settings for output type LR00 ?
    Program RVADIL01,
    Form ??
    Thanks
    Rad

    Dear Rad,
    > Program RVADIL01,
    > Form - SD_INVOICE_LIST
    Thanks,
    Raja

  • What are the standard functions in XI ?

    What are the standard functions in XI ?

    Hi,
    The target field mapping is possible by using below typs of functions
    1. Standard functions
    2. Runtime procedure
    3. User Defined functions
    Standard functions are the APIs provided in Graphical mapping to process the values of the fields used for target field mapping.
    Technically all these values are trated as string thus all standard functions expect strings as input argument and string as an export aurgument
    Please find here with you more details about it at below link
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm
    2. Runtime procedure
    http://help.sap.com/saphelp_nw04/helpdata/en/3d/24e15bf9d79243b45d49b13b03de8f/content.htm
    3. User Defined functions
    http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm
    Thanks
    Swarup

  • What is the standard class used to create SALES ORDER in SAP CRM?

    Hello Experts,
    Can anyone suggest me what is the standard class used for creating sales order.
    I have created sales order using the BAPI 'BAPI_SLSTRANSACT_CREATEMULTI' in my report program.
    Now, I have to create sales order using standard classes and methods(my assignment).
    Please suggest the suitable class.
    Regards
    DNR Varma

    Hi Varma,
    You can create crm documents like sales order using BOL interfaces.
    You can check one example at the following thread:
    Create OrderThro BOL
    Check if it helps you a little more.
    Kind regards,
    Garcia

  • What is the standard print prg for Purchase Order

    Hi,
    I am working on forms, what is the standard print program for purchase order.
    Already i have gone to nace and found that the program assigned to the customized print prg, so i am not able to find out the print program, so can u tell me how to solve it.
    Regards,
    clara

    Here are the default entries in the configuration
    NEU     Purchase order     1     SAPFM06P     ENTRY_NEU     MEDRUCK
    NEU     Purchase order     2     SAPFM06P     ENTRY_NEU     MEDRUCK
    NEU     Purchase order     6     RSNASTED     EDI_PROCESSING
    NEU     Purchase order     A     RSNASTED     ALE_PROCESSING
    Regards,f
    Ravi
    Note : Please mark the helpful answers

  • What does the standard program  RFBIBL00    does?

    what does the standard program  RFBIBL00    does?

    Hi Bharath
    Accounting Documents: Data Transfer Workbench
    Definition
    Transferring FI accounting documents from an external system into the SAP System using program RFBIBL00.
    Use
    You use program RFBIBL00 to enter accounting documents and to clear open items.
    Method
    Program RFBIBL00 primarily transfers accounting documents using the batch input method. However, you can also generate documents immediately using call transaction or direct input by means of the "Data transfer type" parameter. Both of these procedures lead to improvements in system performance when transferring large quantities of data (more than 10,000 transactions).
    Object-Specific Settings
    With call transaction or direct input, documents are posted immediately to the SAP System. As a result, you need to ensure that if for any reason the program is terminated, it can be restarted without inconsistencies occurring in the data.
    other information:
    To enhance the batch input procedure, the system offers the direct input technique, especially for transferring large amounts of data. In contrast to batch input, this technique does not create sessions, but stores the data directly. It does not process screens. To enter the data into the corresponding database tables directly, the system calls a number of function modules that execute any necessary checks. In case of errors, the direct input technique provides a restart mechanism. However, to be able to activate the restart mechanism, direct input programs must be executed in the background only. To maintain and start these programs, use program RBMVSHOW or Transaction BMV0.
    Examples for direct input programs are:
      Program        Application
    RFBIBL00         FI
    RMDATIND       MM
    RVAFSS00       SD
    RAALTD11        AM
    RKEVEXT0       CO-PA
    Hope this helps u
    thanks and regards
    suma sailaja pvn

  • What is the standard format of jdbc url?

    Hi,
    What is the standard format fo the
    jdbc url?
    Thanks
    Wasiq

    HI,
    It's well described in help,
    for EP 6.0 and BW 3.5: http://help.sap.com/saphelp_nw04/helpdata/en/27/6c013a53271a05e10000000a11402f/frameset.htm
    for EP 7.0 and BI 7.0 is more difficult, but You have a wizard:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/ef05462480025ae10000000a1553f7/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/33/39fa40ee14f26fe10000000a1550b0/frameset.htm
    Regards,
    Jarek

  • What is the standard method to integreate with AME for the approval process

    I have developed a new OAF page and registered under Employee Self Service menu.
    What is the standard method to integreate with AME for the approval process.
    Appreciate your early response

    Any one used AME with the new OAF pages?
    Please share , how you use AME with OAF page

  • What is the use of labels in scripts?

    What is the use of labels in scripts?
    why it is not possible to create lables in smartforms?
    How can we print different barcodes in scripts and smartfoms?
    Is it possible to create a background logo for a page in script?
    I think we can do this background logo in smartform but in script is it possible?
    Thanks in Advance.
    Regards
    Abhilash.

    1) Labels are used to get
        when u want to do same thing fro diffrent items.
      like when u want to print address for all employess to stick to hike salary envelopes.
    lke when u want price and barcode of matriels to print to metrials.
    2) it is possible to do this in smart form for this we use normal window consept.
    3) and 4) yes it is possible to create background logo in script
    Here is the blog on achieving watermark in SAPScript:
    /people/naimesh.patel/blog/2008/05/22/watermark-in-sapscript

  • What is the standard API for Customer Contact creation in R12

    Hi All,
    What is the standard API for Customer Contact creation in R12. my requirement is I need to create contact against Customer(Person/Organization).
    I need to develop pl/sql package for create Contact using the following fields
    First name , Last name , Email, Phone no, Ph ext,Mobile no,Contact no,Job title, Job title code,Country,Address1,Address2,Address3,Address4,
    City,State,Postalcode.
    Please help me.
    Thanks,
    K.Murugesan

    Hi All,
    Please update if you have any solution.
    Thanks
    Maanasa

  • What is the Standard Procedure to Modify  SAP Delivered BSP Application ?

    Dear Experts what is the standard procedure to modify SAP delivered standard BSP application.
    i need to enhance the cFolder application delivered by SAP, adding new fields to Notification Template. The task essentially boils down to add new field in database table and changing few HTML page content.
    Greetings
    John

    Hi Vivek,
    thanks for the answer. My requirement is to enhance few of  the BSP Views with custom fields, i have figured out the ABAP table that stores the value of input fields displyed. what i am NOT understanding is when i make ZCopy of the views using BSP_CUSTOMIZE & change its UI to include my custom fields..how will the Standard BSP application PICK my zChanged views??
    is there someway i can say to standard SAP BSP to  PICK these Modified Z View ???
    hope i made query clear ??
    Greetings
    John

Maybe you are looking for