Administering Remote Computers
Admin operations on remote computers using PowerShell
Find Command and Help Command
#Find command
Get-Command -Module ChangeMe
#help Command
Help changeMePrior to any engagements ensure Remote Signed Policy is on
Set-ExecutionPolicy RemoteSignedEnable Remote Incomming Connections
Enable-PSremotingList the commands that contain session configuration
help *sessionconfiguration*
<# use code below to view the session configs of the PC#>
Get-PSSessionConfigurationTo establish a one-to-one connection to a PC
Enter-PSSession -ComputerName "PC_NAME"
#Make the connection persistent
$sessionOption = New-PSSessionOption -IdleTimeout 86400 # Set an idle timeout of 24 hours (86400 seconds)
$PcConn = New-PSSession –ComputerName 'PC_Here' -SessionOption $sessionOption
#To verify connectivity type the variable name and it will provide the connection session
$PcConn
To exit a session
To run a command on remote computers by means of remoting and executing the command Get-NetAdapter : Note (Change the -ScriptBlock [theCommand you want executed])
View memebers of Get Process
Display list of modules for LON-DC1 & Search for available module
Import Module & Check for Shares
Create a report with Windows Firewall Rules
List Local Hard Drives
Producce HTML Report for Previous Command
Remove Session
Last updated