New
#30
I will not let my simple request turn into a senseless argument. I am done. Do as you please.
I will not let my simple request turn into a senseless argument. I am done. Do as you please.
I fully agree with @Dick. Nothing personal, Matthew, in my books you are a good geek, an asset to our forums. Just expressing my sincere, personal opinion.
Using various colours and fonts is something I do not understand. In my opinion, the best option is just use bold font in [C] or [CODE] tags.
C tags:
Call PowerShell -ExecutionPolicy ByPass -file "D:\Folder_name\File_name.ps1"
CODE tags:
Code:Call PowerShell -ExecutionPolicy ByPass -file "D:\Folder_name\File_name.ps1"
In fact, I have a rule which I have followed all my years here on these forums: I will absolutely not reply to any OPs, who post their request for help in any other font and colour than the forum default. I hate to read these posts, and want nothing to do with an OP who feels that he / she needs some cosmetics to make the post understood.
Kari
Thank you, that worked great. Do you know of a tutorial I can go to to learn how I could make this short little program, for example, run for a user by just clicking an icon?
Create a shortcut with the following target:
RunAs /user:jbooze "CMD /C PowerShell -ExecutionPolicy ByPass -file D:\ABC.ps1"
Change the username, file path, and shortcut icon accordingly.
This is what I entered in the shortcut target box:
RunAs.exe /user:John B "CMD /C PowerShell -ExecutionPolicy ByPass -file C:\Scripts\PowerShell\Microsoft.PowerShellISE_profile.ps1"
When I select Apply it adds this to the shortcut target box and does not work:
C:\WINDOWS\system32\
I tried to add an image, that feature won't work for me. Is it supposed to accept a maximum of 5 per reply?
Thank you.
Last edited by jbooze; 18 Sep 2020 at 08:50. Reason: Add an image
I entered: Powershell.exe -noexit -ExecutionPolicy Bypass -File C:\Scripts\PowerShell\Microsoft.PowerShellISE_profile.ps1 as the target. It then added C:\Windows\System32\WindowsPowerShell\v1.0\ in front of this to make: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -ExecutionPolicy Bypass -File C:\Scripts\PowerShell\Microsoft.PowerShellISE_profile.ps1
Then when I double-clicked it it opened PS and ran the program. Thanks for your help.
You are most welcome.
Ok Kari I am not savvy enough to follow through with any work using the PowerShell command as I am not intelligent to use scripting or coding languages but a good tutorial for those who do