PowerShell – summary system report

I present to you a PowerShell script that uses can be useful for monitoring system resources and checking the current configuration. The script saves the data in a table and generates a diagnostic report, which is useful for administering larger environments or analyzing problems. This script does: CPU and RAM monitoring Analysis of free disk space. Verification…

PowerShell – script for monitoring website availability

PowerShell – script for monitoring website availability
Sometimes we want to know the availability of web applications. To do this, we need a system that will query specific addresses at regular intervals. But what if such a system doesn't exist, and we need to verify it for testing purposes? I’ve prepared a short and simple script for such needs, which, given a list of…

Restore OneDrive files from removed account

Restore OneDrive files from removed account
Have you ever deleted an Office365 account without making a backup? And have you ever had to recover files from that account after 2 months? An Office365 user account can be recovered up to 330 days after deletion from the admin panel. But what happens after that time has passed? Today, I will present a simple way…

Task scheduler – create new task in PowerShell

Task scheduler – create new task in PowerShell
Today, I would like to discuss the topic of creating new tasks in the Windows Task Scheduler, which involves scheduling the execution of specific scripts or programs at a designated time or under certain conditions. In this article, I will demonstrate how to create new tasks in the scheduler using PowerShell, covering both basic and advanced versions.…

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…

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…

Uptime report – PowerShell

Uptime report – PowerShell
Following the post about the Defender status report in PowerShell, I decided to create a script that will generate a list of servers based on Active Directory data, just like in the previous case, and gather information about the current UpTime and last boot time. In the first step, we need to retrieve a list of computers…

Status report of Defender – Powershell

Status report of Defender – Powershell
Today, I will present you with a script that will retrieve a list of servers from a specified OU in AD and display the status of individual protection options in Defender for them. In the first step, we need to fetch the list of computers or servers. If we have this list in a file, we can…

Exchange Online – report of mailboxes size – PowerShell

Having a large number of test mailboxes can benefit from a report that shows the size of all mailboxes. If you want to check an individual mailbox, you can do it with a single command. [crayon-674e23187af10660551990/] The result of this command will be: What if we have many mailboxes? I've written a script that allows checking the…