--- description: In this lab, we explored basic PowerShell scripting --- # Lab10 - PowerShell ## AD Commands * `Neq-ADUser -Name "Charlie" -SamAccountName "charlie" - AccountPassword(Read-Host -AsSecureString "Password: ") -Enabled $true` * `Add-ADGroupMember -Identity "Sales-Users" - Members charlie`
## Allow PS Scripts to be Run * `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned` * This allows current users to run local scripts and digitally signed remote scripts ## Remote Access * `Enter-PSSession -ComputerName ` - interactive remote session
* `Invoke-Command -ComputerName -ScriptBlock { }` - launch a command remotely
* `Enable-PSRemoting` - allows remote commands to be executed on this machine