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 request for Linux PowerShell Core #8
Comments
Thank you for reporting that issue. I'll have to isolate the OutPrinter functionality so that it's loaded on Windows only, since PowerShell Core does not support Out-Printer. |
I just came here to report the same thing. However, since you and I had an email conversation a long time ago about format display being a defect within PowerShell, shouldn't PowerShellCore finally have fixed this, without needing your FormatPX classes overloading Format-* Cmdlets? That being said, I'm hoping a version of FormatPX can be released that addresses this soon. I'm in the process of investigating migrating my .Net Framework 4.6 class library to .Net Standard 2.0 and PowerShell Core 6 (ideally 6.2.2 or newer) in the next few months. |
@ChrisLynchHPE I hear you loud and clear. Been very busy with other work, but I'm coming back to this now. One big question I've been asking myself is should I keep FormatPx standalone or should I submit an RFC to have it included by default in PowerShell since PowerShell is open source. I don't mind supporting these modules standalone, but since they override default cmdlets I think a better solution would be integrated. I may end up doing both in the short term, to get support for this in PowerShell Core while I start a discussion on an RFC about fixing formatting in PowerShell to address all of the issues that FormatPx addresses. |
I would LOVE to see this as an enhancement to PowerShell Core itself, and the default Cmdlets. I can certainly help provide use cases in the discussion with the PowerShell team. |
@KirkMunro, is the pull request PowerShell/PowerShell#10430 you have made to the PowerShell project related to this? If so, I'd pull down your branch and test a build of 7.0-Beta with my module. |
Loosely. It allows objects such as Actually @ChrisLynchHPE, one place I could use your help is in figuring out if there is enough justification for FormatPx bits in PowerShell 7+. Today FormatPx provides several key values:
If I recall correctly, you leverage both of these key values in your use of FormatPx today (please correct me if I'm wrong). While each of those capabilities are important, if I were to start from scratch, I don't think I would design this module the same way today, with the main reason for that being performance. FormatPx overrides the
That clearly demonstrates that retrieving the process list is much, much faster than actually producing the formatting for that process list. Also, that's just the default formatting. If you use Given the performance hit with formatting, I think a better design would be to allow commands to identify the format that they want output (I'm thinking this could be done as part of the Something that would help me out @ChrisLynchHPE is if you could refresh my memory on exactly how you're using |
@ChrisLynchHPE: FYI, I just filed PowerShell/PowerShell Issue #10463 that shows my current line of thinking about this module and how I could move it forward into PowerShell. |
FYI for folks want this fixed: The PowerShell Team just merged a PR into PowerShell 7 that adds |
@ChrisLynchHPE did you perhaps get a chance to test with a nightly build of pwsh after the PR got merged or are you waiting for 7.0.0-preview.6 to be released? |
@mi-hol: I've tested this using a build with latest, and there is another issue, but that's due to how workflow was removed from PowerShell 7. I need to get that fixed ASAP, and then I'll retest. |
Ok, quick update on this:
Hopefully this will allow me to support PowerShell 7 with this module once these issues are out of the way, and once I get my code signing certificate back again. Stay tuned. |
I have not tested with any pre-release of PowerShell 7. Is there no way for FormatPX to be supported in PowerShell 6? I mean, who even uses Out-Printer??? |
Sure it's possible. I even begun working on it, moving Out-Printer into a separate DLL that would only be loaded on Windows. There are just some complications about me releasing right now (need an update code signing cert, and I have something else I need to get before I can make that happen). Plus, PowerShell 7 is much better than 6, so if I can get it working there easily, that would be my preference. Once 7 is out (and it's almost there) I see very little benefit to supporting 6. |
@ChrisLynchHPE Is PowerShell 6.x support a high-priority item for you? |
Considering I have not even begun to look at PowerShell 7, I would say yes. If there is a significant reason to encourage users to move to 7, that would be good to know. I can certainly start looking at PowerShell 7 over the upcoming US holiday break, which hopefully is RC by then. |
@ChrisLynchHPE Good to know, thanks. PS 7 is the right way to go for someone who hasn't really started doing much with PS 6.x yet. It fills so many gaps left open by 6.x, has many performance improvements, and a lot of new features that make the upgrade worth it, from my perspective at least. |
Revisiting this Kirk. I have moved forward with PowerShell 7.x, and customers I have spoken with have as well. So, is there any progress to finally fix the defect within PowerShell, even without needing FormatPX? |
Import module have to happen without errors in Linux. I have this module path listed in PS $env:PSModulePath.
$ Import-Module FormatPx -Verbose
VERBOSE: Loading module from path '/root/XX/library/FormatPx/FormatPx.psd1'.
VERBOSE: Loading module from path '/root/XX/library/FormatPx/FormatPx.dll'.
Import-Module : Could not load type 'Microsoft.PowerShell.Commands.OutPrinterCommand' from assembly 'Microsoft.PowerShell.Commands.Utility, Version=6.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
At line:1 char:1
Version Info:
$PSVersionTable
Name Value
PSVersion 6.2.0
PSEdition Core
GitCommitId 6.2.0
OS Linux 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
The text was updated successfully, but these errors were encountered: