Check local administrators – PowerShell

Check local administrators – PowerShell
Often in companies, we encounter a situation where many individuals have local administrator privileges. This results in numerous applications being present on computers that should never be there, significantly increasing the risk of computer infections. I have prepared a simple script that can be included in a GPO (Group Policy Object) to run, for instance, during computer…

Restart in task scheduler – Global Policy Object configuration

Often, when dealing with Windows devices in production, such as terminals on the factory floor, there may be a need for periodic restarts, such as nightly or weekly. The simplest way is to create a scheduled task that will restart the computer at a specified time. But what if we have a large number of computers? You…

Search and remove mails in exchange accounts

Search and remove mails in exchange accounts
In this post, I will show you how to, in the case of receiving a spam message that has been sent to all accounts within our tenant, search for that message and remove it from the mailboxes. As I mentioned in the previous post, we first need to import the ExchangeOnline module and log in to PowerShell…

Search for ExchangeOnline mail rules – PowerShell

Search for ExchangeOnline mail rules – PowerShell
Today's post was inspired by a recent incident where a user clicked on a malicious link, logged in, and as a result, their login credentials were compromised. The attacker, upon gaining access to the mailbox (most likely through automation), creates rules that either delete specific emails, typically those from the IT department or the sender of the…