Geeks With Blogs
I, Computer http://marcdekeyser.com
Something I need to keep for usage in the future:

$hostname=hostname
If (get-exchangeserver $hostname | where {$_.isClientAccessServer -eq $true})
    {
    } else {
    }
   
If (get-exchangeserver $hostname | where {$_.isHubTransportServer -eq $true})
    {
    } else {
    }

If (get-exchangeserver $hostname | where {$_.isMailboxServer -eq $true})
    {
    } else {
    }

If (get-exchangeserver $hostname | where {$_.isUnifiedMessagingServer -eq $true})
    {
    } else {
    }

If (get-exchangeserver $hostname | where {$_.isEdgeServer -eq $true})
    {
    } else {
    }

   
Posted on Wednesday, December 5, 2012 12:59 PM General , Powershell | Back to top


Comments on this post: Powershell: If statements dependent on installed exchange role

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © marc dekeyser | Powered by: GeeksWithBlogs.net | Join free