Windows 8.1, PowerShell 4.0, and new cmdlets

windowsblue_powershell.png

When new builds of Windows leak, most people focus on easily accessible features such as the user interface or file system. While those are certainly important areas, I feel changes to the underpinnings of Windows, such as its APIs and related developer tools, often go unseen (and are, frankly, more interesting). So today, I'm switching gears and sharing my notes on Windows PowerShell cmdlets and changes coming in Windows 8.1 "Blue" (as of leaked build 9374).

VPN Configuration

Windows 8.1 features shiny new VPN configuration cmdlets to replace your aging rasdial and route-based batch files.

Add-VpnConnection
Add-VpnConnectionRoute
Add-VpnConnectionTriggerApplication
Add-VpnConnectionTriggerDnsConfiguration
Get-VpnConnectionTrigger
New-VpnServerAddress
Remove-VpnConnectionRoute
Remove-VpnConnectionTriggerApplication
Remove-VpnConnectionTriggerDnsConfiguration
Set-VpnConnectionIPsecConfiguration
Set-VpnConnectionTriggerDnsConfiguration

Windows Defender

Finer control of Windows Defender across the enterprise is now possible with these new cmdlets. (Strangely, the Windows Defender team opted to shorten the WindowsDefender prefix, breaking the usual cmdlet naming guidance/pattern. I suspect we'll see them right the ship here, so be careful if you're writing scripts around these cmdlets.)

Add-WDefPreference
Get-WDefComputerStatus
Get-WDefPreference
Get-WDefThreat
Get-WDefThreatCatalog
Get-WDefThreatDetection
Remove-WDefPreference
Remove-WDefThreat
Set-WDefPreference
Start-WDefScan
Update-WDefSignature

Start Screen

These cmdlets make customization of the Start Screen way easier than previous methods.

Export-StartLayout
Get-StartApps
Import-StartLayout

DISM

The Deployment Image Servicing and Management tool in Windows has always been an odd PowerShell cmdlet wanna-be, with its similar but frustratingly different command syntax. Wrapping that functionality, however, are new cmdlets, and they couldn't come quickly enough.

Add-WindowsImage
Expand-WindowsImage
Export-WindowsImage
Get-WindowsImageContent
New-WindowsImage
Remove-WindowsImage
Split-WindowsImage
Set-AppXProvisionedDataFile

Kiosk

Funny enough, Paul Thurrott and I just wrote about Kiosk Mode in Windows 8.1. These cmdlets make managing Kiosk Mode even easier.

Clear-KioskLockdown
Get-KioskLockdown
Set-KioskLockdown

NAT Mangement

These cmdlets appear to pertain to Network Address Translation (NAT) components in the Routing and Remote Access feature present in Windows Server, not the NAT on your home network.

Add-NetNatExternalAddress
Add-NetNatStaticMapping
Get-NetNat
Get-NetNatExternalAddress
Get-NetNatSession
Get-NetNatStaticMapping
New-NetNat
Set-NetNat
Remove-NetNat
Remove-NetNatExternalAddress
Remove-NetNatStaticMapping

TPM

A few handy Trusted Platform Module cmdlets that would otherwise require digging through the TPM Management console or TPM Base Services API.

Confirm-TpmFunctionality
Get-TpmEndorsementKeyInfo
Get-TpmSupportedFeatures

WMI

It's always nice to see improvements to the way we access the blackbox that is Windows Management Instrumentation.

ConvertTo-MOFInstance
Get-MofInstanceText
Test-MofInstanceText
Clear-CachedCimSchema
Get-CachedCimSchema

Import-CimInstances
Import-CimSchema

TCP/IP

I'm not familiar with the concept of network "compartments", so can't offer much here. I suspect this is a Server "Blue" -specific addition that will make sense in the future.

Get-NetCompartment

Systems Management

New Physical Computer System View (PCSV) cmdlets ready Windows for next generation systems management in the enterprise.

Get-PCSVDevice
Restart-PCSVDevice
Start-PCSVDevice
Stop-PCSVDevice
Set-PCSVDeviceNextBoot
Invoke-DscConfiguration

Storage

I suspect the storage tier cmdlets are used to manage storage-related roles in Server "Blue" that I'm not familiar with. The Storage Pool cmdlet however can be used to interact with Storage Pools present in both client and server SKUs.

Clear-FileStorageTier
Get-StorageTier
Get-StorageTierSupportedSize
Get-FileStorageTier
Register-StorageSubsystem
Set-FileStorageTier
Set-StorageTier
New-StorageTier
Remove-StorageTier
Resize-StorageTier
Unregister-StorageSubsystem
Update-StoragePool

Volume

Little doodad cmdlets that will probably only be used by a niche group of admins out there.

Disable-VolumeShortnameGeneration
Enable-VolumeShortnameGeneration
Get-VolumeExtendedInformation
Write-VolumeCache
Write-FileSystemCache

SMB

We're seeing the beginnings of what's clearly an effort to wrap Systems Management Bus (SMB) API here.

Move-SmbClient

Printer

I don't think we're getting a sneak peak of some next-generation Near Field Communications (NFC) printer technology here. I suspect these cmdlets are to aid in enterprise printer asset tracking. We'll undoubtedly learn more when Windows Server "Blue" hits.

Read-PrinterNfcTag
Write-PrinterNfcTag

PowerShell 4.0?

A screenshot of PowerShell registry data in Windows 8.1 build 9379, courtesy of WinClub.pl

As of writing, a screenshot of an even newer build of Windows 8.1 (9379) is making rounds. Assuming the screenshot is accurate, PowerShell will be seeing a bump to 4.0, suggesting language changes may be coming. When more details become available, I'll let you know.

Blue's Clues: Enabling Kiosk Mode

Over the weekend, a newer build (9374) of Windows 8.1 -- Microsoft's incremental update to Windows 8 -- leaked. One of the new features that surfaced in this build is something called "Kiosk mode".

Kiosk mode, in a nutshell, is a mode that, when turned on, keeps a single "Metro" application on the foreground at all times. (This application is run in a limited user context for obvious security reasons.) It's unclear if we'll see desktop application support -- my guess is no, given desktop apps have a much richer set of (uncontrolled) APIs available to them. For more, check out Paul Thurrott's "Blue's Clues: Kiosk Mode" article.

A cursory examination of Kiosk mode would lead you (like many tech bloggers) to believe the feature is broken in this build of Windows. But this is not the case. In fact, enabling Kiosk mode is easy but admittedly non-intuitive. Here's how:

  1. Create a limited user. You can do this PC Settings, Users, User accounts, then Add a user. (I recommend a Local Account but you can use a Microsoft account.)

  2. Log in as the limited user. You can switch to the newly created user by clicking your Start Screen user tile. (You'll have to sit through the welcome tour again, sorry.)
  3. Log out of the limited user.
  4. Switch back to your normal account and configure Kiosk mode with the new account and preferred foreground app -- Bing is a good one.
  5. Log in as your limited user. Your app should load immediately.

Blue's Clues: Enabling the new Search Pane

Taking a break from Internet Explorer 11, Paul Thurrott and I decided to take a look at some improvements coming to Search in the next version of Windows 8.1, codenamed "Blue".

The new Search Pane in Windows 8.1 does away with the visually distinct result categories -- Apps, Settings, and Files -- and instead provides results sorted by relevance in an easily accessible manner.

Paul has a full rundown of the new Search Pane in his "Blue's Clues: New Search Experience", so be sure to read that.

But if you're just looking to play around with it, you can do so via the registry script below. (Be sure to restart Explorer after running.) Be aware, however, that the Search Pane is buggy, incomplete, and does not appear to be finding settings correctly. I'll keep working on it and post any updates here.


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SearchPane]
"NewSearchPane"=dword:00000001
"NewSettingsSearch"=dword:00000001
"NewFilesSearch"=dword:00000001

Blue's Clues: Internet Explorer 11 getting SPDY support

WebGL isn't the only big ticket item coming to Internet Explorer 11. No, digging deeper into IE 11, I found references to that newfangled SPDY protocol -- a protocol designed primary by Google to generally make the web go faster. Paul has a quick summary you should check out.

Oops. Internet Explorer 11 doesn't pass this test just yet.

Oops. Internet Explorer 11 doesn't pass this test just yet.

I can't talk SPDY or even properly demonstrate it working (as the screenshot confirms), but can say it's coming and is being implemented at the OS level (via additions to the Windows Internet API.) That means most internet apps -- like IE 11 -- will be SPDY ready for free.

You can tinker with this today with the registry script below. If you manage to get IE to confirm SPDY logic is enabled, please ping me!

[This is not an April Fool's joke.]


Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"EnableSpdy"=dword:00000001
"EnableSpdyDebug"=dword:00000001

; // Forces SPDY to function outside its expected
; // SSL/TLS environment
"ForceSpdyHttp"=dword:00000000

; // Disable SPDY compression of HTTP headers/data
; // for debug/test
"DisableSpdyCompression"=dword:00000000