I had been looking for a short code to do this for a while and finally figured it out myself. Thought I would share it.
$FQDN = "madeup.name.domain.co.in"
I would need the result as name.domain.co.in
An arguably cleaner solution would be
$FQDN.Substring($FQDN.IndexOf(".") + 1)
This gets the substring of $FQDN starting after the first ..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With