Split an Email addresses From @ with PowerShell

In this blog post, I will show you a PowerShell cmdlet that will split an email address from the @ symbol.

Address Split

The code below takes a full email address and removes everything that is after the symbol @.

After the code is run you will end up with the name only.

 $address = "name@address.local"
$Name=$Address.Split("@")[1]
$Name

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.