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

Support for force scanning against Windows Update #217

Conversation

codaamok
Copy link
Contributor

Hey, I hope you're well! Don't merge just yet, I have a question 😄

I have done two things in this PR:

  • Added support to specify -UseWindowsUpdate in Get-KbNeededUpdate; this lets users "forcefully" search against Windows Update even if Windows is configured to scan against WSUS - achieved by just setting ServerSelection to 2 on the UpdateServer interface.
  • Removed -Credential parameter from Connect-KbWsusServer as it wasn't used

Do I need to do anything special to build the module in order to test with it? I still need to some more testing but initial testing proves OK. Right now I'm just modifying locally and importing the module from the repository.

@potatoqualitee
Copy link
Owner

thanks so much @codaamok! no, you do not need anything special other than sometimes using -Force when using Import-Module to ensure your changes are enabled. This change looks solid and the integration tests pass 😊

@codaamok
Copy link
Contributor Author

I made some more changes:

  • Forgot to add DefaultParameterSetName attribute; it threw an error not knowing which param set to use when the function was called without any params
  • I made somewhat of an overhaul in the comment based help and readme to
    • consistently named the Windows Update cloud service as "Windows Update (cloud service)", instead of "Microsoft update catalog"
    • consistently named the Windows Update offline scan file (wsusscn2.cab) as such
    • consistently name the Windows Update Agent so it wasn't confused with Windows Update (the cloud service)

Let me know your thoughts

@codaamok
Copy link
Contributor Author

Oh I think I'll add -UseWindowsUpdate in Install-KbUpdate, too

@potatoqualitee
Copy link
Owner

Thanks again, this code looks great -- appreciate the added functionality 👍🏼 Will merge and publish once tests pass again.

@potatoqualitee potatoqualitee merged commit 700c1dc into potatoqualitee:main Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants