none
Application installtion from MDT

    Question

  • Hi all,

    i have some issue Deploying the application installation in MDT can some one help me.

    Actually as of today i am using customized vbs script install the application from MDT like i am adding vbs script this way Run commadline "cscript.exe install.vbs" it's work forme but in powershell it's not working i have tried this many ways please guide me

    1.

    Quiteinstall command :- powershell.exe ".\Applications\SQL_SERVER_2008_R2_new\test.ps1"

    Working Directoyr: .\Applications\SQL_SERVER_2008_R2_new

    2.

    Quiteinstall command :- powershell.exe test.ps1

    Working Directoyr: .\Applications\SQL_SERVER_2008_R2_new

    3.

    Quiteinstall command :- ./test.ps1

    Working Directoyr: .\Applications\SQL_SERVER_2008_R2_new

    4.

    Quiteinstall command :- test.ps1

    Working Directoyr: .\Applications\SQL_SERVER_2008_R2_new

    screenshot

    Please help me


    k sivakumar

    Tuesday, March 13, 2012 9:33 AM

All replies

  • What error do you get?

    Regards, Vik Singh

    Tuesday, March 13, 2012 9:41 AM
  • have you looked at the options listed in http://blogs.technet.com/b/mniehaus/archive/2009/09/22/running-powershell-scripts-as-part-of-a-task-sequence.aspx

    I think it might be helpfull to you.

    Tuesday, March 13, 2012 12:35 PM
  • You have to specify the Exécution Policy.

    ex:

    powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%SCRIPTROOT%\test.ps1"

    Friday, March 16, 2012 12:35 PM
  • Ok I just got this working.  For me I wanted to make sure I could run the MDT task sequence without the fear of whether or not Group Policy had been applied yet.  I have Group Policy setting the ExecutionPolicy to RemoteSigned.  If the machine gets Group Policy settings then that seems to take priority over using -ExecutionPolicy Bypass when I call the script.   To circumvent this problem I copy the script locally to the machine and then call it using a batch file.  My MDT quiet install command is just

    InstallMyApp.bat

    and this is the contents of InstallMyApp.bat:

    md c:\temp
    copy InstallMyApp.ps1 c:\temp\
    powershell.exe -nologo -noprofile -executionpolicy bypass -file "c:\temp\InstallMyApp.ps1"
    rd c:\temp /s /q

    Notice I still use the "-executionpolicy bypass" so if Group Policy hasn't been applied yet then that will allow it to run scripts.  I still have a little more testing to do, but so far this is working for me.  Hope that helps.

    Wednesday, March 21, 2012 8:05 PM