Today we are not talking about code but about PowerShell in general. Microsoft has announced that the next release of PowerShell is called “PowerShell 7” and will be based on .NET Core 3.0. This is significant because .NET Core 3.0 re-introduces WPF (Windows Presentation Foundation, GUIs), at least on Windows machines. This way, PowerShell can re-introduce GUI-dependent cmdlets such as Out-GridView, and it is also expected that PowerShell 7 will aim to close the gap in feature set that currently prevents most Windows admins from using PowerShell 6.
While it will still be a way until PowerShell 7 is on equal height on Windows system, we suggest you stay on top of the news and read this:
https://devblogs.microsoft.com/powershell/the-next-release-of-powershell-powershell-7/
psconf.eu – PowerShell Conference EU 2019 – June 4-7, Hannover Germany – visit www.psconf.eu There aren’t too many trainings around for experienced PowerShell scripters where you really still learn something new. But there’s one place you don’t want to miss: PowerShell Conference EU - with 40 renown international speakers including PowerShell team members and MVPs, plus 350 professional and creative PowerShell scripters. Registration is open at www.psconf.eu, and the full 3-track 4-days agenda becomes available soon. Once a year it’s just a smart move to come together, update know-how, learn about security and mitigations, and bring home fresh ideas and authoritative guidance. We’d sure love to see and hear from you!
ReTweet this Tip!
The day PS7 includes the Active Directory module then will be useful, otherwise is just another tool
CoderDude
But... but... but...
You can add the AD stuff, at least on Windows with PSCorev6 using the Windows Compatibility module. THis is fully documented, by Microsoft, here:
devblogs.microsoft.com/.../announcing-general-availability-of-the-windows-compatibility-module-1-0-0
In PSv7, did you even download it, install it, and look, before making your statement?
Just say'in.
PS D:\Scripts> $host
Name : ConsoleHost
Version : 7.0.0-preview.1
InstanceId : fb1de603-9a04-49eb-86c5-82939925a394
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-US
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace
PS D:\Scripts> Get-Module
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 6.1.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-Item, Clear-ItemProperty…}
Manifest 6.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object…}
Script 2.0.0 PSReadLine {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PSRe…
Script 1.0.0 WindowsCompatibility {Add-WindowsPSModulePath, Add-WinFunction, Compare-WinModule…
PS D:\Scripts> Get-Module -ListAvailable
Directory: C:\Program Files\PowerShell\Modules
ModuleType Version Name PSEdition ExportedCommands
---------- ------- ---- --------- ----------------
Script 1.0.0 WindowsCompatibility Core {Initialize-WinSession, Add-WinFunction, Invoke-Wi…
Directory: C:\program files\powershell\7-preview\Modules
Manifest 6.1.0.0 CimCmdlets Core {Get-CimAssociatedInstance, Get-CimClass, Get-CimI…
Manifest 1.2.3.0 Microsoft.PowerShell.Archive Desk {Compress-Archive, Expand-Archive}
Manifest 6.1.0.0 Microsoft.PowerShell.Diagnostics Core {Get-WinEvent, New-WinEvent}
Manifest 6.1.0.0 Microsoft.PowerShell.Host Core {Start-Transcript, Stop-Transcript}
Manifest 6.1.0.0 Microsoft.PowerShell.Management Core {Add-Content, Clear-Content, Clear-ItemProperty, J…
Manifest 6.1.0.0 Microsoft.PowerShell.Security Core {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credent…
Manifest 6.1.0.0 Microsoft.PowerShell.Utility Core {Export-Alias, Get-Alias, Import-Alias, New-Alias…}
Manifest 6.1.0.0 Microsoft.WSMan.Management Core {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WS…
Script 1.4 PackageManagement Desk {Find-Package, Get-Package, Get-PackageProvider, G…
Script 2.1.4 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-Module, Find…
Script 0.0 PSDesiredStateConfiguration Desk {AddDscResourcePropertyFromMetadata, Get-MofInstan…
Script 6.1.0.0 PSDiagnostics Core {Disable-PSTrace, Disable-PSWSManCombinedTrace, Di…
Script 2.0.0 PSReadLine Desk {Get-PSReadLineKeyHandler, Set-PSReadLineKeyHandle…
Binary 1.1.2 ThreadJob Desk Start-ThreadJob
Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules
Manifest 1.0.1.0 ActiveDirectory Core,Desk {Add-ADCentralAccessPolicyMember, Add-ADComputerSe…
Manifest 2.0.1.0 Appx Core,Desk {Add-AppxPackage, Get-AppxPackage, Get-AppxPackage…
Script 1.0.0.0 AssignedAccess Core,Desk {Clear-AssignedAccess, Get-AssignedAccess, Set-Ass…
...
As long as you in in a Windows Forest / doman, and can reach an DC, you can most certainly use it.
PS D:\Scripts> Import-Module -Name ActiveDirectory
WARNING: Error initializing default drive: 'Unable to find a default server with Active Directory Web Services running.'.
On WS2K19, and PSCore, it is there, MS demo'd this at MSIgnite 2018.
So, no, not exactly like RSAT, but there.
I've been playing with the 'Core' flavors and they are nice but still in my opinion not ready for prime time or to be even considered as winPS5.1 replacement, the modules I have at work (some using the AD Module) work like a champ in 5.1 but on Core is a hit and miss or do not work at all and yes, I have followed the documentation and all that jive (even re-written some to make them compatible with Core), I'm not bashing PS Core, just saying that still has a long way to go in my opinion.
Don't get me wrong. I too am still dedicated to 5x, due to not only what you are espousing, but of the tons of heavy customization I have in the ISE for my daily work and stuff that will mostly not work in 6x and beyond until they reach parity, if ever they do. I have my complaints about 6x and beyond as well as VSCode instabilities / frustrations, etc., vs the ISE. Core was just the push to go cross platform, which is why the adoption of non-Win types is far greater than us, hence the MS push with v7 to try and address it. I've been using PowerShell, since before it was called PowerShell. I was an alpha tester on Monad and beyond. So, Core was like going back to those days. So, yep disappointing on initial releases, and unusable for me, but it has come along, but still has a ways to go.