Creating App Deployment by using PowerShell Script?

This topic contains 3 replies, has 2 voices, and was last updated by Profile photo of Arie H Arie H 6 months, 2 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #36717
    Profile photo of James
    James
    Participant

    I am new to DSC and deploying applications via DSC. I thank everyone in advance for the help! Resources on the internet aren't clear, but here is some background and my question:

    Background: Application installations have been standardized on PowerShell Scripts.

    Question: Instead of "re-creating/re-packaging" applications for DSC, can we create a deployment and call these existing PowerShell Installation Scripts?

    #36718
    Profile photo of Arie H
    Arie H
    Participant

    Hi James,,

    Generally yes, depends on what you mean by "Application installations have been standardized on PowerShell Scripts".

    If its a share with the installtion media and a Deploy.ps1 script (for example) and you give it ApplicationA as a parameter, then the answer to you question is yes.

    You can use then Script resource in DSC to call the powershell script to install and add the parameters. Or use the File resource to move the installation media to the specific node and then use the Script resource to run it on that node.

    If by " Application installations have been standardized on PowerShell Scripts", you mean that you package the app and install script as Choclatey/Nuget package, placed it on an internal Nuget server, then you can use the PackageManagement cmdlets to build yourself a nice deployemnt solution.

    #36720
    Profile photo of James
    James
    Participant

    The various server applications have installation scripts that have varied over the years, including vbscript, batch files, etc. To get to a "standard", I have written PowerShell scripts to perform these installations. Applications are currently deployed to servers via SCCM Packages and VCO Workflow for server builds. By using a single PowerShell Installation Script for all of these methods, we are looking to avoid errors, duplication of effort, etc.

    Since we are now adding DSC to the mix, it seems like a good idea to be able to use these PowerShell scripts across all deployment scenario's, rather than deviating with DSC.

    Do you have any references for using a DSC Resource to call a PowerShell Script? I appreciate your feedback!

    #36743
    Profile photo of Arie H
    Arie H
    Participant

    Hi James,

    If you have chosen SCCM to be your Package Deployer for servers as well, why would you need DSC for that part ?

    Provision the servers via DSC without any package management and then let SCCM do the magic and install the packages ?

    Take a look at

    http://www.powershellmagazine.com/2014/08/13/running-commands-as-another-user-using-dsc-script-resource/

    https://social.technet.microsoft.com/Forums/en-US/95c5c6ec-ba91-494d-8ee7-bc31219144f3/how-to-execute-power-shell-script-file-inside-dsc-script-resource?forum=winserverpowershell

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.