The following Function and Cmdlets are missing from Microsoft.PowerShell.Utility
Function ConvertFrom-SddlString 3.1.0.0 Microsoft.PowerShell.Utility
Cmdlet ConvertFrom-String 3.1.0.0 Microsoft.PowerShell.Utility
Cmdlet Convert-String 3.1.0.0 Microsoft.PowerShell.Utility
Cmdlet ConvertTo-Html 3.1.0.0 Microsoft.PowerShell.Utility
Cmdlet Export-PSSession 3.1.0.0 Microsoft.PowerShell.Utility
Cmdlet Import-PSSession 3.1.0.0 Microsoft.PowerShell.Utility
Cmdlet Out-GridView 3.1.0.0 Microsoft.PowerShell.Utility
Cmdlet Out-Printer 3.1.0.0 Microsoft.PowerShell.Utility
Cmdlet Send-MailMessage 3.1.0.0 Microsoft.PowerShell.Utility
Cmdlet Show-Command 3.1.0.0 Microsoft.PowerShell.Utility
Cmdlet Unblock-File 3.1.0.0 Microsoft.PowerShell.Utility
Cmdlet Update-List 3.1.0.0 Microsoft.PowerShell.Utility
It would be great if at least the Convert-FromString
, Convert-String
, ConvertTo-Html
, Send-MailMessage
and Update-List
Cmdlets get implemented. The Out-GridView
and Show-Command
Cmdlets may be difficult due to graphical interface requirements, similar for Out-Printer
with external printer requirement. A removal notice (ideally including explanation) should be added to the release notes for the other Cmdlets if they will be permanantly removed.
Command availability table need to be updated.
I just coming up with these missing ones. But specially I was need the ConvertTo-Html cmdlet.
+1 on the missing ConvertTo-Html
Missing Send-MailMessage
This example from Technet to solve my issue with missing the ConvertTo-Html cmdlet does not work either.
$URL = Read-Host "Enter URL to Decode"
$Encode = [System.Web.HttpUtility]::UrlEncode($URL)
Write-Host "This is the Encoded URL" $Encode -ForegroundColor Green
`
EDIT: found a working solution
[uri]::EscapeDataString($SitePath)
+1 on the missing ConvertTo-Html
I successfully build the PS module in Ubuntu 16.04 as shown in https://github.com/PowerShell/PowerShell/blob/master/docs/building/linux.md
I am doing some tests and I have this error:
Unable to find type [System.Net.ServicePointManager].
Also I can't find [System.Web].
@PowerShell/powershell-committee reviewed this, show-command, unblock-file, out-gridview, out-printer won't be in PowerShell Core. ConvertFrom-String and Convert-String is dependent on MSR. The other ones should be in PS Core.
Is there any documentation I could read to get a better understanding of the planned structure? Is there a definition of PowerShell Core? Are there other PowerShell ??? kits defined?
Today I was looking for [System.Web.HttpUtility]::HtmlEncode(), but ended up using [uri]::EscapeDataString() mentioned in this issue. Not totally the same thing.
Are there plans to implement Send-MailMessage? Maybe this should be broken out into separate issues for specific cmdlet implementations.
Is ConvertFrom-String going to be added? I see in a comment above it is dependent on MSR.... what does this mean?
No plans at this time to port ConvertFrom-String. MSR means Microsoft Research. That cmdlet uses code not planned to be Open Source.
I was wondering what is the fundamental opposition against Unblock-File
. The problem is, that without it on Windows, PS Core as it is, is very hard to use. #2657 shows that there is a major perf difference when it comes to downloaded content, may that be from the browser or an installed module.
_(I suspect that the ~5 second startup time of PS6 versus ~0.7 second startup of PS5 is due to some similar difference, even though I unblocked the entire PS6 install dir and all downloaded modules already. Something must still remain unblocked I guess.)_
I really want to advocate PS6 at my institute for daily use not just by sysadmins, but also end users. Truth is, discrepancies like Unblock-File, the total absence of NetAdapter cmdlets really take a toll on its view. I must say things like:
"Well, if you're on Windows, you can configure your network like this. If you're on Linux, you still gotta go with the same config files and/or config utilities. If you're on Windows, you gotta unblock the downloaded content you trust; to do that, pop-open another shell with slightly different language rules (& operator vs. operator &) and issue that oneliner there."
These stuff breaks the workflow and generally give the picture, that PS6 is a hack. I will probably demo PS5 on Windows and PS6 on Linux and just silently omit the differences (and also not show any of the differing parts which hurts usability on both ends), and also one has to make do with stuff like: don't use Workflow Foundation, because that stuff is not portable, also don't use DSC, beause proper PowerShell DSC resources don't exist yet (OMI+Linux vs. WMI is a strange duality, I'd rather mention DSC only when it's properly portable), even if it did, the number of Linux resources greatly lack landscape. (User, Group, Package and File. Really??? No NetAdapter, DNS, PackageMirror, PXEServer, PXEClient, ApacheServer or any of the interesting stuff??)
Apologies for the lengthy ranting, I understand that PS6 is the first step on a very long journey, but missing core cmdlets that are part of the basic workflow doesn't paint a good picture. Download a zip from web, extract/expand, deploy and run.
How should I advocate PS6 with these issues? Any Linux sysadmin will think operning a terminal in 5 seconds is a joke already.
_Just to be fair, when no $PROFILE
file exists, PS6 launches just as fast as PS5 (with a simple profile). If I create an empty $PROFILE
file, (totally empty), it adds 4 seconds to the startup time. Reported under #5345_
@MathiasMagnus We already have Unblock-File
in PowerShell Core. Microsoft.PowerShell.Archive is not in the repo.
Did you run startup tests on the latest version?
Current status:
Well, it exists, it just doesn't work.
PS C:\Users\Matty> Unblock-File $PROFILE
Unblock-File : A rendszer nem tal谩lja a megadott f谩jlt
At line:1 char:1
+ Unblock-File $PROFILE
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\Users\Matty\...ell_profile.ps1:String) [Unblock-File], Win32Except
ion
+ FullyQualifiedErrorId : RemoveItemUnauthorizedAccessError,Microsoft.PowerShell.Commands.UnblockFileCommand
PS C:\Users\Matty> Test-Path $PROFILE
True
It throws an UnautorizedAccessError exception on my own profile, and any file I tested it with. How can my setup go wrong?
@MathiasMagnus working for me on beta.9 using win-x64.zip release:
unblock-file .\PowerShell-6.0.0-beta.9-win-x86.zip
However, if the file is not blocked, you will get that error message:
#running second time
PS C:\Users\slee\Downloads> unblock-file .\PowerShell-6.0.0-beta.9-win-x86.zip
unblock-file : The system cannot find the file specified
At line:1 char:1
+ unblock-file .\PowerShell-6.0.0-beta.9-win-x86.zip
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\Users\slee\D...a.9-win-x86.zip:String) [Unblock-File], Win32Exception
+ FullyQualifiedErrorId : RemoveItemUnauthorizedAccessError,Microsoft.PowerShell.Commands.UnblockFileCommand
We should probably quietly succeed if that stream isn't available to remove. Created issue https://github.com/PowerShell/PowerShell/issues/5353
@SteveL-MSFT Thanks for looking into it, and thanks to @iSazonov for the fix. Not being a .NET developer (C++ and GPGPU) I very often feel dumb when I try to debug anything PS related. I just use it as an interactive shell (and very little scripting) as a replacement for bash, but with an actual type system (something I feel home at).
@MathiasMagnus We welcome any feedback. Not only bugs but also the most hot features.
I'm prepping a PR to add Update-List
the other cmdlets we don't have any plans to port
Just out of interest: What's the reason why Out-GridView
won't be part of PS Core?
The current implementation (in Windows PowerShell) uses WPF which isn't available on Linux or macOS.
@rkeithhill thanks for the explanation!
We want and have plans to implement Out-GridView
on another platform.
When did Test-Connection disappear and why? It was in RC1 I believe...
Test-Connection
was not ported (old Windows only code). Currently we have new ported version in #5328 but not jet merged.
I updated current status in https://github.com/PowerShell/PowerShell/issues/2123#issuecomment-341996659
I believe we can close the issue.
Most helpful comment
We want and have plans to implement
Out-GridView
on another platform.