Open PowerShell (Run as Administrator)
- Get-command: Search for related commands eg:get-command "*VM" search for commands that contain VMS
- update-help: Update the Help documentation to the latest version ; (same as: help-update)
- help new-vm: Get NEW-VM Help document assist NEW-VM- examples View Example
- ipconfig/all view IP address get-netipconfiguration -detailed View IP details
- get-netadapter: View network card information get-netadapterstatistics (recieved/send package number) & nbsp; get-netipaddress
- Configure IP address :new-netipaddress netsh Interface: Network configuration command line help new-netaddress-examples Get-command "*ipaddress" get IPAddress command
- configuration dns:set-dnsclientserveraddress & nbsp;
- Network error: ping Tracert or Telnet to determine whether the route or port is open
Tracert: Route tracking telnet: remote Access
-
- Ping remote server test-netconnection www.baidu.com
- Telnet port: Test-netconnection 8.8.8.8-port:53
- Trace path: test-netconnection 8.8.8.8-traceroute 103.235.46.39-traceroute
- Restart Service Restart-service
- Get current service Get-service |out-gridview
- Out-gridview output Format All PS commands are generic. You can output the results in tabular form.
- Stop Start Configuration service
- Stop-service Stop Service
- Start-service Open Service
- Set-service Setting up services
- Operations for AD and domain
- Restart your computer restart-computer
- Shutdown Shutdown-computer
- Join Domain Add-computer-domainname test.com
- To repair the trust relationship for AD (active Directory)
- AD stores information about network objects and makes it easy for administrators and users to find and use information. General exit domain Restart re-add domain reboot back to determine True means OK Flase indicates unable to connect AD requires Administrator password repair
- Command: Test-computersecurechannel-credential Domain\admin-repair
- Configure Firewall Profile
- Set-netfirewallprofile
- Set-netfirewallprofile-profile domain, public, private,-enabled True to open the firewall for Domain public Private
- Configuring firewall Policies
- Add role and feature
- Install-windowsfeature
- Install-windowsfeature Net-framework-core-source d:\sources \sxs
- Restart the ad user password
- convert-securestring Setting an encryption password
- Positioning FSMO (Flexible Single master operation) flexible one-master operation
- Get-adforest test.com|ft schemamaster (schema master)
- Get-adforest test.com|ft ridmaster (get rid Master of domain test.com)
- Migrating FSMO (operating host)
- Move-addirectoryserver Operationmasterrole
- View Hotfix
- Hyper-V under PowerShell command
- Get-command-module Hyper-V "*vm*" |measure
- Configuring virtual networks (Assigning virtual networks after VM creation)
- Get-vm
- Get-vmnetworkadapter
- Connnect-vmnetworkadapter
- To create a restore point
Common PowerShell commands