Start-Process throws \"ArgmentList\' exceptiStart-Process -Wait -FilePath \"C:\\Pron

Welcome Forums General PowerShell Q&A Start-Process throws \"ArgmentList\' exceptiStart-Process -Wait -FilePath \"C:\\Pron

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
6 months, 3 weeks ago.

  • Author
    Posts
  • #99774

    Participant
    Points: 0
    Rank: Member

    I used Start-Process cmdlet to un-register a dll from GAC using the following syntax. I ran this cmdlet from powershell command line.

    Start-Process -Wait -FilePath "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil.exe" -ArgumentList '/u', "Microsoft.VisualStudio.TeamFoundation.SharePointReporting"
    
    

    I am getting the following syntax error:

    Start-Process : A positional parameter cannot be found that accepts argument
    'Microsoft.VisualStudio.TeamFoundation.SharePointReporting.dll'.
    At line:1 char:1

    + Start-Process -Wait -FilePath "C:\Program Files (x86)\Microsoft SDKs\ ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Start-Process], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand

  • #99778

    Participant
    Points: 155
    Helping Hand
    Rank: Participant
  • #99786

    Participant
    Points: 0
    Rank: Member

    Thank You it works now. I had to separate parameters with a comma.
    Very kind of you for replying.

The topic ‘Start-Process throws \"ArgmentList\' exceptiStart-Process -Wait -FilePath \"C:\\Pron’ is closed to new replies.