Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 156 Vote(s) - 3.51 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to launch PowerShell script from the OS command line?

#1
I have a PowerShell script for building my project files, and I'd like to have capability to run it from my file manager's command line (and, possibly, make a shortcut to this script so I can start build from my desktop)
Any way to do this?
Reply

#2
If you're on PowerShell 2.0 use:

PowerShell.exe -File c:\users\john\myscript.ps1

If you're on 1.0 use:

PowerShell -Command "& {c:\users\john\myscript.ps1}"

Depending on what you do/load in your profile script you may also want to specify `-NoProfile`. Of course, if your script requires something that is loaded in your profile then don't use this parameter. Otherwise, it can speed up execution of your script a bit.
Reply

#3
invoke-command -computername -scriptblock{param()} -ArgumentList
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through