Deployment Solution

 View Only
  • 1.  Powershell and Altiris

    Posted Dec 09, 2015 04:50 PM

    I have several different pwershell scripts that I want to deploy out to clients using Altiris DS.  what do I need to do in the "RUN SCRIPT" to get Altiris to run a powershell 5.0 script.  Need an assist on this.



  • 2.  RE: Powershell and Altiris

    Posted Dec 09, 2015 05:42 PM
    Put #powershell all in lowercase at the start of the script.


  • 3.  RE: Powershell and Altiris

    Posted Dec 10, 2015 01:29 PM

    NO GOOD!!!!

    So here is my code.  I simply want to create a desktop folder shortcut with a custom icon.  can anyone assist?

    #powershell
    $shell = New-Object -ComObject WScript.Shell
    $desktop = [System.Environment]::GetFolderPath('Desktop')
    $shortcut = $shell.CreateShortcut("$desktop\Checklist.lnk")
    $shortcut.TargetPath = "c:\users\downloads"
    $shortcut.IconLocation = "C:\Drivers\icons\test.ico"
    $shortcut.Save()

     



  • 4.  RE: Powershell and Altiris

    Posted Dec 11, 2015 08:22 AM
    Try a simple powershell script first.


  • 5.  RE: Powershell and Altiris

    Posted Dec 19, 2015 06:03 PM

    Hi. Powershell 5 is avaible in win8.1, so even if you will find way to run it on computer (the easiest way, is to copy .ps1 file to computer and run "powershell script.ps1") the question is, If system will support PS5. On what OS versions you want to use that?

    Another thing - in this powershell scrip, you are indeed running wscript/csctipt (vb script). Mayby the easiest solution will be switching directly to vb? It will be easier, because running script in powershell might need extra configuration of system.
    Here is way to create shortcut: http://ss64.com/vb/shortcut.html
    VBS can be done running "wscript script.vbs" or "cscript script.vbs"(this is better in my opinion - output is in console). Of course, first you need to copy vbs files from server and then run it (you can do it in one run script)



  • 6.  RE: Powershell and Altiris

    Posted Dec 20, 2015 02:20 PM
    You can run vbscripts from the Run Script Task, just put 'vbscript in the script. Doesn't need to be the first line so you can put another comment line at the top to appear in the console.


  • 7.  RE: Powershell and Altiris

    Posted Jan 04, 2016 11:52 AM

    Did you check the execu[tionpolicy setting on the client end? If this is as per default you might see an error on the console telling you about this.

    Other than that, Andy is correct as I have a bunch of PS scripts embedded that run absolutely fine against clients and also locally on the server.

    -BBC