Powershell: Suppress WARNING: The command completed successfully but no settings have been modified

Posted on 2014-08-18
Last Modified: 2014-08-18

can anyone help me on this?
How can I suppress the yellow warning
"WARNING: The command completed successfully but no settings have been modified"
I'm running the command       
"Set-RemoteDomain -Identity "$Domain" -TNEFEnabled $false"
When the remotedomain already exists I'm getting this warning, but I rather don't have it in the output windows ;-)
Is there a way to suppres this
I've already tried
      $global:ErrorActionPreference = "SilentlyContinue"
      $global:WarningPreference = "SilentlyContinue"
But they don't seem to work :(
Question by:heensit
    LVL 40

    Accepted Solution

    It looks like a bug

    You can use this workaround..
    If (!(Get-RemoteDomain |?{$_.DomainName -eq "$Domain" -and $_.TNEFEnabled -eq $False})){
    Set-RemoteDomain -Identity "$Domain" -TNEFEnabled $false

    Open in new window

    LVL 2

    Author Closing Comment

    Perfectly, this realy helped me in solving my problem...

    Featured Post

    Shouldn't all users have the same email signature?

    You wouldn't let your users design their own business cards, would you? So, why do you let them design their own email signatures? Think of the damage they could be doing to your brand reputation! Choose the easy way to manage set up and add email signatures for all users.

    Join & Write a Comment

    Create high volume marketing opportunities using email signatures with these top 10 DOs and DON'Ts of email signature marketing.
    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now