Ask:
I want in the script that when you click on the button, powershell is opened and at the same time a command is entered in powershell. How do I have to write the line? Thank you very much for your help
Hello, welcome to the forum. Forums such as these are generally manned by volunteers who help other coders with issues in their code. As such, we donât write full solutions on demand. You may want to look into a pay service such as fiverr, especially if it is âurgent.â If you have some code youâre having trouble with, feel free to post it with specifics about what it does/doesnât do and any errors. Be sure to post it was preformatted code with the </> icon (may be hidden behind the settings gear depending on your screen size/resolution)
Trying to interpret your questionâŚ
If you want a command to run every time you start PowerShell, I suggest doing an internet search for âPowerShell profile scriptâ which is a script that runs every time you launch a PowerShell session. You can add code there to do whatever you need to run when you start a PowerShell session.
If you want a shortcut that runs a specific PS1 script every when you launch it, I suggest doing an internet search for PowerShell command line parameters. That will give you the command line options you can use to set up a shortcut that will run a specific PS1 script.
Hopefully one of those helps.
I use psscriptmenugui for my scripts that I have to run pretty often and I use ps2exe to turn it into an exe and pin it to my taskbar. PowerShell Script Menu Gui is an easy way to launch powershell scripts from a simple GUI. You can modify the gui using a simple .csv file.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.