locked
Execute PowerShell Script to get Cluster Information from SSIS - Am I crazy? RRS feed

  • Question

  • All,

    I created an few scripts that calls cmdlets that gets information from our clusters. The idea is to run the process once and get the information from our clusters into one single place. This is important after outage/patch weekends so we can check the state of our clusters in one single place.

    I have never worked with PowerShell scripts before, and I'm doing this after getting inspired by some really clever folks I had the pleasure of seeing at SQL PASS.

    I wanted to leverage SSIS so I can take advantage of the the ForEachLoop container and perform the same checks across my 13 clusters.

    Have you guys done this before?
    Am I on the right path?
    Should I use WMI instead or PowerShell?
    Any suggestions on how to execute PowerShell scripts from SSIS?
    Any other suggestions?


    --- Best Regards, Igor Santos - DBA igor.santos@citrix.com
    Friday, November 19, 2010 12:44 AM

Answers

  • Have you guys done this before?
    Am I on the right path?

    Not done this before but I think it should work (Powershell should be installed)

    Should I use WMI instead or PowerShell?

    I think powershell internally uses WMI so you can use powershell

    Any suggestions on how to execute PowerShell scripts from SSIS?
    Create a batch file that executes the .ps1 file. Batch file example: Powershell -NoExit D:\Nitesh\PowerShell\CreateTable.ps1. Once the batch file is ready, use the Execute Process Task to execute the batch file.
    Nitesh Rai- Please mark the post as answered if it answers your question
    Friday, November 19, 2010 3:11 AM

All replies

  • Have you guys done this before?
    Am I on the right path?

    Not done this before but I think it should work (Powershell should be installed)

    Should I use WMI instead or PowerShell?

    I think powershell internally uses WMI so you can use powershell

    Any suggestions on how to execute PowerShell scripts from SSIS?
    Create a batch file that executes the .ps1 file. Batch file example: Powershell -NoExit D:\Nitesh\PowerShell\CreateTable.ps1. Once the batch file is ready, use the Execute Process Task to execute the batch file.
    Nitesh Rai- Please mark the post as answered if it answers your question
    Friday, November 19, 2010 3:11 AM
  • Hey Nitesh,

    Thanks for your reply. Let me give this a shot.


    --- Best Regards, Igor Santos - DBA igor.santos@citrix.com
    Friday, November 19, 2010 3:01 PM
  • Nitesh,

    One quick question - How can I run specific cmdlets on remote servers? Do you know?

    If I'm on machineA and I want to get Get-ClusterNode from Cluster1, how do I do that?

    Sorry for the newbie questions. :)


    --- Best Regards, Igor Santos - DBA igor.santos@citrix.com
    Friday, November 19, 2010 7:00 PM
  • Nitesh,

    One quick question - How can I run specific cmdlets on remote servers? Do you know?

    If I'm on machineA and I want to get Get-ClusterNode from Cluster1, how do I do that?

    Sorry for the newbie questions. :)


    --- Best Regards, Igor Santos - DBA igor.santos@citrix.com

    $CluName = "ClusterName"
    $CluNd = get-clusternode -cluster $CluName | ft State,Id,Name,MajorVersion,MinorVersion,DynamicWeight,NodeWeight -a

    yup

    Wednesday, October 9, 2013 9:58 AM