2021-09-18から1日間の記事一覧
共用のコード #pragma once #include <string> #include <format> #include <vector> std::vector<BYTE> GetTokenInformationInByteArray( HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass) { DWORD required; if (!::GetTokenInformation(TokenHandle, TOKEN_INFORMAT</byte></vector></format></string>…
#include <string> #include <iostream> #define STRICT #define NOMINMAX #include <Windows.h> #include <subauth.h> #include <ntlsa.h> #include <sddl.h> #include <wil/resource.h> #define THROW_IF_LSA_NTSTATUS_FAILED(status) THROW_IF_NTSTATUS_FAILED(::LsaNtStatusToWinError((status))) // LSA_UNICODE_STRIN…</wil/resource.h></sddl.h></ntlsa.h></subauth.h></windows.h></iostream></string>
Import-Moduleに-UseWindowsPowerShellを指定します。古いPowerShellではこのフラグなしでもAppxモジュールが読み込めたようですが、少なくともPowerShell 7では必要です。 Import-Module Appx -UseWindowsPowerShell Get-AppxPackage *Microsoft.Windows.Ph…