Most Important Group Policy Settings for Preventing Security Breaches

In this article, we will tell you some most important Group Policy Settings for preventing security breaches and secure your environment. Also, you will learn why these AD Group Policy settings cannot be ignored and Best Practice for Active Directory Group Policy Settings. A secure environment is a priority of each and every either large, medium or small … Read more

How to Disable PowerShell with Software Restriction Policies GPO

Looking for ways to disable or block PowerShell tools to run via cmd? Looking for ways to prevent PowerShell attack? In this article, we will discuss how to disable PowerShell with Group Policy (GPO) using Software Restriction Polices. By default on Windows 10 PowerShell is enabled for all users. Hackers, attackers can utilize this to … Read more

How to Get AD User’s Group Membership

To Get User’s security group membership Run below command: Get-ADPrincipalGroupMembership -Identity user  | where {$_.groupCategory -eq ‘Security’} |  add-adgroupmember -members USER To get all groups that a user is a member of Run below command: Get-ADPrincipalGroupMembership username | select name Name —- Domain Users Domain Computers Workstation Admins Company Users Company Developers AutomatedProcessingTeam You may … Read more

How to Fix – Event ID: 1121 Source: NTDS

The format of the schedule attribute of the following object is unrecognizable. As per Microsoft: “The format of the specified object’s Schedule attribute is not recognizable. A default schedule will be substituted. This event will continue to occur until the Schedule attribute on this object is corrected”. – Have you made any changes in AD … Read more

How to Fix – Roaming Profile Error 1521

Couple of things you can do to troubleshoot Roaming Profile Error 1521. Check the permission, may be you don’t have the right permissions on the share. Check if you can browse to the correct share and folder on that server. Try creating a new user in AD and logon to the users PC and see … Read more

Export list of all Active Directory Security Groups with their Members

Learn how to easily export Active Directory Security Groups with their members to a CSV file in Windows PowerShell. Here is a Script: $Groups = Get-ADGroup -Properties * -Filter * -SearchBase “OU=Groups,DC=corp,DC=ourcompany,DC=Com” Foreach($G In $Groups) { Write-Host $G.Name Write-Host “————-” $G.Members } Here is another Script: $Groups = Get-ADGroup -Properties * -Filter {GroupCategory -eq “Security”} -SearchBase “OU=Groups,DC=domain,DC=com” … Read more

Powershell Script to Get List of Active Users with the Details like samaccountname, name, department, job tittle, email in Active Directory

  In this blog will see how to list active users with details like samaccountname, name, department, job tittle, email, etc., in Active Directory using powershell script.    A dsquery solution: dsquery * -Filter “(&(objectCategory=person)(objectClass=user))” -Attr givenName sn displayName sAMAccountName mail proxyAddresses distinguishedName > AllUsers.txt   A PowerShell solution using the AD module cmdlet: Get-ADUser … Read more

Powershell Script to Get “lastLogon Timestamp” for Specific OU and Export to CSV File

Learn how to get lastlogon timestamp for specific OU and export to CSV by using Powershell script. A PowerShell solution using the AD module cmdlet: Get-ADUser -Filter * -SearchBase “ou=users,dc=contoso,dc=local” -ResultPageSize 0 -Prop CN,lastLogonTimestamp | Select CN,lastLogonTimestamp | Export-CSV -NoType last.csv If you want get a date: Get-ADUser -Filter * -SearchBase “ou=users,dc=contoso,dc=local” -ResultPageSize 0 -Prop … Read more

How to Export a Computer List from Active Directory

In this blog will see how to export a computers list from Active Directory by using Powershell script into various formats, including csv and Excel. Open the Powershell ISE → Run the below script, adjust the path for the export: Get-ADComputer -Filter * -Property * | Select-Object Name,OperatingSystem,OperatingSystemVersion,ipv4Address | Export-CSV ADcomputerslist.csv -NoTypeInformation -Encoding UTF8 Using … Read more