PowerShell (edit)
Ứng dụng ví dụ: Xem thời gian khởi động máy
Tệp Get-ServerUptimeReport.ps1
+ Vào Start > tìm kiếm Power Shell bằng cách gõ "Windows PowerShell", rồi chạy chương trình đó bằng quyền Administrator
+ Chạy lệnh sau với chú ý có ký tự space (dấu cách) ở đầu dòng lệnh:
Set-ExecutionPolicy RemoteSigned > bấm 'Y' để đồng ý
& .\Get-ServerUptimeReport.ps1 -ComputerName MANHNV
Tìm đường dẫn của MSBuild.exe?
Vào PowerShell bằng quyền Administrator, gõ lệnh sau:
&"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe
Tìm đường dẫn của devenv.exe hoặc Installer\setup.exe? Vào Powershell, gõ lệnh sau
&"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -products *
https://www.windowscentral.com/how-create-and-run-your-first-powershell-script-file-windows-10
Windows PowerShell Integrated Scripting Environment (ISE)
Create PowerShell Script
Run PowerShell Script
Set-ExecutionPolicy RemoteSigned
CMD > Set-ExecutionPolicy RemoteSigned
CMD > & .\test.ps1
Auto Deploy with PowerShell
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe
Bài viết hay
https://dotnet-helpers.com/powershell/getting-computer-uptime-using-powershell/
https://4sysops.com/wiki/how-to-install-the-powershell-active-directory-module/
https://theitbros.com/install-and-import-powershell-active-directory-module/
https://thesysadminchannel.com/get-uptime-last-reboot-status-multiple-computers-powershell/
Tham khảo
https://stackoverflow.com/questions/2035193/how-to-run-a-powershell-script/2035209
https://www.addictivetips.com/windows-tips/auto-run-powershell-scripts-windows-10/
https://www.windowscentral.com/how-create-and-run-your-first-powershell-script-file-windows-10