今回は、Windows Server 2016 Essentials TP4のPowerShell コマンドレットは2012 R2と比べてどう変化したのかをまとめました。
PowerShell 比較一覧
比較するOSのPowerShell コマンドレットはOSをインストールした直後で比較しています。コマンドレットの頭に+ or -がついています。これは追加 or 削除を示します。
※両OSはWindows Updateを実行していません。
※Windows Server 2012 R2 Essentialsはwith Updateです。
Module | New Cmdlets | WSE 2016 TP4 | WSE 2012 R2 |
0 | 38 | 38 | |
ActiveDirectory | 0 | 147 | 147 |
ADCSAdministration | 1 | 13 | 12 |
+ Confirm-CAAttestationIdentityKeyInfo | |||
ADCSDeployment | 0 | 12 | 12 |
ADDSDeployment | 0 | 10 | 10 |
AppBackgroundTask | 6 | 6 | 0 |
+ Disable-AppBackgroundTaskDiagnosticLog + Enable-AppBackgroundTaskDiagnosticLog + Get-AppBackgroundTask + Set-AppBackgroundTaskResourcePolicy + Start-AppBackgroundTask + Unregister-AppBackgroundTask | |||
AppLocker | 0 | 5 | 5 |
Appx | 8 | 14 | 6 |
+ Add-AppxVolume + Dismount-AppxVolume + Get-AppxDefaultVolume + Get-AppxVolume + Mount-AppxVolume + Move-AppxPackage + Remove-AppxVolume + Set-AppxDefaultVolume | |||
AssignedAccess | 3 | 3 | 0 |
+ Clear-AssignedAccess + Get-AssignedAccess + Set-AssignedAccess | |||
BestPractices | 0 | 4 | 4 |
BitsTransfer | 0 | 8 | 8 |
BranchCache | 0 | 32 | 32 |
CimCmdlets | 0 | 14 | 14 |
CIPolicy | 1 | 1 | 0 |
+ ConvertFrom-CIPolicy | |||
ConfigCI | 12 | 12 | 0 |
+ Add-SignerRule + Edit-CIPolicyRule + Get-CIPolicy + Get-CIPolicyInfo + Get-SystemDriver + Merge-CIPolicy + New-CIPolicy + New-CIPolicyRule + Remove-CIPolicyRule + Set-CIPolicyVersion + Set-HVCIOptions + Set-RuleOption | |||
Defender | 12 | 12 | 0 |
+ Add-MpPreference + Get-MpComputerStatus + Get-MpPreference + Get-MpThreat + Get-MpThreatCatalog + Get-MpThreatDetection + Remove-MpPreference + Remove-MpThreat + Set-MpPreference + Start-MpScan + Start-MpWDOScan + Update-MpSignature | |||
DFSN | 0 | 23 | 23 |
DirectAccessClientComponents | 0 | 11 | 11 |
Dism | 4 | 43 | 39 |
+ Add-WindowsCapability + Expand-WindowsCustomDataImage + Get-WindowsCapability + Remove-WindowsCapability | |||
DnsClient | 0 | 17 | 17 |
DnsServer | 29 | 130 | 101 |
+ Add-DnsServerClientSubnet + Add-DnsServerQueryResolutionPolicy + Add-DnsServerRecursionScope + Add-DnsServerResponseRateLimitingExceptionlist + Add-DnsServerZoneScope + Add-DnsServerZoneTransferPolicy + Disable-DnsServerPolicy + Enable-DnsServerPolicy + Get-DnsServerClientSubnet + Get-DnsServerQueryResolutionPolicy + Get-DnsServerRecursionScope + Get-DnsServerResponseRateLimiting + Get-DnsServerResponseRateLimitingExceptionlist + Get-DnsServerRRL + Get-DnsServerZoneScope + Get-DnsServerZoneTransferPolicy + Remove-DnsServerClientSubnet + Remove-DnsServerQueryResolutionPolicy + Remove-DnsServerRecursionScope + Remove-DnsServerResponseRateLimitingExceptionlist + Remove-DnsServerZoneScope + Remove-DnsServerZoneTransferPolicy + Set-DnsServerClientSubnet + Set-DnsServerQueryResolutionPolicy + Set-DnsServerRecursionScope + Set-DnsServerResponseRateLimiting + Set-DnsServerResponseRateLimitingExceptionlist + Set-DnsServerRRL + Set-DnsServerZoneTransferPolicy | |||
EventTracingManagement | 14 | 14 | 0 |
+ Add-EtwTraceProvider + Get-AutologgerConfig + Get-EtwTraceProvider + Get-EtwTraceSession + New-AutologgerConfig + New-EtwTraceSession + Remove-AutologgerConfig + Remove-EtwTraceProvider + Remove-EtwTraceSession + Send-EtwTraceSession + Set-AutologgerConfig + Set-EtwTraceProvider + Set-EtwTraceSession + Start-AutologgerConfig | |||
GroupPolicy | 0 | 29 | 29 |
IISAdministration | 21 | 21 | 0 |
+ Clear-IISConfigCollection + Get-IISAppPool + Get-IISConfigAttributeValue + Get-IISConfigCollection + Get-IISConfigCollectionElement + Get-IISConfigElement + Get-IISConfigSection + Get-IISServerManager + Get-IISSite + New-IISConfigCollectionElement + New-IISSite + Remove-IISConfigAttribute + Remove-IISConfigCollectionElement + Remove-IISConfigElement + Remove-IISSite + Reset-IISServerManager + Set-IISConfigAttributeValue + Start-IISCommitDelay + Start-IISSite + Stop-IISCommitDelay + Stop-IISSite | |||
International | 0 | 18 | 18 |
iSCSI | 0 | 13 | 13 |
IscsiTarget | 0 | 28 | 28 |
ISE | 0 | 3 | 3 |
Kds | 0 | 6 | 6 |
Microsoft.PowerShell.Archive | 2 | 2 | 0 |
+ Compress-Archive + Expand-Archive | |||
Microsoft.PowerShell.Core | 7 | 62 | 55 |
+ Debug-Job + Enter-PSHostProcess + Exit-PSHostProcess + Get-PSHostProcessInfo + Get-PSSessionCapability + New-PSRoleCapabilityFile + Register-ArgumentCompleter | |||
Microsoft.PowerShell.Diagnostics | 0 | 5 | 5 |
Microsoft.PowerShell.Host | 0 | 2 | 2 |
Microsoft.PowerShell.Management | 4 | 86 | 82 |
+ Clear-RecycleBin + Get-Clipboard + Get-ItemPropertyValue + Set-Clipboard | |||
Microsoft.PowerShell.ODataUtils | 1 | 1 | 0 |
+ Export-ODataEndpointProxy | |||
Microsoft.PowerShell.Security | 3 | 13 | 10 |
+ Get-CmsMessage + Protect-CmsMessage + Unprotect-CmsMessage | |||
Microsoft.PowerShell.Utility | 14 | 107 | 93 |
+ ConvertFrom-SddlString + ConvertFrom-String + Convert-String + Debug-Runspace + Disable-RunspaceDebug + Enable-RunspaceDebug + Format-Hex + Get-Runspace + Get-RunspaceDebug + Import-PowerShellDataFile + New-Guid + New-TemporaryFile + Wait-Debugger + Write-Information | |||
Microsoft.WSMan.Management | 0 | 13 | 13 |
MMAgent | 0 | 5 | 5 |
MsDtc | 0 | 41 | 41 |
NetAdapter | 4 | 68 | 64 |
+ Disable-NetAdapterPacketDirect + Enable-NetAdapterPacketDirect + Get-NetAdapterPacketDirect + Set-NetAdapterPacketDirect | |||
NetConnection | 0 | 2 | 2 |
NetEventPacketCapture | 4 | 27 | 23 |
+ Add-NetEventWFPCaptureProvider + Get-NetEventWFPCaptureProvider + Remove-NetEventWFPCaptureProvider + Set-NetEventWFPCaptureProvider | |||
NetLbfo | 0 | 13 | 13 |
NetNat | 0 | 13 | 13 |
NetQos | 0 | 4 | 4 |
NetSecurity | 0 | 85 | 85 |
NetSwitchTeam | 0 | 7 | 7 |
NetTCPIP | 0 | 34 | 34 |
NetworkConnectivityStatus | 0 | 4 | 4 |
NetworkSwitchManager | 19 | 19 | 0 |
+ Disable-NetworkSwitchEthernetPort + Disable-NetworkSwitchFeature + Disable-NetworkSwitchVlan + Enable-NetworkSwitchEthernetPort + Enable-NetworkSwitchFeature + Enable-NetworkSwitchVlan + Get-NetworkSwitchEthernetPort + Get-NetworkSwitchFeature + Get-NetworkSwitchGlobalData + Get-NetworkSwitchVlan + New-NetworkSwitchVlan + Remove-NetworkSwitchEthernetPortIPAddress + Remove-NetworkSwitchVlan + Restore-NetworkSwitchConfiguration + Save-NetworkSwitchConfiguration + Set-NetworkSwitchEthernetPortIPAddress + Set-NetworkSwitchPortMode + Set-NetworkSwitchPortProperty + Set-NetworkSwitchVlanProperty | |||
NetworkTransition | 0 | 34 | 34 |
NFS | 0 | 42 | 42 |
PackageManagement | 13 | 13 | 0 |
+ Find-Package + Find-PackageProvider + Get-Package + Get-PackageProvider + Get-PackageSource + Import-PackageProvider + Install-Package + Install-PackageProvider + Register-PackageSource + Save-Package + Set-PackageSource + Uninstall-Package + Unregister-PackageSource | |||
PcsvDevice | 4 | 9 | 5 |
+ Clear-PcsvDeviceLog + Get-PcsvDeviceLog + Set-PcsvDeviceNetworkConfiguration + Set-PcsvDeviceUserPassword | |||
Pester | 20 | 20 | 0 |
+ AfterAll + AfterEach + Assert-MockCalled + Assert-VerifiableMocks + BeforeAll + BeforeEach + Context + Describe + Get-MockDynamicParameters + Get-TestDriveItem + In + InModuleScope + Invoke-Mock + Invoke-Pester + It + Mock + New-Fixture + Set-DynamicParameterVariables + Setup + Should | |||
PKI | 0 | 17 | 17 |
PlatformIdentifier | 1 | 1 | 0 |
+ Get-PlatformIdentifier | |||
PnpDevice | 4 | 4 | 0 |
+ Disable-PnpDevice + Enable-PnpDevice + Get-PnpDevice + Get-PnpDeviceProperty | |||
PowerShellGet | 23 | 23 | 0 |
+ Find-DscResource + Find-Module + Find-Script + Get-InstalledModule + Get-InstalledScript + Get-PSRepository + Install-Module + Install-Script + New-ScriptFileInfo + Publish-Module + Publish-Script + Register-PSRepository + Save-Module + Save-Script + Set-PSRepository + Test-ScriptFileInfo + Uninstall-Module + Uninstall-Script + Unregister-PSRepository + Update-Module + Update-ModuleManifest + Update-Script + Update-ScriptFileInfo | |||
PrintManagement | 0 | 22 | 22 |
PSDesiredStateConfiguration | 8 | 17 | 9 |
+ Disable-DscDebug + Enable-DscDebug + Get-DscConfigurationStatus + Invoke-DscResource + Publish-DscConfiguration + Remove-DscConfigurationDocument + Stop-DscConfiguration + Update-DscConfiguration | |||
PSDiagnostics | 0 | 10 | 10 |
PSReadline | 6 | 6 | 0 |
+ Get-PSReadlineKeyHandler + Get-PSReadlineOption + PSConsoleHostReadline + Remove-PSReadlineKeyHandler + Set-PSReadlineKeyHandler + Set-PSReadlineOption | |||
PSScheduledJob | 0 | 16 | 16 |
PSWorkflow | 0 | 2 | 2 |
PSWorkflowUtility | 0 | 1 | 1 |
RemoteAccess | 15 | 122 | 107 |
+ Add-BgpRouteAggregate + Add-VpnSstpProxyRule + Clear-BgpRouteFlapDampening + Disable-BgpRouteFlapDampening + Enable-BgpRouteFlapDampening + Get-BgpRouteAggregate + Get-BgpRouteFlapDampening + Get-VpnSstpProxyRule + New-VpnSstpProxyRule + New-VpnTrafficSelector + Remove-BgpRouteAggregate + Remove-VpnSstpProxyRule + Set-BgpRouteAggregate + Set-BgpRouteFlapDampening + Set-VpnSstpProxyRule | |||
RemoteDesktop | 5 | 78 | 73 |
+ Export-RDPersonalSessionDesktopAssignment + Get-RDPersonalSessionDesktopAssignment + Import-RDPersonalSessionDesktopAssignment + Remove-RDPersonalSessionDesktopAssignment + Set-RDPersonalSessionDesktopAssignment | |||
ScheduledTasks | 0 | 19 | 19 |
SecureBoot | 0 | 5 | 5 |
ServerCore | 0 | 2 | 2 |
ServerManager | 0 | 7 | 7 |
ServerManagerTasks | 0 | 11 | 11 |
SmbShare | 0 | 35 | 35 |
SmbWitness | 0 | 3 | 3 |
SoftwareInventoryLogging | 1 | 11 | 10 |
+ Get-SilComputerIdentity | |||
StartLayout | 3 | 3 | 0 |
+ Export-StartLayout + Get-StartApps + Import-StartLayout | |||
StartScreen | -3 | 0 | 3 |
- Export-StartLayout - Get-StartApps - Import-StartLayout | |||
Storage | 44 | 150 | 106 |
+ Block-FileShareAccess + Clear-StorageDiagnosticInfo + Debug-FileShare + Debug-StorageSubSystem + Debug-Volume + Disable-PhysicalDiskIdentification + Disable-StorageDiagnosticLog + Disable-StorageHighAvailability + Enable-PhysicalDiskIdentification + Enable-StorageDiagnosticLog + Enable-StorageHighAvailability + Get-DedupProperties + Get-DiskSNV + Get-DiskStorageNodeView + Get-FileShare + Get-FileShareAccessControlEntry + Get-PhysicalDiskSNV + Get-PhysicalDiskStorageNodeView + Get-StorageAdvancedProperty + Get-StorageDiagnosticInfo + Get-StorageEnclosureSNV + Get-StorageEnclosureStorageNodeView + Get-StorageFaultDomain + Get-StorageFileServer + Get-StorageFirmwareInformation + Get-StorageHealthAction + Get-StorageHealthReport + Get-StorageHealthSetting + Grant-FileShareAccess + New-FileShare + New-StorageFileServer + Optimize-StoragePool + Remove-FileShare + Remove-StorageFileServer + Remove-StorageHealthSetting + Revoke-FileShareAccess + Set-FileShare + Set-StorageFileServer + Set-StorageHealthSetting + Start-StorageDiagnosticLog + Stop-StorageDiagnosticLog + Stop-StorageJob + Unblock-FileShareAccess + Update-StorageFirmware | |||
TLS | 3 | 7 | 4 |
+ Disable-TlsCipherSuite + Enable-TlsCipherSuite + Get-TlsCipherSuite | |||
TroubleshootingPack | 0 | 2 | 2 |
TrustedPlatformModule | 0 | 11 | 11 |
UserAccessLogging | 0 | 14 | 14 |
VpnClient | 0 | 19 | 19 |
Wdac | 0 | 12 | 12 |
WebAdministration | 2 | 80 | 78 |
+ Begin-WebCommitDelay + End-WebCommitDelay | |||
Whea | 0 | 2 | 2 |
WindowsDeveloperLicense | 0 | 3 | 3 |
WindowsErrorReporting | 0 | 3 | 3 |
WindowsSearch | 0 | 2 | 2 |
WindowsServerBackup | 0 | 49 | 49 |
WindowsUpdate | 1 | 1 | 0 |
+ Get-WindowsUpdateLog | |||
WssCmdlets | -47 | 177 | 224 |
- Add-O365User - Add-WssMsoGroup - Add-WssMsoUser - Clear-O365AssignedUser - Disable-O365Integration - Disable-O365User - Disable-WssMsoIntegration - Disable-WssMsoSharePointPermissionInheritance - Disable-WssMsoUser - Enable-O365Integration - Enable-O365User - Enable-WssIntuneIntegration - Enable-WssMsoIntegration - Enable-WssMsoSharePointPermissionInheritance - Enable-WssMsoUser + Enable-WssWindowsServerAntimalware - Get-O365AssignedUser - Get-O365DnsRecord - Get-O365DomainConfiguration - Get-O365EmailAddresses - Get-O365SubscriptionInfo - Get-O365User + Get-WssComputerAccess + Get-WssDesignatedDC - Get-WssMsoAssignedGroup - Get-WssMsoAssignedUser - Get-WssMsoDomainConfiguration - Get-WssMsoGroup - Get-WssMsoSharePointLibrary - Get-WssMsoSharePointPermission - Get-WssMsoSharePointPrincipal - Get-WssMsoSharePointSite - Get-WssMsoSubscription - Get-WssMsoUser - Get-WssRouterInformation - New-WssMsoSharePointLibrary - Remove-O365Domain - Remove-O365User - Remove-WssMsoGroup - Remove-WssMsoGroupAssignment - Remove-WssMsoSharePointLibrary - Remove-WssMsoSharePointPermission - Remove-WssMsoUser - Remove-WssMsoUserAssignment - Rename-WssMsoAssignedUser - Repair-WssRouterConfiguration + Reset-WssRemoteWebAccessBackgroundImage + Reset-WssRemoteWebAccessLogo - Set-O365AssignedUser - Set-O365Domain - Set-O365EmailAddresses + Set-WssDesignatedDC - Set-WssMsoGroupAssignment - Set-WssMsoSharePointLibrary - Set-WssMsoSharePointPermission - Set-WssMsoUserAssignment - Set-WssMsoUserLicense - Start-WssRouterConfiguration - Update-O365AccountName | |||
WssSetupCmdlets | 0 | 5 | 5 |
WssCmdlets モジュールのコマンドレット数が激減している・・・
Windows Server 2012 R2 Essentials 専用PowerShell モジュール「WssCmdlets」にはOffice 365関連のPowerShell コマンドレットが含まれていましたが、Windows Server 2016 Essentials TP4では、新たにOnlineServicesWssCmdlets モジュールを設け、WssCmdlets モジュールから分離したようです。WssCmdlets モジュールのコマンドレット数が激減している理由はこういう訳なんですね。
Module | New Cmdlets | WSE 2016 TP4 | WSE 2012 R2 |
OnlineServicesWssCmdlets | 53 | 53 | 0 |
Add-O365User Add-WssMsoGroup Add-WssMsoUser Clear-O365AssignedUser Disable-O365Integration Disable-O365User Disable-WssAzureBackupIntegration Disable-WssMsoIntegration Disable-WssMsoSharePointPermissionInheritance Disable-WssMsoUser Enable-O365Integration Enable-O365User Enable-WssAzureBackupIntegration Enable-WssIntuneIntegration Enable-WssMsoIntegration Enable-WssMsoSharePointPermissionInheritance Enable-WssMsoUser Get-O365AssignedUser Get-O365DnsRecord Get-O365DomainConfiguration Get-O365EmailAddresses Get-O365SubscriptionInfo Get-O365User Get-WssMsoAssignedGroup Get-WssMsoAssignedUser Get-WssMsoDomainConfiguration Get-WssMsoGroup Get-WssMsoSharePointLibrary Get-WssMsoSharePointPermission Get-WssMsoSharePointPrincipal Get-WssMsoSharePointSite Get-WssMsoSubscription Get-WssMsoUser New-WssMsoSharePointLibrary Remove-O365Domain Remove-O365User Remove-WssMsoGroup Remove-WssMsoGroupAssignment Remove-WssMsoSharePointLibrary Remove-WssMsoSharePointPermission Remove-WssMsoUser Remove-WssMsoUserAssignment Rename-WssMsoAssignedUser Set-O365AssignedUser Set-O365Domain Set-O365EmailAddresses Set-WssMsoGroupAssignment Set-WssMsoSharePointLibrary Set-WssMsoSharePointPermission Set-WssMsoUserAssignment Set-WssMsoUserLicense Update-O365AccountName Update-WssMsoPasswordSynchronization |
余談:比較結果の元ネタ
今まで新旧OSのPowerShell コマンドレットを比較する場合、Excel 先生を使っていました。少し面倒ですが目視で確認よりは遥かに確実であり楽です。
Windows Server 2012 R2 Essentials 専用PowerShell コマンドレットの一覧と新旧OSでの違い | 元「なんでもエンジニ屋」のダメ日記
違いだけを確認したいなら、Microsoft File Server TeamのJose Barreto氏のPowerShell スクリプトが最高です。
New PowerShell cmdlets in Windows Server 2016 TP2 (compared to Windows Server 2012 R2)
余談:データソースの生成方法
Jose Barreto氏のPowerShell スクリプトを見るとデータソースはXMLファイルです。PowerShell コマンドレットの一覧をXML形式で出力するにはExport-Clixml コマンドレットを使います。
Get-Command | Export-Clixml <保存先>\<ファイル名>.xml