Войти
  • 35294Просмотров
  • 4 года назадОпубликованоACI Learning

Top 5 Useful PowerShell Commands

If you're a PowerShell user, then you likely have a handful of commands you use on a regular basis. Among the hundreds of cmdlets, there are likely a few useful ones that you're unaware of. Join Mike in this video as he shares his top 5 PowerShell commands! Looking for PowerShell training? Start learning today with ITProTV: 00:00 Intro 01:09 #1: Test-Path 05:50 #2: Get-ExecutionPolicy 08:22 #3: Get-Credential 10:58 #4: Invoke-Command 15:20 #5: Enter-PSSession Commands used in video: Test-Path “c:\ ” Test-Path “c:\ ” New-Item -ItemType File “c:\ ” If (!(Test-Path “c:\ ”)){ New-Item -ItemType File “c:\ ” } Test-Path -Path "HKLM:\Software\Microsoft\PowerShell\1\ShellIds\ " Test-Path $pshome\ -NewerThan "July 24, 2019" Get-ExecutionPolicy Set-ExecutionPolicy -ExecutionPolicy $creds = Get-Credential Invoke-Command -ComputerName svr01 -Credential $creds -ScriptBlock { Get-ExecutionPolicy} Invoke-Command -ComputerName svr01 -Credential $creds -FilePath “e:\scripts\ ” Enter-PSSession Exit-PSSession #toppowershellcommands #usefulpowershellcommands #bestpowershellcmdlets