Adding DNS Servers in All DHCP Scopes using PowerShell

To Get all Scopes – Open PowerShell – Run as Administrator Get-DhcpServerv4Scope To Check DNS Servers Option 006 Get-DhcpServerv4Scope| Get-DhcpServerv4OptionValue| Where-Object{$_.OptionID -like6} | FT Value To Check – Whatif Get-DhcpServerv4Scope| Set-DhcpServerv4OptionValue-DnsServer172.21.10.20,172.21.10.21,10.10.11.10,10.10.11.11 –Whatif To Apply Get-DhcpServerv4Scope| Set-DhcpServerv4OptionValue-DnsServer172.21.10.20,172.21.10.21,10.10.11.10,10.10.11.11 To Check if its Applied or Not Get-DhcpServerv4Scope| Get-DhcpServerv4OptionValue| Where-Object{$_.OptionID -like6} | FT Value You can see 006 DNS Servers Updated for all scopes

Read more

Missing “UserType” attribute in Azure AD

UserType is not always accurate for identifying external or member users If you search an Office 365 user with Get-AzureADUser or Get-MsolUser, you get details about the account type with the attribute UserType. The value can be: Member: the user is part of the Azure AD tenant Guest: the user is a guest, for example to access to Microsoft Teams or SharePoint site According […]

Read more

Comply your AD password expiration policy with Azure AD

How does EnforceCloudPasswordPolicyForPasswordSyncedUsers policy works? If you have an expiration policy configured in your on-premise environment, this is not synced to Azure AD. This results in the scenario where a user can continue to work and access company resources when authenticating against Azure AD, although the password has expired in the on-premise AD. If you want to be able to […]

Read more

Migrate Active Directory from Server 2012 R2 to Server 2016

This is very straight forward process, but make sure you test it 1st in your Test Environment. I’m using 2 Hyper-V Machine, which is my Previous domain Server (Microsoft.lk.com). 1- Login to windows Server 2016 machine with local admin credentials, Open server manager dashboard, click Add Roles and features. 2 – Click Next, Choose “Role-based or feature-based installation” radio button and click Next, Scroll down and choose Active Directory […]

Read more

Join Linux to Active Directory with PowerShell Core

There are many possibilities for using PowerShell on non-Windows platforms now and today my mind was pondering how to use it to join Linux servers to Active Directory. So, I created a small little function that automates some of this called Join-LinuxToAD. Keep in mind I tested this only on CentOS 7. The script does the following: Ensures you can lookup the […]

Read more

How to Integrate RHEL 7 or CentOS 7 with Windows Active Directory

In Most of the Organizations users and groups are created and managed on Windows Active Directory.  We can integrate our RHEL 7 and CentOS 7 servers with AD(Active Directory) for authenticate purpose. In other words we can join our CentOS 7 and RHEL 7 Server on Windows Domain so that system admins can login to these Linux servers with AD […]

Read more

Document Active Directory using AD Topology Diagrammer

I found the free Active Directory Topology Diagrammer (ADTD) tool which you can download it here. As stated in Microsoft’s description on the tool download page, ADTD connects to the Active Directory through LDAP and then creates the topology of the Active Directory and/or Exchange Server infrastructure. Charts include domains, sites, OUs, DFS-R, etc., and can be modified through Microsoft Visio. […]

Read more

Must have PowerShell Tool for SysAdmins

Hey Guys, as a Windows SysAdmin some of your primary tools is Active Directory and PowerShell. I want to share this tool I found online from Patrick Gruenauer – Author of https://sid-500.com/ You can download the tool from here: https://sid-500.com/2018/05/22/active-directory-domain-services-section-version-1-1/ Active Directory Domain Services Section What can we do with it? This is the question for this part. I wanna […]

Read more

Join Computer to Domain with Desired Computer Name and OU

Step #1: This is the simplest method to add a computer to a domain. In this example you will be prompted for credentials followed by the required reboot. PowerShell   1 2 Add-Computer -DomainName “your.domain.here” Restart-Computer Step #2: If you require an automated script without prompting the user for credentials you can provide the user account with rights to add […]

Read more

How To Build An Active Directory Site Inventory Report With PowerShell

If you’re having to deal with hundreds of subnets and multiple Active Directory sites, this PowerShell script will allow you to quickly build an inventory report listing all of your AD sites and subnets. Building An AD Site Inventory Report To do this, you’ll first need to ensure you’re either on a Windows Server 2008 R2 (or higher) domain controller […]

Read more
1 2 3 6