locked
New-Cluster Report file location RRS feed

  • Question

  • Hi All,

    I’m creating a cluster with new-cluster cmdlet and I need this to be a silent run.

    New-Cluster -Name $ClusterName -Node $Node1, $Node2, $Node3 -NoStorage -StaticAddress $IPAddress,$IPAddress2 *>&1 | Out-Null

    But I can’t get around the following output: Report file location: C:\Windows\cluster\Reports\Create Cluster Wizard <servername> on 2015.04.07 At 13.32.33.mht

    I have tried it with:

    $WarningPreference  = "SilentlyContinue"$VerbosePreference  = "SilentlyContinue"$DebugPreference    = "SilentlyContinue"$ProgressPreference = "SilentlyContinue"

     $leeg =  New-Cluster -Name $ClusterName -Node $Node1, $Node2, $Node3 -NoStorage -StaticAddress $IPAddress,$IPAddress2 *>&1 | Out-Null

    $leeg =  New-Cluster -Name $ClusterName -Node $Node1, $Node2, $Node3 -NoStorage -StaticAddress $IPAddress,$IPAddress2 -verbose:$False -Debug:$False -OutVariable out -WarningAction SilentlyContinue -WarningVariable wout | Out-Null

    But I keep getting the following output on screen:

    Report file location: C:\Windows\cluster\Reports\Create Cluster Wizard <servername> on 2015.04.07 At 13.32.33.mht

    Best regards,

    Chris

    Tuesday, April 7, 2015 12:12 PM

Answers

  • Hi Chris,

    this is due to non-conformance with PowerShell best practices by the coder of the FailoverCluster-Module developer.

    New-Cluster writes directly to the host and thus can't be suppressed this way.

    You may have more luck handling this odd output by running this command within a job or runspace.

    Cheers,
    Fred


    There's no place like 127.0.0.1

    • Marked as answer by Bill_Stewart Tuesday, June 16, 2015 8:08 PM
    Tuesday, April 7, 2015 1:40 PM