Skip to content

Disable autoloading PSScheduledJob module from -Job cmdlets - #11194

Merged
Dongbo Wang (daxian-dbw) merged 1 commit into
PowerShell:masterfrom
anmenaga:AutoloadModulesWithJobSourceAdapters
Nov 26, 2019
Merged

Dongbo Wang (daxian-dbw) merged 1 commit into
PowerShell:masterfrom
anmenaga:AutoloadModulesWithJobSourceAdapters

Conversation

@anmenaga

Copy link
Copy Markdown

PR Summary

Currently all *-Job cmdlets try to autoload PSScheduledJob module that is not PS-Core compatible, so this autoload quietly fails, so it is a waste of resources.
Furthermore, this autoload of PSScheduledJob module creates bad user experience when WinCompat is enabled (see issue #11164 ).
Disabling this code provides solution to both issues.
Fix #11164

PR Checklist

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anmenaga Andrew (anmenaga) changed the title WIP: Disable autoloading PSScheduledJob module from -Job cmdlets Disable autoloading PSScheduledJob module from -Job cmdlets Nov 26, 2019
@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit e487e10 into PowerShell:master Nov 26, 2019
@iSazonov Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Nov 27, 2019
@iSazonov Ilya (iSazonov) added this to the 7.1.0-preview.1 milestone Nov 27, 2019
@doctordns

Copy link
Copy Markdown
Collaborator

I am NOT overjoyed with this being pushed out to 7.1.

The experience of Preview.6 is, in my mind, not really acceptable.

I favour a working solution in PWSH 7.0 RTM.

@vexx32

Copy link
Copy Markdown
Collaborator

Thomas Lee (@doctordns) looks like it's targeted for 7.0 RC1, so it should definitely be in the 7.0 release as well. 🙂

@doctordns

Copy link
Copy Markdown
Collaborator

Rain Sallow (/u/ta11ow) (@vexx32) thanks. I just saw Ilya (@iSazonov) had marked as 7.1.0-Preview.1. IF it goes into the RCs, and thus into RTM. I'm happy.

When does this make the daily build? :)

@vexx32

Copy link
Copy Markdown
Collaborator

I would assume it should already be in the daily builds, since it was merged to the master branch a week or so ago. 🙂

@SteveL-MSFT

Copy link
Copy Markdown
Member

Rain Sallow (/u/ta11ow) (@vexx32), Thomas Lee (@doctordns) master branch is now 7.1, we selectively triage and approve merged PRs to be taken to rc.1 branch. This one should be in rc.1

@doctordns

Copy link
Copy Markdown
Collaborator

Steve Lee (@SteveL-MSFT)
Thanks for that.

@ghost

Copy link
Copy Markdown

🎉v7.0.0-rc.1 has been released which incorporates this pull request.:tada:

Handy links:

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log MustHave

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Preview6] [PSWindowsPowershellCompatibility] *-Job cmdlets load PSScheduledJob module in WinCompat

8 participants