From 7b98781891f362679d1ce1dad738d89c830c200b Mon Sep 17 00:00:00 2001 From: Brian Farnhill Date: Thu, 30 Jul 2015 09:42:00 -0700 Subject: [PATCH 1/6] Fixed timeout bug Fixed issues with loopback remote session by extending timeout and removing CA checks --- .../xSharePoint.Util/xSharePoint.Util.psm1 | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Modules/xSharePoint/Modules/xSharePoint.Util/xSharePoint.Util.psm1 b/Modules/xSharePoint/Modules/xSharePoint.Util/xSharePoint.Util.psm1 index 799bb4f2d..42c6a4b67 100644 --- a/Modules/xSharePoint/Modules/xSharePoint.Util/xSharePoint.Util.psm1 +++ b/Modules/xSharePoint/Modules/xSharePoint.Util/xSharePoint.Util.psm1 @@ -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)) { @@ -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 * From 505e30483a9e7b5d28f403a55db753411e91ac36 Mon Sep 17 00:00:00 2001 From: Brian Farnhill Date: Thu, 30 Jul 2015 09:42:40 -0700 Subject: [PATCH 2/6] Updated version number --- Modules/xSharePoint/xSharePoint.psd1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/xSharePoint/xSharePoint.psd1 b/Modules/xSharePoint/xSharePoint.psd1 index 53f4c970d..88fa5fb42 100644 --- a/Modules/xSharePoint/xSharePoint.psd1 +++ b/Modules/xSharePoint/xSharePoint.psd1 @@ -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.' From 68f20bd46c1ed2ca79ae6be13f04f8b412566bd1 Mon Sep 17 00:00:00 2001 From: Brian Farnhill Date: Thu, 30 Jul 2015 09:43:05 -0700 Subject: [PATCH 3/6] Updated version number --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index a91bf75fe..b35dd9b6d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 0.2.0.{build} +version: 0.3.1.{build} install: - cinst -y pester From 15078c2ad17a59db031a1ffad24c556ec368011f Mon Sep 17 00:00:00 2001 From: Brian Farnhill Date: Thu, 30 Jul 2015 10:24:39 -0700 Subject: [PATCH 4/6] Fixed formatting --- .../Modules/xSharePoint.Util/xSharePoint.Util.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/xSharePoint/Modules/xSharePoint.Util/xSharePoint.Util.psm1 b/Modules/xSharePoint/Modules/xSharePoint.Util/xSharePoint.Util.psm1 index 42c6a4b67..abc62a768 100644 --- a/Modules/xSharePoint/Modules/xSharePoint.Util/xSharePoint.Util.psm1 +++ b/Modules/xSharePoint/Modules/xSharePoint.Util/xSharePoint.Util.psm1 @@ -10,9 +10,9 @@ function Get-xSharePointAuthenticatedPSSession() { [System.Boolean] $ForceNewSession = $false ) - - $session = @(Get-PSSession | Where-Object { $_.ComputerName -eq "." -and $_.Runspace.OriginalConnectionInfo.Credential.UserName -eq $Credential.UserName -and $_.State -eq "Open"}) + $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 "." -Credential $Credential -Authentication Credssp -SessionOption (New-PSSessionOption -OperationTimeout 600000 -SkipCACheck -SkipCNCheck -SkipRevocationCheck) From 7db8bb982126f38418403edd5057f68ffa699b06 Mon Sep 17 00:00:00 2001 From: Nikcharlebois Date: Sun, 2 Aug 2015 09:02:01 -0400 Subject: [PATCH 5/6] Added the CentralAdministrationPort parameter to let users choose on what port to in off central administration --- .../MSFT_xSPCreateFarm.psm1 | 22 +++++++++++++------ .../MSFT_xSPCreateFarm.schema.mof | 3 ++- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Modules/xSharePoint/DSCResources/MSFT_xSPCreateFarm/MSFT_xSPCreateFarm.psm1 b/Modules/xSharePoint/DSCResources/MSFT_xSPCreateFarm/MSFT_xSPCreateFarm.psm1 index 8c9cfed9f..bcdea92f4 100644 --- a/Modules/xSharePoint/DSCResources/MSFT_xSPCreateFarm/MSFT_xSPCreateFarm.psm1 +++ b/Modules/xSharePoint/DSCResources/MSFT_xSPCreateFarm/MSFT_xSPCreateFarm.psm1 @@ -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" @@ -78,7 +81,10 @@ function Set-TargetResource [parameter(Mandatory = $true)] [System.String] - $AdminContentDatabaseName + $AdminContentDatabaseName, + + [System.UInt32] + $CentralAdministrationPort = 9999 ) $session = Get-xSharePointAuthenticatedPSSession -Credential $InstallAccount @@ -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" @@ -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 \ No newline at end of file diff --git a/Modules/xSharePoint/DSCResources/MSFT_xSPCreateFarm/MSFT_xSPCreateFarm.schema.mof b/Modules/xSharePoint/DSCResources/MSFT_xSPCreateFarm/MSFT_xSPCreateFarm.schema.mof index 7ec48e43b..d51f8626e 100644 --- a/Modules/xSharePoint/DSCResources/MSFT_xSPCreateFarm/MSFT_xSPCreateFarm.schema.mof +++ b/Modules/xSharePoint/DSCResources/MSFT_xSPCreateFarm/MSFT_xSPCreateFarm.schema.mof @@ -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 \ No newline at end of file From 2b64641b8bb9eacb1ab06b792801bbed7d15a2dc Mon Sep 17 00:00:00 2001 From: Brian Farnhill Date: Thu, 6 Aug 2015 15:57:45 +1000 Subject: [PATCH 6/6] Added gitter chat --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f76847e7e..1997490f4 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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