Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More PsRemoting coverage (-UseSSL & -IncludePortInSPN) #5960

merged 5 commits into from Aug 14, 2019


Copy link

commented Aug 12, 2019

Type of Change

  • Bug fix (non-breaking change, fixes #)
  • New feature (non-breaking change, adds functionality)
  • Breaking change (effects multiple commands or functionality)
  • Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
  • Adding code coverage to existing functionality
  • Pester test is included
  • If new file reference added for test, has is been added to ?
  • Nunit test is included
  • Documentation
  • Build system


Due to different environment configurations, In my work I need to use -UseSSL and -IncludePortInSPN when running PowerShell remote stuff (which make use of Invoke-Command2).
Example: Get-DbaComputerCertificate


Make configurable these two values by using Get/Set-DbatoolsConfig

Commands to test

Any that uses internal Invoke-Command2 function.

Use the following commands to change the values of the configurations:

Set-DbaToolsConfig -Name 'psremoting.pssession.usessl' -Value $true
Set-DbaToolsConfig -Name 'psremoting.pssessionoption.includeportinspn' -Value $true

Note: Default values are $false which are also defaults values of the New-PsSessionOption and New-PsSession commands



Two blog posts will be published after these improvements are available. On on dbatools blog, related with what these configs are, how to get current values, set new, etc.
The 2nd one will be on my blog and is on the detail why I need it and how I have made the implementation.

Note: This code is currently running without problems on my dbatools installation within the company.
Note2: There is no easy way to test these changes. (AFAIK, our test environment don't have settings for SSL and SPNs needed).

ClaudioESSilva added some commits Aug 12, 2019

New PsRemoting configurations
Add new configurations to use with PsRemoting (Invoke-Command2)
Make use of new PsRemoting settings

@ClaudioESSilva ClaudioESSilva requested a review from potatoqualitee Aug 12, 2019

@ClaudioESSilva ClaudioESSilva self-assigned this Aug 12, 2019


This comment has been minimized.

Copy link

commented Aug 13, 2019

Unfortunately, this breaks all remoting


Fixing splatting
Used $ when should be @

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 13, 2019

My bad @potatoqualitee . Fixed :-)
Can you try it again? 😃


This comment has been minimized.

Copy link

commented Aug 14, 2019

thanks buddy puddin'


This comment has been minimized.

Copy link

commented Aug 14, 2019

works for me

@potatoqualitee potatoqualitee merged commit b3f6236 into development Aug 14, 2019

1 of 2 checks passed

continuous-integration/appveyor/branch AppVeyor build failed
continuous-integration/appveyor/pr AppVeyor build succeeded

@potatoqualitee potatoqualitee deleted the MorePSRemotingCoverage branch Aug 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.