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

Inclusion of Powershell modules in appref-ms packages #1785

Closed
twoscoopsofpig opened this issue Jul 3, 2019 · 12 comments
Closed

Inclusion of Powershell modules in appref-ms packages #1785

twoscoopsofpig opened this issue Jul 3, 2019 · 12 comments
Labels
Issue-Question For questions or discussion Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@twoscoopsofpig
Copy link

Summary of the new feature/enhancement

In order to use modern authentication with Exchange Online, there is a module in appref-ms format which checks for updated versions of the module before running. The module is not accessible with Import-Module in a regular Powershell console, but can be installed from the Hybrid tab under the Exchange Admin Center of Exchange Online, as described at https://docs.microsoft.com/en-us/powershell/exchange/exchange-online/connect-to-exchange-online-powershell/mfa-connect-to-exchange-online-powershell?view=exchange-ps

I have attempted to add the full path to the appref=ms package as a new profile in Windows Terminal, but receive an error about bad syntax in profiles.json. I assume this is due to the presence of backslashes in the path to the module. Moving the appreff package to a folder in my PATH doesn't seem to make any difference either.

Considering the consolidation goal of this project, it would be useful to include all forms of the Powershell console, regardless of packaging.

Thanks for your attention!

@twoscoopsofpig twoscoopsofpig added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Jul 3, 2019
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jul 3, 2019
@zadjii-msft
Copy link
Member

You'll need to make sure to properly escape the commandline in your profile:

{
  "commandline": "this\will\not\work",
  "commandline": "but\\this\\will"
}

See also #1090

@zadjii-msft zadjii-msft added the Resolution-Answered Related to questions that have been answered label Jul 3, 2019
@twoscoopsofpig
Copy link
Author

twoscoopsofpig commented Jul 3, 2019 via email

@zadjii-msft
Copy link
Member

Could you share the error you're seeing, and the profile? I'm also fairly sure that you can't try and execute things that in subdirectories of things in your %PATH%, the executable's directory needs to be on %PATH% itself.

@zadjii-msft zadjii-msft added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 3, 2019
@twoscoopsofpig
Copy link
Author

twoscoopsofpig commented Jul 3, 2019 via email

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jul 3, 2019
@zadjii-msft
Copy link
Member

Maybe try

"\\\"C:\\Users\\conantb\\Documents\\Admin\\Microsoft Exchange Online Powershell Module.appref-ms\\\""

Escaping spaces is particularly tricky ATM.

@twoscoopsofpig
Copy link
Author

Neither that nor nesting single quotes (escaped or otherwise) works.

When the appref package fires, it runs an updater and then loads the console with the module imported.

@DHowett-MSFT
Copy link
Contributor

Ah, this is somewhat worrying. I'm not actually sure how appref-ms modules are supposed to be launched. Let me have a look -- if it's something we can solve with the right powershell command line, this'll turn into general user documentation and advice. If it's something that can't be solved with a command line, we'll need to start asking the hard questions.

@DHowett-MSFT
Copy link
Contributor

This might just boil down to #492. It looks like appref-ms shortcuts are another type of ClickOnce application, which means their launch must be brokered through another process (internet explorer, windows shell, etc.) Right now, we can't support hooking the launch of another console application through a broker.

@DHowett-MSFT DHowett-MSFT added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jul 8, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jul 8, 2019
@DHowett-MSFT DHowett-MSFT added Needs-Tag-Fix Doesn't match tag requirements and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Jul 8, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jul 8, 2019
@DHowett-MSFT DHowett-MSFT added Issue-Question For questions or discussion and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Resolution-Answered Related to questions that have been answered labels Jul 8, 2019
@twoscoopsofpig
Copy link
Author

twoscoopsofpig commented Jul 8, 2019 via email

@DHowett-MSFT
Copy link
Contributor

Sure is. Please follow #492 😄

@twoscoopsofpig
Copy link
Author

twoscoopsofpig commented Jul 8, 2019 via email

@ghost
Copy link

ghost commented Jul 9, 2019

This issue has been marked as duplicate and has not had any activity for 1 day. It will be closed for housekeeping purposes.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Question For questions or discussion Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

3 participants