Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!
@ECHO OFF SETLOCAL EnableDelayedExpansion SET LogFile=%~dpn0.log FOR /F %%A IN ('net view ^| FINDSTR -I "\\PC \\Wrk"') DO ( SET PC=%%A SET PC=!PC:\\=! FOR /F %%B IN ('WMIC /NODE:!PC! list NIC') DO ( FOR /F %%C IN ('WMIC /NODE:!PC! Read status /NIC:%%B "Allow the computer to turn off this device to save power"') DO ( ECHO %%A %%B %%C ECHO %%A %%B %%C>>"%LogFile%" IF %%C EQU CHECKED WMIC /NODE!PC! unckeck /NIC:%%B "Allow the computer to turn off this device to save power" ) ) ) PAUSE EXIT
Join the community of 500,000 technology professionals and ask your questions.