Search the Community
Showing results for tags 'ps1'.
-
Trying to automate the sideload of a Windows Store app via .ps1 script... RunWait(@ComSpec & ' /c' & 'C:\"WB Resources"\APP_Prod\Add-AppDevPackage.ps1') Above doesn't work... I assume this is trying to open in CMD. Normally we right click the .ps1 and open with powershell, then we have to type "A" to start the install, it installs and then type any yet to exit. However I cant get the powershell to even open. Kind of puzzled here, any suggestions would be a help. PS I also tried to convert the .ps1 to exe, but that was a huge failure... lol
- 25 replies
-
- ps1
- power shell
-
(and 3 more)
Tagged with:
-
Hey Guys, I am almost there but feel I am missing something that is right in front of me and need another set of eyes. I am trying to run the following powershell file with the following parameters. This works in powershell just fine. Reset-LocalAdminPassword.ps1 -Password $secureString I created an autoit script to do a few other things but from venturing in the forums I found some code and did the following: ;THIS COMMAND WILL RUN THE powershell script $iDir = "C:\test\script\Reset-LocalAdminPassword.ps1" Run('cmd /k C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File ' & '"' & $iDir & '-Password $secureString') Sleep(15000) The problem is that when it runs it gives me a message that C:\test\script\Reset-LocalAdminPassword.ps1-Password $secureString' is not a valid ps1 file. I cannot seem to get it to run the ps1 file with the -Password $secureString' parameter. It keeps cobining the ps1 path and the parameters all as one. I am sure this is something I am overlooking but I have been battling with this for a few hours now and just don't know what I am missing.