Skip to content

Supporting custm -Port parameter when using PSRemoting (WinRM)#8494

Merged
potatoqualitee merged 8 commits intodevelopmentfrom
PSRemoting_SupportPort
Aug 19, 2022
Merged

Supporting custm -Port parameter when using PSRemoting (WinRM)#8494
potatoqualitee merged 8 commits intodevelopmentfrom
PSRemoting_SupportPort

Conversation

@ClaudioESSilva
Copy link
Contributor

@ClaudioESSilva ClaudioESSilva commented Aug 18, 2022

Type of Change

  • Bug fix (non-breaking change, fixes # )
  • New feature (non-breaking change, adds functionality, fixes dbatools cannot connect to WinRM over custom port #8480 )
  • Breaking change (effects multiple commands or functionality, fixes # )
  • 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 github.com/dataplat/appveyor-lab ?
  • Unit test is included
  • Documentation
  • Build system

Purpose

Support a custom port when using PSRemoting

Approach

Made it configurable through Set-DbatoolsConfig.
Then it will be read when creating the parameter list to connect.

NOTE: Similar to the -UseSSL configuration.

Commands to test

Users need to set the wanted value for the port using Set-DbatoolsConfig command

Set-DbatoolsConfig -FullName 'PSRemoting.PsSession.Port' -Value 1111

Call any command that uses PSRemoting (WinRM)

To reset it (also on the notes) use:

Set-DbatoolsConfig -FullName 'PSRemoting.PsSession.Port' -Value $null

@ClaudioESSilva ClaudioESSilva added the feature parameter Feature request that would need a new parameter for an existing command label Aug 18, 2022
@ClaudioESSilva ClaudioESSilva self-assigned this Aug 18, 2022
@potatoqualitee
Copy link
Member

Solid changes, thank you so very much! Will approve once tests pass (There have been a couple legitimate failures so far)

@potatoqualitee
Copy link
Member

just one more test to pass until merge! 😊

@potatoqualitee
Copy link
Member

gorrrge, thanks @ClaudioESSilva !

@potatoqualitee potatoqualitee merged commit 26f4a49 into development Aug 19, 2022
@potatoqualitee potatoqualitee deleted the PSRemoting_SupportPort branch August 19, 2022 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature parameter Feature request that would need a new parameter for an existing command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dbatools cannot connect to WinRM over custom port

2 participants