Hi all,
I am a beginner with powershell. I created a MyPoweshell.ps1 file as follows:
MyFunction1
MyFunction2
Function MyFunction1 {
}
Function MyFunction2{
}
1) When creating a .cmd file to run the script nothing seems to work except if I typed in the cmd console: Import-Module .\MyPoweshell.ps1. But if I save that code in .cmd and double click the cmd it immediately close. How to run powershell from cmd by double click on it without closing the screen ?
2) Trying to make a clickable shortcut that shows in .cmd but nothing works. Example : C:...\Program Files\MyFolder. How to create a clickable shortcut ?
I appreciate any help. Thanks.