Add Windows Defender excluded folder

Add-MpPreference -ExclusionPath "C:\Temp"  

Add IP address

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

With gateway

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

Remove IP address

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

With gateway

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

Remove default gateway

Remove-NetRoute -InterfaceAlias "Ethernet" -NextHope  

Change DNS

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

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