How to test email via PowerShell

Test email via PowerShell

If you are not sure if your email settings are working or not, you can send a test email via the PowerShell command.

Open PowerShell: command

note: From email is an email with an issue or one you trying to set up and To email can be any email address where you can check to see if you get the test email.

Send-MailMessage -From -To -Subject “Test Email” -Body “Test SMTP Service from Powershell using Port 587” -SmtpServer -Credential $creds -UseSsl -Port 587

It will prompt you to enter your username and password

If everything goes well, you will not see anything, otherwise, it will give you an error message

If you have a typo or forget to put -From or -To you might get errors, something like this:

Send-MailMessage : A positional parameter cannot be found that accepts argument

How to Synchronize folders in Thunderbird


Thunderbird email client has so many options to customize the way you like it. One of them is to synchronize the folders that you want. By default, it only shows Inbox, but if you have subfolders, it will not synchronize. If you don’t have the Thunderbird mail client installed, you can download it from here:

To see other folders, you need to Subscribe, by right click on the account, then selecting Subscribe …


Now Check the Box for any folders you want to sync or uncheck if you want to remove them. Click ok

Subscribe Folder list

That’s it for these settings

To remove from offline sync:

Right-click on the account, then settings

Synchronization & Storage>Advanced

Synchronization & Storage

You can uncheck if you don’t want to sync offline, then click ok, these folders will still get new emails, but they will not be available if you don’t have internet access.

Items for Offline Use

That’s all for now, enjoy it

How to compact your email to regain storage

Compact email

Before you do this, make sure you delete any emails you don’t need and empty out deleted items, otherwise, you will not regain storage space. Outlook creates an Offline Outlook Data File (.ost), which caches data of your emails, default location is system drive:\Users\YourUserName\AppData\Local\Microsoft\Outlook

Also, if you have created an Archive of your email, then you will have Outlook Data File (.pst), which also needs to do compact if you are cleaning up and trying to regain storage space, otherwise it just grows larger. The default location for .PST is the Documents\Outlook Files folder

To compact .OST, open Outlook

Click Menu>Info>Account Settings

Info>Account Settings

Next click on Data Files>Select your email or account.ost file extension

Then click on Settings …

Account Settings>Data Files

Select the Advanced tab, then click on Outlook Data File Settings …

Advanced>Outlook Data File Settings

Click on Compact Now to start compacting

Compact email

Note, if you have not done this before, it will take some time, next time you do this it will be quick, the storage space regained will depend on how much you have deleted your old emails. You can do the same thing for your.PST file

Note: make sure to empty your Deleted folder

The trust relationship between this workstation and the primary domain failed

AD trust failed

it’s not common, but once in a while you will come across an error like this “The trust relationship between this workstation and the primary domain failed“, causes of this are very, it’s a very easy to fix it too, here are some list of reasons:

  • Admin deleted Computer object in AD
  • System restored, which is a different machine account password than AD
  • Machine imaged and restored
  • object corruption in AD
  • AD policy disables a computer after x number of days

You will get a message like this:

If you are logged into computer local user, you can test by running the PowerShell command

command: Test-ComputerSecureChannel -Server NameOfDomainController

In this example, it’s showing true, but if you are having an issue you would get false

To fix it:

You can reset it by running a PowerShell command:

Command: Reset-ComputerMachinePassword -Credential YourDomainName\YourDomainAdmin

or you can rest from Domain Controller

Another way is to disjoin from domain and re-join it, that’s it

How to open Task Manager in Windows

The task manager shows the system processes, performance, and many more details of your system, many users do not know how to open Task Manager, here are some ways to open it, you can use whichever you like. Each tab has more details about the system, like Performance, which has more details about CPU, Memory, Disk, etc.

Keyboard keys: CTR+ALT+Delete, then choose Task manager

Keyboard keys: CTR+Shift+esc

Keyboard keys: Windows+R

Then type in: taskmgr

Then click ok or Enter

Star Menu: start typing Task Manager, then click on Task Manager to open

Using Mouse right-click on the bottom taskbar, then click Task Manager

Hope this helped you to open task manager in Windows 7/10/11