Set DNS using Powershell
| | | | | |

Set DNS using Powershell

The purpose of this article is to show case how to add a new A record to a DNS zone using PowerShell. Here is a quick look at the available Syntax for : Add-DnsServerResourceRecordA Add-DnsServerResourceRecordA [-AllowUpdateAny] [-CreatePtr] [-Name] <String> [-IPv4Address] <IPAddress[]> [-ComputerName <String>] [-TimeToLive <TimeSpan>] [-ZoneName] <String> [-AgeRecord] [-PassThru] [-ZoneScope <String>] [-VirtualizationInstance <String>] [-CimSession <CimSession[]>]…

| | | | | | | |

While there is no simple way of addressing ransomware entirely, there are number of measures that all organisations can take to help spot and mitigate the risk and spread of such an attack. LepideAuditor offers probably the easiest, fastest (and most cost effective) means of spotting and reacting to potential ransomware attacks on your Windows…

Adding Subnets Active Directory Sites and Services :PowerShell
| | | | |

Adding Subnets Active Directory Sites and Services :PowerShell

This guide will show you how to add additional Subnets into Active Directory Sites and Services using GUI as well as Powershell. Let’s start by adding the following Subnet into Sites and Services using GUI. Subnet : 192.168.56.0/24 and 192.168.57.0/24 Launch Active Directory Site and Services and Navigate to Subnets. Right click on “Subnets” and…

Search for Disabled Users and Move to Disabled Ou using PowerShell
| | | | | |

Search for Disabled Users and Move to Disabled Ou using PowerShell

Search for Disabled Users and Move to Disabled Ou using PowerShell Created this script to search a ‘OU’ for disabled users and move them to a different ou . I have added the ‘WhatIf’ option by default . Once you run the script it will prompt for ‘Search OU’ and ‘Target OU’ . #Created to ease…

Bulk add users to Distribution Group
| | | | | | | | |

Bulk add users to Distribution Group

Bulk add users to Distribution Group I was ask recently to simplify a task for support staff to bulk add users to a distribution group. So i created the following script to add user from csv. The script will ‘prompt’ for ‘Distribution Group’ name and will add users accordingly. The script has the ‘WhatIf’ added…

Set UPN Suffix using PowerShell
| | | | | | |

Set UPN Suffix using PowerShell

To Prepare for Office 365 Migration you need to add the missing ‘UPN Suffixes’. The following example demonstrates how to create a new UPN suffix for the users in the ThatLazyAdmin forest: Lets Start by running: Import-Module ActiveDirectory   Then run : Get-AdForest | Set-ADForest -UPNSuffixes @{Add=”ThatLazyAdmin.com”}   Lets verify the new UPN in Active Directory…

Set Exhange 2010 /2013 OWA ‘LogonFormat’ using PowerShell
| | | | | |

Set Exhange 2010 /2013 OWA ‘LogonFormat’ using PowerShell

Set Exhange 2010 /2013 OWA ‘LogonFormat’ using PowerShell   Quick look at the curent setting using the ‘GUI’. Exchange Admin Center – Servers – Virtual Directory select OWA virtual directory.     Now lets change the LogonFormat to ‘User name only’ using PowerShell   Set-OwaVirtualDirectory -LogonFormat ‘UserName’ -DefaultDomain ‘ThatLazyAdmin.local’ -Identity ‘LazyEX-01\owa (Default Web Site)’  …

Using Active Directory to meet Regulatory Compliances
| | | |

Using Active Directory to meet Regulatory Compliances

Using Active Directory to meet Regulatory Compliances   When it comes to meeting compliance, many Administrators settle for simply auditing event logs. By default, Event Viewer records all events that are generated on a Windows Server. However, is simply storing logs an efficient way to meet compliance? Most compliance mandates require a particular report to…

Enable Remote Desktop Using PowerShell
| | | |

Enable Remote Desktop Using PowerShell

Enable Remote Desktop Using PowerShell Open an elevated Windows PowerShell session and run the following commands. This first one creates the fDenyTSConnections value and sets it to 0 (off). This makes sense, because we don’t want to deny Terminal Services (TS) connections. Set-ItemProperty -Path ‘HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server’ -Name fDenyTSConnections -Value 0 Set Network Level Authentication for…

A Transport database operation has encountered a fatal error. The Transport service is shutting down.
| | |

A Transport database operation has encountered a fatal error. The Transport service is shutting down.

A Transport database operation has encountered a fatal error. The Transport service is shutting down. Exchange Transport Service Keeps shutting down. To resolve this issue you can simple recreate the Transport Queue Database on the needed Exchange server. To delete the specified database and corresponding transaction logs, follow these steps: Verify that the Microsoft Exchange…

Get and Connect a Disconnected Mailbox Using PowerShell
| | | |

Get and Connect a Disconnected Mailbox Using PowerShell

Get and Connect a Disconnected Mailbox Using PowerShell   To quickly find all disconnected Mailboxes in your Exchange environment launch EMC and run the following one liner. Get-MailboxStatistics -Server ThaLazyExMBX01| where { $_.DisconnectDate -ne $null } | select DisplayName,MailboxGuid,Database,DisconnectDate The Results will look as follow: Now that we have the results lets refine the search…

Exchange 2010 Mail User still Associated with a Move Request
| | | | | |

Exchange 2010 Mail User still Associated with a Move Request

Exchange 2010 Mail User still Associated with a Move Request Mail User Object in Exchange still showing as if it is listed to a Move Request To verify if we have any Move requests currently in progress or completed we can start by Opening the Exchange Shell. Once the EMS is open type the following…