Powershell 5 is expected to be released with Windows 10. It’s currently (April 2015) in preview. It’s backward compatible with Windows 8, 8.1, 2012, and 2012 R2. To get PS5 install WMF5 from this link. Here’s the general PowershellGet architecture:
For more information see the Powershell Gallery. PS5 installation requires a reboot
PS5 comes with PowershellGet module. To see its commands:
Get-Command -Module PowerShellGet
When running for the first time, run this command to automate the download of the needed nuget-anycpu.exe
Get-PackageProvider -Name NuGet -ForceBootstrap
$Modules = Find-Module
$Modules.Count # 153
$Modules | sort name | select * | Out-GridView
To install a module from the Gallery, use Install-Module as in:
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Alternatively, use the -Force parameter with the Install-Module command to avoid the untrusted repository prompt.
Pester is a great unit testing module to help test Powershell scripts, developed by David Wyatt and the Pester team. To see its commands:
Get-Command -Module Pester
Now I have this module and can use its commands.
One of the great benefits of a NuGet repository for PS modules like PowershellGet is version control, as it keeps track of module versions as they’re published. To see different versions of a module:
Find-Module -Name Pester -AllVersions | select version,PublishedDate | FT -a
DOT NET 3.5 was often hard to install on Windows 8, 8.1, 2012, and 2012 R2. I tested installing it on Windows 10 Technical Preview for Enterprise:
In Control Panel\Programs\Programs and Features, click turn Windows features on or off, and check the “.NET Framework 3.5” box and click OK
Click “Download files from Windows Update”
It just works!
Same can be done via the DISM command line utility:
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All
Again it works just fine!
SysPrep.exe is a tool located under c:\windows\system32\SysPrep folder. It can be used to “generalize” a Windows installation to be used for automated deployment instead of doing every fresh install from the ISO media.
After doing a fresh install of Windows 10 Technical Preview for Enterprise as a Gen 2 VM on Server 2012 R2 Hyper-V host, I ran Windows updates, enabled Remote Desktop, installed 2 Windows updates updates, rebooted, installed RSAT, then I ran SysPrep.exe
I chose to “Generalize” and “Shutdown”, so that I can copy the VM’s VHDX file to be used for other Windows 10 Technical Preview machine deployments.
Sysprep will prepare the system and shutdown the computer.
After copying the VHDX file, I restarted the VM:
Set Region and Language, accept license agreement, skip product key:
Although the product key was skipped, later on after the machine was setup and rebooted, Windows auto-activated. No need to enter a product key or manually activate:
Windows 10 Technical Preview and Windows 10 Technical Preview for Enterprise license expires April 15, 2015.
Enter a user name and password:
- Do NOT join the domain prior to running Sysprep. It will fail with “Fatal error” similar to this:
- Currently Sysprep does not let you use a local account that was setup prior to running SysPrep. You will have to setup another local account when using the SysPrep’d image
- Local Administrator account is disabled by default on Windows 10 Technical Preview
Remote Server Administration Tools (RSAT) for Windows 10 Technical Preview are now available for download. Download and install the version that matches your Windows 10 installation (x86 or x64)
I wanted to know what Powershell modules this will add to a fresh Windows 10 Technical Preview for Enterprise. So I used this short script:
Get-Module -ListAvailable | Select name,version,ModuleType,ClrVersion,PowershellVersion | Export-Csv .\Win10b-modules.csv -NoTypeInformation # Install RSAT tools for Windows 10 Technical Preview # http://www.microsoft.com/en-us/download/details.aspx?id=44280 .\WindowsTH-KB2693643-x64.msu Get-Module -ListAvailable | Select name,version,ModuleType,ClrVersion,PowershellVersion | Export-Csv .\Win10c-modules.csv -NoTypeInformation Compare-Object -ReferenceObject (Import-Csv .\Win10b-modules.csv).name ` -DifferenceObject (Import-Csv .\Win10c-modules.csv).name
The first 3 lines save a list of the installed PS modules in a CSV file.
Next I installed RSAT:
then accepted the license agreement.
Installation finished successfully. This added shortcuts to Server Manager tool (c:\windows\system32\ServerManager.exe) on the start menu and under All Apps
A comparison of the PS module before and after the installation showed that RSAT added the following 19 modules:
If you encounter errors with Sysprep see this KB article. It’s for Windows 8 but it applies to Windows 10 Technical Preview as well.
1/8/2015 – Window Technical Preview build 9879:
Some may have access to the new Windows Technical Preview build 9879 available in the MSDN subscription secure download site.
I’ve done a fresh install of Windows Technical Preview build 9879, and attempted to install RSAT normally. That just worked:
In another fresh install of WinTP 9879 I tried using DISM:
That completed successfully as well.
Some have reported errors attempting to install RSAT for Windows TP. I’ve downloaded the latest Windows TP ISO and did a fresh install as a Gen 2 virtual machine on Hyper-V 2012 R2. I downloaded and installed RSAT without any issue. I wan not able to replicate the problem. However, here’s another way to try to install it:
Download the WindowsTH-KB2693643-x64.msu file as usual – save it to the default location under ‘downloads’
Run the following script in Powershell_ISE (as administrator – elevated permissions)
$Path = "$env:USERPROFILE\downloads\WindowsTH-KB2693643-x64.msu"
# Exctract .cab file $Target = "$env:USERPROFILE\downloads\RSAT" wusa.exe $Path /extract:$Target
# Install via DISM $CAB = "$env:USERPROFILE\downloads\RSAT\WindowsTH-KB2693643-x64.cab" Dism.exe /Online /Add-Package /PackagePath:$CAB
On 10/2/2014 I ran Windows Updates on a plain vanilla installation of Windows 10 Technical Preview for Enterprise. It found 1 update:
I installed, and rebooted
It took a little longer than expected for a Gen 2 VM. After reboot, I looked for installed updates, and found 2 (!):
The first update is KB3001512 which addresses these issues:
- In Windows Technical Preview, certain devices do not receive firmware or driver updates.
- Adobe Flash update does not contain premium video playback.
- Some problems in the Compatibility View list for Internet Explorer 11
The second update is KB3002675. Powershell shows that its information link is http://support.microsoft.com/?kbid=3002675 but this seems to be a broken link at this time..
After installing Windows 10 Technical Preview on Windows Server 2012 R2, I checked the integration service. In Hyper-V Manager on the 2012 R2 host, all looked normal:
Running the following Powershell command on the 2012 R2 Hyper-V server showed that the Windows 10 Technical Preview VM comes with Integration Service version 6.4.9841
This command shows more details:
Running this comparison between Integration services for the this Windows 10 VM and a Server 2012 R2 VM:
Compare-Object -ReferenceObject (Get-VMIntegrationService -VMName v-Win10a | select *) -DifferenceObject (Get-VMIntegrationService -VMName v-2012R2-G2a | select *)
showed no difference (This does not show or compare integration service version.)
Checking versions of different Windows components in Windows 10 Technical Preview:
It comes with Powershell 5 !!
Looking at the OS version, it is version 6.4.9841.0
Navigation is almost identical to Windows 8.1/Server 2012 R2, which I find very comforting.
Checking the available Powershell modules with the command:
Get-Module -ListAvailable | Select name,version,ModuleType,ClrVersion,PowershellVersion | Export-Csv .\Win10-modules.csv -NoTypeInformation
Shows the following 62 modules:
I ran the same command on a Windows 2012 R2 server (that has Powershell 4) and ran a comparison:
Compare-Object -ReferenceObject (Import-Csv .\Win8-modules.csv).name ` -DifferenceObject (Import-Csv .\Win10-modules.csv).name
That showed the following 8 new modules:
AppBackgroundTask AssignedAccess Defender Microsoft.PowerShell.Archive Microsoft.PowerShell.ODataUtils NetworkSwitch OneGet PowerShellGet
Just installed Windows 10 Technical Preview as a Gen 2 VM on Server 2012 R2 Hyper-V. Here’s what we know:
It comes with IE 11:
The start menu looks like a combo of Windows 7 and Windows 8 tile:
I pinned the Powershell icons to the task bar, they were not there before..
Clicking on the logged on name on top bring up 3 options:
Trying the “Change account picture”:
I browsed to a picture and selected it. The browse dialog box defaulted to the Pictures folder:
The Lock option worked as expected:
By default it brought on the on screen keyboard..
The Sign out option had an error:
If you click All Apps at the bottom of the start menu you see:
Trying the search field:
I clicked Computer Management link on top expecting to get this:
but instead I got a Bing search:
I was able to get to the Computer Management tool via right-clicking on “This PC” in File Explorer and choosing Manage:
It seems anything you search for in the “Search Anywhere” box simply brings a Bing search..
Media: ISO file:
Setup: Gen 2 VM on Server 2012 R2 hypevisor, 50 GB disk, mounted the iso, 2 GB startup dynamic RAM, 1 GB minimum, 8 GB maximum, 4 cores.
After a reboot, this screen came up:
And, of course, I clicked “Customize”
I went with “Yes”
These are the default settings. For this test, I’m accepting all defaults
I’m pleasantly surprised that these are the defaults!
I did not like those much..
I had DHCP turned off on the network, so the VM did not pick up an IP address and could not connect to the Internet automatically. This is what I wanted. So, I clicked “Create a local account”
A Password hint is required.
and the familiar “Finalizing your settings” message..
and the desktop appeared. Installation is complete!
No key or license was needed.
That was quick and painless. No crash, no blue screen, no surprise. So far so good!!
I entered an IP address and was connected to the network and the Internet:
And the OS version was:
I got a copy of the ISO for Windows 10 Technical Preview for Enterprise:
Installation was identical to the above. I cannot see any differences from the version above. Both seem to be the Client OS version of Windows 10