posts - 104 , comments - 115 , trackbacks - 0

My Links

News

Disclaimer: Right here... Github: Code all the things! PS GUI Series: < Coming Soon! > PS Scripts: < Coming Soon! >

Tag Cloud

Archives

Post Categories

Image Galleries

Blogs

Forums

Lync

Storage

Tools

Virtualization

Web comics

Powershell: If statements dependent on installed exchange role

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 {
    }

   

Print | posted on Wednesday, December 5, 2012 12:59 PM | Filed Under [ General Powershell ]

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Comment:
Verification:
 

Powered by: