Powershell 2 scripts Execution

  1. Posts : 1

    Powershell 2 scripts Execution

    I'm tryng to run the following ps1 script

        PowerShell (New-Object System.Net.WebClient).DownloadFile('https://server/file1.ps1','file1.ps1');Start-Process 'file1.ps1'
        PowerShell (New-Object System.Net.WebClient).DownloadFile('https://server/file2.ps1','file2.ps1');Start-Process 'file2.ps1'

    but I'm getting no output

    How can I do download and execute file1.ps1 and after that file2.ps1

    Thank you
      My Computer

  2. Posts : 16,895
    Windows 10 Home x64 Version 22H2 Build 19045.4170

    For the Start-Process bits, see the guidance and examples in
    Start-Process - SS64
    Start-Process - MSDocs
    so you can add the -FilePath qualifier.

    If you rummage around those sites you'll probably find some guidance on the download part of the job aswell.

      My Computer


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 09:13.
Find Us

Windows 10 Forums