Add Windows Defender excluded folder

Add-MpPreference -ExclusionPath "C:\Temp"  

Add IP address

New-NetIPAddress –InterfaceAlias "Ethernet" –IPAddress "192.168.178.211" –PrefixLength 24  

With gateway

New-NetIPAddress –InterfaceAlias "Ethernet" –IPAddress "192.168.178.211" –PrefixLength 24 -DefaultGateway 192.168.178.1  

Remove IP address

Remove-NetIPAddress –InterfaceAlias "Ethernet" –IPAddress "192.168.178.212" –PrefixLength 24  

With gateway

Remove-NetIPAddress –InterfaceAlias "Ethernet" –IPAddress "192.168.178.212" –PrefixLength 24 -DefaultGateway 192.168.178.1  

Remove default gateway

Remove-NetRoute -InterfaceAlias "Ethernet" -NextHope 192.168.178.1  

Change DNS

Set-DNSClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses ("1.1.1.1","1.0.0.1")  

Enable PowerShell remoting

Enable-PSRemoting -Force  
Set-Service WinRM -StartMode Automatic  
Set-Item WSMan:\localhost\Client\TrustedHosts -Value * -Force  

Open remote PowerShell session

Enter-PsSession -ComputerName <HostOrIp> -Credential hostname\username  

Create SMB share

New-SMBShare -Name "Shared" -Path "C:\Shared" -FullAccess "Everyone"  

Enable/disable firewall

Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True/False