PowerShell: Turn Off the Windows Firewall in Windows Server

Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False
Advertisements

Powershell: switch from normal mode to administrator mode

Start-Process powershell -Verb runAs

Exchange online: convert mailbox to shared

To convert a user mailbox to shared mailbox
get-mailbox -identity user@domain.com | set-mailbox -type “Shared”

SharePoint Powershell command

Get-SPDatabase | select Name | out-file “list.txt”      —   give you the list of all the Content Database names in your SharePoint Farm into a file

Powershell – list of nested group membership of AD user

function GetGroups ($object) { Get-ADPrincipalGroupMembership $object | ForEach ` { $_ Get-ADPrincipalGroupMembership $_ } }

GetGroups username | select name -Unique

Windows PowerShell Command

Add-WindowsFeature Desktop-Experience  – Add a new Windows Desktop Experience feature

PowerShell: record session

start-transcript