1 You can use –host instead of –computername when running the function. 2  This parameter is mandatory. 3  If someone runs the function without providing a computer name, the shell will prompt them to enter one or more. 4  The second parameter, $logname, is a simpler parameter.5  It just accepts a string value. The function name should look like a cmdlet name, starting with one of the commonly used Windows PowerShell verbs like “Get” and ending with a singular noun. 2  Fill in the comment-based help.