Skip to content

Instantly share code, notes, and snippets.

@stknohg
Last active October 25, 2017 02:29
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save stknohg/57b2eaa83e709b9ab5aa9340df3fc019 to your computer and use it in GitHub Desktop.
Windows 10 Fall Creators Update(1709)で変更されたPowerShellモジュールについてのメモ

わかる範囲で適当に。

バージョン情報

PS C:\> $PSVersionTable | sort Name

Name                           Value
----                           -----
PSVersion                      5.1.16299.15
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.16299.15
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

変更のあったモジュール

Appx

Add-AppxPackageAppInstallerFileRelatedPackagesパラメーターが増えている。

ConfigCI

New-CIPolicyAllowFileNameFallbacksSpecificFileNameLevelパラメーターが増えている。

New-CIPolicyRuleAllowFileNameFallbacksSpecificFileNameLevelパラメーターが増えている。

Defender

Add-MpPreferenceAttackSurfaceReductionOnlyExclusionsControlledFolderAccessAllowedApplicationsControlledFolderAccessProtectedFolders AttackSurfaceReductionRules_IdsAttackSurfaceReductionRules_Actionsパラメーターが増えている。

Set-MpPreferenceに9つのパラメーターが増えている。

PKI

Import-PfxCertificateProtectPrivateKeyパラメーターが増えている。

ProcessMitigations

ProcessMitigationsモジュールが増えている。
使えるコマンドレットは以下。

PS C:\> Get-Command -Module ProcessMitigations

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Cmdlet          ConvertTo-ProcessMitigationPolicy                  1.0.11     ProcessMitigations
Cmdlet          Get-ProcessMitigation                              1.0.11     ProcessMitigations
Cmdlet          Set-ProcessMitigation                              1.0.11     ProcessMitigations

SmbShare

Get-SmbGlobalMappingNew-SmbGlobalMappingRemove-SmbGlobalMappingが追加されている。

SMB Global Mapping関連の機能で、元はWindows Server version 1709向けの実装っぽい。

New-SmbShareGet-SmbShareSet-SmbShareLeasingModeパラメーターが増えている。

New-SmbMappingRequireIntegrityRequirePrivacyパラメーターが増えている。

Storage

Add-StorageFaultDomainRemove-StorageFaultDomainDisable-StorageEnclosurePowerEnable-StorageEnclosurePowerGet-StorageExtendedStatusRemove-StorageHealthIntentが追加されている。

Clear-DiskSanitizeパラメーターが増えている。

Get-StorageFirmwareInformationUpdate-StorageFirmwareStorageEnclosureUniqueIdStorageEnclosureFriendlyNameStorageEnclosureパラメーターが増えている。

New-StorageTierNew-VirtualDiskNew-VolumeStorageFaultDomainsToUseパラメーターが増えている。

WindowsUpdate

Get-WindowsUpdateLogからSymbolServerパラメーターが消失している。

WindowsUpdateProvider

WindowsUpdateProviderモジュールが追加されている。
使えるコマンドレットは以下。

PS C:\> Get-Command -Module WindowsUpdateProvider

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Function        Get-WUAVersion                                     1.0.0.2    WindowsUpdateProvider
Function        Get-WUIsPendingReboot                              1.0.0.2    WindowsUpdateProvider
Function        Get-WULastInstallationDate                         1.0.0.2    WindowsUpdateProvider
Function        Get-WULastScanSuccessDate                          1.0.0.2    WindowsUpdateProvider
Function        Install-WUUpdates                                  1.0.0.2    WindowsUpdateProvider
Function        Start-WUScan                                       1.0.0.2    WindowsUpdateProvider

詳細情報が見つからないが、Windows Updateを自動化するための機能っぽい。

実装を調べたところ、root/Microsoft/Windows/WindowsUpdate名前空間の

  • MSFT_WUUpdate
  • MSFT_WUSettings
  • MSFT_WUOperations (MSFT_WUOperationsSessionの後継?)

クラスをラップしたものだった。  

以下の様にすることでWindwos Updateを自動適用できそう。

# Windows Updateのスキャン
$updates = Start-WUScan
# スキャン結果を適用
Install-WUUpdates -Updates $updates

PowerShell Remoting over SSH

2017/10/25現在、出来なくされれていた。

今後また復活するかはよくわからない。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment