#include <stdlib.h>
stdlib.h をインクルードした時なのだけれど、この定義は、
#ifndef _countof
#define _countof __crt_countof
#endif
<# | |
.SYNOPSIS | |
エクスプローラーの「PC」に表示されるアイコンを選択します | |
.DESCRIPTION | |
以下のキーを使って操作します。 | |
[ENTER] ... 選択結果をレジストリへ書き込んで終了します。選択は、サインアウト後に有効になります。 | |
[SPACE] ... 各項目を On/Off できます。 | |
[UP][DOWN] ... 項目間を移動できます。 | |
[ESC] ... 何もせず終了します。 |
function Get-VMList { | |
$credential = Import-CliXml -Path .\ServerCred.xml | |
$informations = @() | |
foreach ($vm in (Get-VM | Where-Object State -eq Running)) { | |
$informations += Invoke-Command -VMName $vm.Name -Credential $credential -ScriptBlock { | |
$info = Get-ComputerInfo | Select-Object -Property @{Name = "OS"; Expression = { $_.WindowsProductName + ' ' + $_.OSDisplayVersion } }, @{Name = "Name"; Expression = { $_.CsName } } | |
$info | Add-Member -MemberType NoteProperty -Name IP -Value (Get-NetIPAddress -AddressFamily IPv4 | Where-Object InterfaceAlias -notlike 'Loopback*' | ForEach-Object { $_.IPAddress }) | |
Write-Output $info | |
} |
#define INITGUID | |
#include <Windows.h> | |
#include <virtdisk.h> | |
#include <locale> | |
#include <iostream> | |
#include <filesystem> | |
#include <system_error> |
#include "trace.h" | |
#define WIN32_LEAN_AND_MEAN | |
#define NOMINMAX | |
#include <Windows.h> | |
#include <streambuf> | |
#include <system_error> | |
namespace trace | |
{ |
// スコープを抜ける前に後始末をするマクロ | |
#define MACRO_CLEANUP_RESOURCE(P, D) std::unique_ptr<std::remove_pointer<decltype(P)>::type, decltype(&D)> cleanup_##P(P, D) |
#include "pch.h" | |
#include <algorithm> | |
#include <initializer_list> | |
struct | |
{ | |
long min; | |
long max; | |
} |
#define WIN32_LEAN_AND_MEAN | |
#include <Windows.h> | |
#pragma message("__cplusplus=" _CRT_STRINGIZE(__cplusplus)) // 「追加のオプション」で /Zc:__cplusplus を足すのを忘れない | |
#include <locale> | |
#include <string> | |
#include <iostream> | |
#if __cplusplus >= 202002L |
@powershell -Command "(New-Object -ComObject WScript.Shell).CreateShortcut("""%~dpf1""")" |