Skip to content

Add back ADSI and WMI type accelerators - #7085

Merged
Dongbo Wang (daxian-dbw) merged 6 commits into
PowerShell:masterfrom
SteveL-MSFT:adsi-wmi
Jun 21, 2018
Merged

Add back ADSI and WMI type accelerators#7085
Dongbo Wang (daxian-dbw) merged 6 commits into
PowerShell:masterfrom
SteveL-MSFT:adsi-wmi

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Jun 15, 2018

Copy link
Copy Markdown
Member

PR Summary

Now that we include Microsoft.Windows.Compatibility assemblies with PowerShell Core 6.1, we can add back the [adsi], [adsisearcher], [wmi], [wmiclass], and [wmisearcher] accelerators putting back code that already exists.

Fix #3266

PR Checklist

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

I believe the problem is we haven't published an updated pwrshplugin.dll yet so System.Management.dll and System.DirectoryServices.dll aren't in the trusted list and thus fails to initialize on the remote side. I'll work on getting pwrshplugin.dll published.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can sort the using list?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll put the two here in alpha order. Won't touch the ones above.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The CommaDelimitedStringCollection class is in .Net Core 2.0+.
https://apisof.net/catalog/System.Configuration.CommaDelimitedStringCollection

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we sort the using list?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we sort the using list?

@SteveL-MSFT Steve Lee (SteveL-MSFT) Jun 18, 2018

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We should do a global pass if we want them all sorted. Separate PR.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I ask only because you have already edited the list.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I suppose I could update it just for this file since I'm touching this part anyways.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe use Compile Remove in csproj file?

@iSazonov

Copy link
Copy Markdown
Collaborator

Seems we add back 5 type accelerators - please update the PR description.

@SteveL-MSFT Steve Lee (SteveL-MSFT) changed the title Add back [adsi] and [wmi] type accelerators Add back ADSI and WMI type accelerators Jun 18, 2018

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should enable the test on Windows and correct $totalAccelerators = 95 above.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Missed the -Skip part of this test. Will fix. Not sure what you mean by "correct $totalAcclerators = 95 above" as 95 is the correct number.

@iSazonov Ilya (iSazonov) Jun 20, 2018

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Seems we add 5 accelerators on Windows. I wonder why the count is increased only +1

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

Ilya (@iSazonov) can you formally review and signoff?

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

update count of accelerators in test
@iSazonov

Copy link
Copy Markdown
Collaborator

I still have a concern about my comment

Seems we add 5 accelerators on Windows. I wonder why the count is increased only +1

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

Ilya (@iSazonov) the count didn't increase by +1, if you look at line 381, the number w/o the Windows specific ones is 91. I added 5, so the total with the new ones is 96 on line 385. The original code was wrong as it only did +4 and should have been +5.

@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit 6c9eea6 into PowerShell:master Jun 21, 2018
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the adsi-wmi branch June 21, 2018 18:00
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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[adsi] type accelerator is unavailable / throws an exception

4 participants