I have a powershell script which I call using a .vbs file. This reduces the effort of the user to go to cmd every time,type powershell and then calling the .ps1 file. The vbs script directly opens powershell in a new cmd window calling the ps1 file.
The VB script is:
Set objShell = CreateObject("Wscript.Shell")
objShell.Run("powershell.exe -noexit C:\Scripts\anydrive.ps1")
What I want to achieve now is, Can I embed the .ps1 file inside .vbs file so that I have a single .vbs file which I can circulate to users rather than having 2 separate files.
-commandparameter. Question is though, why don't you just use one or the other...?