5 Replies Latest reply on Apr 10, 2012 9:08 AM by jtrently

    LANDesk 9 Distribution Packages - PowerShell Problems

    Apprentice

      I am trying to use the new PowerShell distribution package type in LANDesk 9 SP2 and I can't get it to work.

       

      I have created a PowerShell script that installs Server Roles on Windows Server 2008-R2. I can run the script interactively by launching a privileged command window and typing...

      powershell.exe -file "<path> \server_roles.ps1"

       

      When I run the script this way the roles are added no problem.

       

      Next I created a LANDesk Software Distribution Package for PowerShell scripts and specified the same script that worked successfully before. The scheduled task runs briefly and then shows "Success", but nothing is changed on the target machine - no roles are installed. I haven't found anything in the Windows event logs to show that a PowerShell task had failed or tried to run. I found a TaskScheduler log file in the LDLog folder on our core server, but I can't make much sense of it.

       

      I wondered if there's somebody out there who has experience in scheduling PowerShell tasks with LANDesk. I'm a raw rookie when it comes to PowerShell, so it's a pretty good bet that I've missed an important step somewhere.

       

      Jayson