Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

passing arg to functions

$
0
0

I have the following defined at the top of my Function

 

functionUninstall-Software
{
param
(
[string]
$ComputerName='',

[string]
$RemoveSoftware=''
)
when I type get-help Uninstall-Software it says this:
PS C:\> get-helpUninstall-Software

NAME
Uninstall-Software

SYNTAX
Uninstall-Software [[-ComputerName] <string>] [[-RemoveSoftware] <string>]
yet when I try to run this from a command line only -ComputerName shows in the popup window.   how come it does not know what -RemoveSoftware is?
Thanks.  

Viewing all articles
Browse latest Browse all 6937

Trending Articles