Use script : Running PowerShell Scripts on Windows Server 2008 HD
Use script - Running PowerShell Scripts on Windows Server 2008 1. Prepare - DC1 : Domain Controller - DC2 : Domain member - DC19 : File server; IP 10.0.0.19 2. Step by step : Run script CheckService.ps1 (default prevents all scripts from running) - DC12 : Copy file Done.sp1 from DC19 : + Right-click Start - Run -\10.0.0.19Script - Copy CheckService.ps1 to desktop + Double-click CheckService.ps1 # View content + Right-click CheckService.ps1 - Run with PowerShell = Disappear + Click Windows PowerShell : + Get-ExecutionPolicy # Display the current execution policy + Set-ExecutionPolicy RemoteSigned - Y # Set the execution policy + Double-click CheckService.ps1 : + Replace "pause" to "$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")" + Right-click CheckService.ps1 - Run with PowerShell - OK
Похожие видео
Показать еще