Skip to content

Commit

Permalink
Merge pull request #65 from PowerShell/dev
Browse files Browse the repository at this point in the history
Merging current release to master
  • Loading branch information
BrianFarnhill committed Aug 6, 2015
2 parents a1b5e18 + 2b64641 commit 31450d7
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ function Get-TargetResource

[parameter(Mandatory = $true)]
[System.String]
$AdminContentDatabaseName
$AdminContentDatabaseName,

[System.UInt32]
$CentralAdministrationPort
)

Write-Verbose -Message "Checking for local SP Farm"
Expand Down Expand Up @@ -78,7 +81,10 @@ function Set-TargetResource

[parameter(Mandatory = $true)]
[System.String]
$AdminContentDatabaseName
$AdminContentDatabaseName,

[System.UInt32]
$CentralAdministrationPort = 9999
)

$session = Get-xSharePointAuthenticatedPSSession -Credential $InstallAccount
Expand Down Expand Up @@ -116,7 +122,7 @@ function Set-TargetResource

Write-Verbose -Message "Creating Central Administration Website"
Invoke-Command -Session $session -ScriptBlock {
New-SPCentralAdministration -Port 9999 -WindowsAuthProvider NTLM
New-SPCentralAdministration -Port $params.CentralAdministrationPort -WindowsAuthProvider NTLM
}

Write-Verbose -Message "Installing application content"
Expand Down Expand Up @@ -154,15 +160,17 @@ function Test-TargetResource

[parameter(Mandatory = $true)]
[System.String]
$AdminContentDatabaseName
$AdminContentDatabaseName,

[System.UInt32]
$CentralAdministrationPort = 9999
)

$result = Get-TargetResource -FarmConfigDatabaseName $FarmConfigDatabaseName -DatabaseServer $DatabaseServer -FarmAccount $FarmAccount -InstallAccount $InstallAccount -Passphrase $Passphrase -AdminContentDatabaseName $AdminContentDatabaseName
$result = Get-TargetResource -FarmConfigDatabaseName $FarmConfigDatabaseName -DatabaseServer $DatabaseServer -FarmAccount $FarmAccount -InstallAccount $InstallAccount -Passphrase $Passphrase -AdminContentDatabaseName $AdminContentDatabaseName -CentralAdministrationPort $CentralAdministrationPort

if ($result.Count -eq 0) { return $false }
return $true
}


Export-ModuleMember -Function *-TargetResource

Export-ModuleMember -Function *-TargetResource
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ class MSFT_xSPCreateFarm : OMI_BaseResource
[Required, EmbeddedInstance("MSFT_Credential")] String InstallAccount;
[Required] String Passphrase;
[Required] String AdminContentDatabaseName;
[Write] uint32 CentralAdministrationPort;
};
S
16 changes: 13 additions & 3 deletions Modules/xSharePoint/Modules/xSharePoint.Util/xSharePoint.Util.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ function Get-xSharePointAuthenticatedPSSession() {
[System.Boolean]
$ForceNewSession = $false
)

$session = @(Get-PSSession | Where-Object { $_.ComputerName -eq $env:COMPUTERNAME -and $_.Runspace.OriginalConnectionInfo.Credential.UserName -eq $Credential.UserName})

$session = @(Get-PSSession | Where-Object { $_.ComputerName -eq "." -and $_.Runspace.OriginalConnectionInfo.Credential.UserName -eq $Credential.UserName -and $_.State -eq "Open"})

if (($session.Count -eq 0) -or ($ForceNewSession -eq $true)) {
Write-Verbose -Message "Creating new PowerShell session"
$session = New-PSSession -ComputerName $env:COMPUTERNAME -Credential $Credential -Authentication CredSSP
$session = New-PSSession -ComputerName "." -Credential $Credential -Authentication Credssp -SessionOption (New-PSSessionOption -OperationTimeout 600000 -SkipCACheck -SkipCNCheck -SkipRevocationCheck)
Invoke-Command -Session $session -ScriptBlock {
if ($null -eq (Get-PSSnapin -Name "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue))
{
Expand Down Expand Up @@ -68,4 +68,14 @@ function Remove-xSharePointNullParamValues() {
return $Params
}

function Get-xSharePointAssemblyVerion() {
[CmdletBinding()]
param
(
[parameter(Mandatory = $true,Position=1)]
$PathToAssembly
)
return (Get-Command $PathToAssembly).Version
}

Export-ModuleMember -Function *
6 changes: 3 additions & 3 deletions Modules/xSharePoint/xSharePoint.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
# RootModule = ''

# Version number of this module.
ModuleVersion = '0.4.0.0'
ModuleVersion = '0.3.1.0'

# ID used to uniquely identify this module
GUID = '6c1176a0-4fac-4134-8ca2-3fa8a21a7b90'

# Author of this module
# Author of this module
Author = 'Microsoft Corporation'

# Company or vendor of this module
CompanyName = 'Microsoft Corporation'

# Copyright statement for this module
Copyright = '(c) 2015 Microsoft Corporation. All rights reserved.'
Copyright = '(c) 2015 Microsoft Corporation. All rights reserved.'

# Description of the functionality provided by this module
Description = 'This DSC module is used to deploy and configure SharePoint Server 2013, and convers a wide range of areas including web apps, service apps and farm configuration.'
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Build status: [![Build status](https://ci.appveyor.com/api/projects/status/aj6ce04iy5j4qcd4/branch/master?svg=true)](https://ci.appveyor.com/project/PowerShell/xsharepoint/branch/master)

[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PowerShell/xSharePoint?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

The xSharePoint PowerShell module provides DSC resources that can be used to deploy and manage a SharePoint farm.

This module is provided AS IS, and is not supported through any Microsoft standard support program or service.
Expand Down Expand Up @@ -71,7 +73,7 @@ Additional detailed documentation is included on the wiki on GitHub.

### 0.4.0.0

* Fixed issue with nested modules’ cmdlets not being found
* Fixed issue with nested modules’ cmdlets not being found

### 0.3.0.0

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.2.0.{build}
version: 0.3.1.{build}

install:
- cinst -y pester
Expand Down

0 comments on commit 31450d7

Please sign in to comment.