The below PowerShell script will generate a CSV file that lists each replication subnet in Active Directory Sites and Services. The list includes the site associated with the subnet, and whether or not a domain controller is in the site. …
Exchange resource mailboxes can be defined as conference rooms or equipment. Each of these mailboxes have a booking attendant service that is turned on by default. Sending a scheduling request (a meeting invite) to a resource mailbox will trigger the …
When working with multi-dimensional arrays like imported CSV data, sometimes you want to change one or more values in one of the rows. For example, you have imported user account data from a CSV file that uses an AD account’s …
You have a domain joined computer, and you want to add a domain user or domain group to one of the computer’s local groups. If you have administrative permissions on the domain joined computer, this can be done quickly with …
Some PowerShell commands to quickly add a Windows 2012 R2 server to an active directory domain in a lab environment. This includes configuring the NIC, renaming the server, and creating the AD computer account in a defined OU path. …
Some PowerShell commands to quickly build a Windows Server 2012 R2 DC for a new forest/domain in a lab environment. This includes some configuration changes to DNS, setting an external time source, building an OU structure, and creating administrative user accounts. …
I wanted a way to choose what my PowerShell session would connect to when starting up. At various times I need to connect to on-premises production systems, to lab systems, or to an Office 365 tenant. Editing my profile each …
List All Firewall Rules Get-netfirewallrule | FT name, displaygroup, action, direction, enabled -autosize Get Log File Location Get-netfirewallprofile | format-table name, enabled, logfilename -autosize Display a Single Rule’s Settings Show-NetFirewallRule | where name -eq “CoreNet-DHCP-In” Get-NetFirewallRule | where name …
The following PowerShell command will output the name and size of all folders in the current directory. It also includes the number of files in each of the folders. Get-ChildItem | Where-Object { $_.PsIsContainer } | Select-Object Name, @{ label=”Files”;Expression={ …
Configuring Exchange 2010 RBACs to support regional groups of administrators to manage their own recipients in their own mailbox databases. The regional administrators will not be allowed to perform a “Remove” command from the EMC or EMS. All user accounts, …