From 7b98781891f362679d1ce1dad738d89c830c200b Mon Sep 17 00:00:00 2001 From: Brian Farnhill Date: Thu, 30 Jul 2015 09:42:00 -0700 Subject: [PATCH 1/4] 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/4] 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/4] 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/4] 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)