Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

How to pass the domain part of an email address to a variable

$
0
0

Let's say i want to capture an email address to a variable, then i want to take the part after the "@" and assign that to another variable. How?

Write-Host "Enter Email Address"
$mailbox = Read-Host

$domain = ?


Viewing all articles
Browse latest Browse all 21975

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>