Use script : Running PowerShell Scripts on Windows Server 2008

Publié le: 09 octobre 2016
sur la chaîne: microsoft lab
7,672
7

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.19\Script - 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


Sur cette page du site, vous pouvez voir la vidéo en ligne Use script : Running PowerShell Scripts on Windows Server 2008 durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur microsoft lab 09 octobre 2016, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 7,672 fois et il a aimé 7 téléspectateurs. Bon visionnage!