Skip to content

Commit

Permalink
Merge pull request #1 from kayodebristol/working
Browse files Browse the repository at this point in the history
  • Loading branch information
kayodebristol committed Nov 14, 2019
2 parents b94186e + 2ce5c62 commit 7e1e275
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,5 @@ ReverseDSC can be used for many reasons, including:

# How to Contribute?
Please refer to the follow Wiki page if you are interested in contributing to the project: https://github.com/Microsoft/SharePointDSC.Reverse/wiki/Contribute-to-an-Orchestrator-Script


13 changes: 4 additions & 9 deletions SharePointDSC.Reverse.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
* Fixed issue with Central admin Port retrieval;
* Updated dependency to ReverseDSC 1.9.4.7;
* Updated dependency to SharePointDSC 3.6.0.0;
* Fixed issue #90 incorrect handling of Port in Read-SPWebapplications
* Fixed issue #92 | Fails to handle Farms with multiple SQL Server instances
#>

Expand Down Expand Up @@ -1263,11 +1265,7 @@ function Read-SPWebApplications (){

Add-ConfigurationDataEntry -Node "NonNodeData" -Key "DatabaseServer" -Value $results.DatabaseServer -Description "Name of the Database Server associated with the destination SharePoint Farm;"
$results.DatabaseServer = "`$ConfigurationData.NonNodeData.DatabaseServer"
if($results.WebAppURl.Contains(":") -and $results.Port -and $results.Port -ne 80)
{
$results.Remove("Port")
}
elseif(!$results.WebAppUrl.Contains(":") -and !$results.Port)
if(!$results.WebAppUrl.Contains(":") -and !$results.Port)
{
$results.Add("Port", 80)
}
Expand Down Expand Up @@ -3439,10 +3437,7 @@ function Read-SPContentDatabase()
$params.WebAppUrl = $spContentDB.WebApplication.Url
$results = Get-TargetResource @params
$results = Repair-Credentials -results $results

Add-ConfigurationDataEntry -Node "NonNodeData" -Key "DatabaseServer" -Value $results.DatabaseServer -Description "Name of the Database Server associated with the destination SharePoint Farm;"
$results.DatabaseServer = "`$ConfigurationData.NonNodeData.DatabaseServer"

$results.DatabaseServer = $spContentDB.Server
$currentBlock = Get-DSCBlock -UseGetTargetResource -Params $results -ModulePath $module
$currentBlock = Convert-DSCStringParamToVariable -DSCBlock $currentBlock -ParameterName "DatabaseServer"
$Script:dscConfigContent += $currentBlock
Expand Down

0 comments on commit 7e1e275

Please sign in to comment.