Why color code css using powershell command is not visible in email ?

Hello,
I am applying color code for disabled status in PS script as  written below :
$ReportData = Get-SPServiceInstance | Select Server,TypeName,Status,NeedsUpgrade | ConvertTo-Html -Fragment
$DisabledStatus='<td>Disabled</td>'
$DisabledColorStyle='<td style="background-color:red !important;color:white !important" >Disabled</td>'
$ReportData = $ReportData -replace $DisabledStatus,$DisabledColorStyle
ConvertTo-Html -Body "<font color = blue><H4><B>Report </B></H4></font>$ReportData" -Title "Test Report" -CssUri C:\style.CSS | Out-File "E:\Reports\TestReport.html"
This report shows perfect on system where report file is located at E:\Reports\TestReport.html location as below :
However , when I send this report via email using following command
$Report = Get-Content "E:\Reports\TestReport.html"
Send-MailMessage -To $To -SmtpServer $SMTP -From $From -Subject $Subject -BodyAsHtml "$Report"
I dont see disabled as red color in email , while table's style is working which is stored at C:\style.CSS
Would you please let me know the reason behind same ?
Thanks and Regards,
Dipti
Dipti Chhatrapati

Hi Dipti,
I‘m writing to check if the suggestions were helpful, if you have any questions, please feel free to let me know.
If you have any feedback on our support, please click here.
Best Regards,
Anna
TechNet Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

Similar Messages

  • How to get Systemstate Backup size using PowerShell command in Windows 2008 R2

    Hi,
    We using WBSummary command to get completed backup status.
    I need to find how much data is backed up  using powerShell command .
    Is there any way to get the details , i can see the GUI but no in command.
    Please advise
    Regards Gopi K

    Hi,
    You mentioned that you can see the system state backup size in the GUI. Does the backup size mean the amount of date transferred?
    It seems that there is no such a PowerShell to get Systemstate Backup size. You may need to you need a PowerShell scripts to do this work.
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=ITCG
    Regards,
    Mandy
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Retrieve all pages in a site collection using powershell command

    Hi all,
    I need to retrieve all pages in a site collection and i wanted to display it in a csv file using powershell command.Please help.
    Regards,
    Praveen

    Hi Praveen,
    Here are two blogs would be helpful:
    PowerShell script to Enumerate Sites, Sub-sites and print them in a .csv file
    http://www.sharepointfix.com/2012/02/powershell-script-to-enumerate-sites.html
    Powershell to Loop through all SharePoint sites and pages
    https://tjendarta.wordpress.com/2013/03/19/powershell-to-loop-through-all-sharepoint-sites-and-pages/
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Fail to create VM using PowerShell commands

    I tried to create a new VM with Public IP. The only way I found was using PowerShell.
    This was the commands I used.
    $vm = New-AzureVMConfig -Name "mu0035" -InstanceSize Small -ImageName "b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-14_04_1-LTS-amd64-server-20140924-en-us-30GB"| Add-AzureProvisioningConfig -Linux -LinuxUser $username -Password $password|Set-AzurePublicIP -PublicIPName "mu0035PIP"
    It returns `BadRequest: The location or affinity group East Asia of the storage account where the source image b39f27a8b8c64d52b05eac6a62ebad85 resides is not in the same location as the specified cloud service ,"Southeast Asia"`.
    It seems the image locate in East Asia, and I want to create VM in 'Southeast Asia'.
    Interest thing is, I have already set the subscription's currentstorageaccount to a `Southeast Asia` storage account. 
    Get-AzureSubscription -Current
    SubscriptionId : $subscription_id
    SubscriptionName : BizSpark
    Environment : AzureCloud
    SupportedModes : AzureServiceManagement,AzureResourceManager
    DefaultAccount : $account_name
    Accounts : {$account_name}
    IsDefault : True
    IsCurrent : True
    CurrentStorageAccountName : sourtheast
    Get-AzureStorageAccount -StorageAccountName sourtheast
    StorageAccountDescription :
    AffinityGroup :
    Location : Southeast Asia
    GeoReplicationEnabled : True
    GeoPrimaryLocation : Southeast Asia
    GeoSecondaryLocation : East Asia
    Label : sourtheast
    StorageAccountStatus : Created
    StatusOfPrimary : Available
    StatusOfSecondary : Available
    Endpoints : {https://sourtheast.blob.core.windows.net/, https://sourtheast.queue.core.windows.net/, https://sourtheast.table.core.windows.net/}
    AccountType : Standard_GRS
    StorageAccountName : sourtheast
    OperationDescription : Get-AzureStorageAccount
    OperationId : f1326e6e-951d-1c9c-bb4d-4a65900025bb
    OperationStatus : Succeeded
    I can't figure out what happened. Why the powershell command not fetching the image from a wrong location?
    Please, Help!

    Hi, it looks as though the "StorageAccountName" is set to "sourtheast", possibly just a typo when the accountname was created?

  • Code for retrieving powershell command output

    Is there any scripting in java to get the output of powershell command.

    hello 
    please help me out
    I want to retrieve security eventlog with powershell command.but when ever run the powershell code I recieve the following error:
    Requested registry access is not allowed
    so that,I have searched  on the internet Days and nights .which I got from the Internet was change the Event log reader Group and change the
    followinfg registry key  and add read permission:
    KEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Security
    Right click and Add Read permissions for Event Log Readers.
    in spite of the above task,i can not do that.
    any help would be appreciated

  • Use Powershell Command to Search A Folder Then Move Any Subfolders and Where The Folder Name Contains "ARC"

    Hi All,
    As a complete novice to the powershell world I am looking for some direction in a script to manage my work project data lifecycle.
    I have a share on our production server (\\PROD1\Projects) which contains folders starting 99ENGXXX that contains project work, when staff rename the folder to ARC99ENGXXX, I am trying to work out a powershell command to move the folder and its contents
    to a share on a archive server (\\ARC01\Projects). Both are windows servers.
    Any help would be greatly appreciated!
    Sammy

    Try this (Assumes you are running at least PowerShell V3):
    Get-ChildItem "\\PROD1\Projects" -Recurse -Filter "ARC*" -Directory |
    Move-Item -Destination "\\ARC01\Projects"
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • Why Web services are used to send data not HTTP in Web dynpro for Java?

    Is Web Dynpro for Java supports Web service , RFC as communication to other systems why http cannot be used in Wweb dynpro for java.........
    Thanks and Regards,
    CSP

    Hi Pradeep,
    Yes, Web Dynpro java supports web service, you can expose your web service as RFC Model to
    communicate with others system. As per as HTTP is concern we don't have any
    supportive method in web Dynpro. Insted of HTTP we use context in web dynpro to communicate.
    Thanks
    Anup

  • I get email already in use and I do not get confirmation emails even after master reset when trying to sync

    I have tried all of the options in your support pages . I am not getting emails in order to reset my email. I did a master reset and it still tells me that my "new" email is in use. I do not get emails regarding recovery key change because the email stays the same . I can log in to your normal support page and I have just changed that password - that worked . . I assume that this password is not my master one . . When I did a master reset, where do I go or what do I do after that??
    Struggling now for several hours . . .

    This page does not help . . When I try to get a new key, it asks for me to log in - email address ok, but incorrect password. Request new password . . no email back to enable me to re-set.
    I have tried a master reset . . that does not help either . .

  • Why is a css 'display:inline;' command not working in one part of the page when it does in another?

    I am trying to set my navigation links to be in a line rather than a column after setting them up as an Unordered List. I have already done it for the social network icons but the same css command just won't apply itself for the navigation. Any help would be appreciated.
    Here is a copy of the page followed by the relevent protion of the css file, the problem occurs with the styles.css applying to the 'topnav' section:
    <!DOCTYPE HTML>
    <html>
    <head>
        <link href="css/styles.css" rel="stylesheet" type="text/css" media="screen">
        <link href="css/print.css" rel="stylesheet" type="text/css" media="print">
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta http-equiv="content-type" content="cache" />
        <meta name="robots" content="INDEX, FOLLOW" />
        <meta name="keywords" content="Enter Keywords" />
        <meta name="description" content="Description Here" />
        <title>Hittite Education by Weirdbeardink</title>
    </head>
    <body>
    <div id="outer">
        <div id="wrapper">
            <div id="logo">
                <ul>
                    <li><img src="images/Logo-2.jpg" /></li>
               </ul>
            </div>
            <div id="social-media-icons">
                <ul>
                    <li><a href="http:/www.facebook.com"><img src="images/icons/facebook-icon.png" /></a></li>
                    <li><a href="http:/www.twitter.com"><img src="images/icons/twitter-icon.png" /></a></li>
                    <li><a href="#"><img src="images/icons/rss-icon.png" /></a></li>
                </ul>
            </div>
            <div id="topnav">
                <ul>
                    <li><p><a href="index.html">HOME</a></p></li>
                    <li><p><a href="about.html">ABOUT</a></p></li>
                    <li><p><a href="contact.html">CONTACT</a></p></li>
                </ul>
             </div>
            <div id="topstripe">
                <ul>
                    <li><img src="images/stripe.jpg" /></li>
                </ul>
            <div id="picture">
                <ul>
                    <li><img src="images/coverpic500px.jpg" /></li>
                </ul>
            </div>
            <div id="content">
                <ul>
                    <li><h1>Introduction</h1></li>
                    <li><p>This is a unique project undertaken to teach important social topics using sport as the vehicle. Sporting and comedy clips are interspersed with filmed interviews with people like Paul Collingwood, Gary Lineker, Ed Leigh, Faye White and many others. They home in on topics such as teamwork, respect, rules, & money, and they use the pupils' experiences of sport to teach really important lessons about life.</p></li>
                 </ul>
            </div>
            <div id="bottomstripe">
                <ul>
                    <li><img src="images/stripeflip.jpg" /></li>
                </ul>
            </div>
            <div id="footer">
                <ul>
                    <li><p>Copyrite 2011 Hittite Education  |  All rites reserved</p></li>
                </ul>
            </div>
         </div>
    </div>   
    </body>
    </html>
    Here is the portion of the styles.css that works (#social-media-icons) and the portion that doesn't (#topnav):
    #social-media-icons         { float:right; }
    #social-media-icons ul li   { display:inline; }
    #social-media-icons ul      { margin-top:100px; }
    #topnav                { clear:both; }
    #topnav                { width:700px; margin: 0 auto; background-color:#FFF; }
    #topnav ul             { padding:10px; }
    #topnav ul li          { display:inline; }     <!-- THIS IS THE LINE THAT WONT WORK -->
    #topnav ul li a        { padding:0 15px;}
    #topnav    a:link            {color:#000; }
    #topnav    a:visited        {color:#000; }
    #topnav    a:active        {color:#000; }
    #topnav    a:focus            {color:#666; }
    #topnav    a:hover            {color:#F38E00; }

    No need to answer this one as I have had a relpy on another forum. I had <p> tags in the unordered list. Once I took them out it all worked fine

  • Why can't i use voice commands to type a message o...

    Did Microsoft skipped this facility in WP8

    Have you initiated speech serviced in settings and downloaded your specific language pack? It is nit always installed by default?
    If this was helpful please click Star for Kudos
    Phone history :-3210, 3100, 3200, 6230i, N73, N95-8GB, N97, N8, Lumia800, Lumia920, Lumia620, Lumia820, Lumia1020, Lumia520, Lumia830, Lumia735

  • How can I capture delete user event in Active Directory 2008 using Powershell command

    Hi,
    In my Active Directory every user have own home drive in the file server. When I delete user I also need to delete folder from the server. 
    My target is make the process automated, so that when I delete user account form AD, the folder associate with user also delete.
    Can I write any power shell script to grep the delete event  and remove folder from file server.
    Thanks
    Tamim Khan

    You can setup event viewer to provide alerts (email alerts) for event id 630.
    Find an existing Event ID 630 entry, right click on it and "Attach Task To This Event...."
    Follow the wizard.
    ** Event ID Sample **
    Event ID: 630
    Type: Success Audit
    Description: User Account Deleted:
    Target Account Name: %1 Target Domain: %2
    Target Account ID: %3 Caller User Name: %4
    Caller Domain: %5 Caller Logon ID: %6
    Privileges: %7
    - Chris Ream -
    **Remember, if you find a post that is helpful, or is the answer, please mark it appropriately.**

  • Powershell command is not working

    Hi Guys,
    I am just trying to add a library template through powershell and it is not working. Any idea where thing might be going wrong.
    here is the code snippet.
    $sourceFile = "C:\mystuff\Library.stp"
    $templateName = "Library.stp"
    AddListTemplate -siteUrl "https://mysite.com/domain1/testsite" -fileServerFileName $sourceFile -listTemplateFileName $templateName
    The term 'AddListTemplate' is not recognized as the name of a cmdlet, function,
     script file, or operable program. Check the spelling of the name, or if a path
     was included, verify that the path is correct and try again.
    At line:1 char:16
    + AddListTemplate <<<<  -siteUrl "https://mysite.com/domain1/testsite" -fileServerFileName $sourceFile -listTemplateFileName $templateName
        + CategoryInfo          : ObjectNotFound: (AddListTemplate:String) [], Com
       mandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    Any help would be greatly appreciated.
    Many Thanks in advance.

    Hi Traveller,
    the command AddListTemplate is not a recognized command. Make sure you write the command correctly.
    Should it have been Add-ListTemplate?
    Do you need to load a module / script first?
    Cheers,
    Fred
    There's no place like 127.0.0.1

  • Why is tabbed Finder useful? I do not understand the purpose

    I have used the Mac for many years, but do not understand why having tabs in the Finder is useful- can anyone explain why this is a big deal? The color tags also don't seem like it adds much, but I can at least understand the organizational logic.
    Why would someone open multiple Finder windows anyway?

    Fads, my friend, fads.  Someone at Apple wanted to get on the "tab" bandwagon and now they're trying to put tabs everywhere.  Even where it makes no sense at all and only complicates the user interface...
    Same thing with tags:  some people (Evernote, among others, is notable for refusing to allow more than two hierarchical levels) can't organize their documents in a hierarchical way.  Using nested folders, etc.
    They invented this "new" approach where you keep everything at the same hierarchical level, but add a (or several) flag to an item (file, folder) to make it a member of a "group".
    Same thing with the "look" of OS X.  There was the 3D epoch where the designers tended to make things stand out (icons, for example).  Now, we're entering the "flat look" epoch...
    Fads have a tendency to come and go.  In a while, we'll go on to something else, dreamed up be the latest "designer" to work on something...
    Bah...

  • Can anyone explain why the code compiles on one database but not another?

    I have two databases, both running 10.2.0.4, same hardware/OS platform.
    On one database, this code compiles just fine, on the second database, I get errors as shown below:
    SQL> SET SERVEROUTPUT ON SIZE 1000000;
    SQL>
    SQL> create or replace procedure testproc as
    2 vCount number;
    3 vCmd varchar2(2048);
    4 vLastName varchar2(30);
    5 vFirstName varchar2(30);
    6 vPK integer := 0;
    7 vSortLN varchar2(30);
    8 vSortFN varchar2(30);
    9 cursor cPERSON is
    10 select LastName,
    11 FirstName
    12 from GENERIC.PERSON
    13 order by LastName, FirstName;
    14 BEGIN
    15 select count(*) into vCount from USER_OBJECTS where object_name = 'ML4TEMPPERSON';
    16
    17 IF (vCount = 0) THEN
    18 /* NOTE: Omit semi-colon from command. */
    19 vCmd := 'create table ML4TEMPPERSON (PK integer not null, LastName varchar2(30), SortLN varchar2(30), FirstName varchar2(30), SortFN varchar2(30))';
    20 Execute Immediate vCmd;
    21 vCmd := 'alter table ML4TEMPPERSON add (constraint XPKML4TEMPPERSON PRIMARY KEY (PK))';
    22 Execute Immediate vCmd;
    23 END IF;
    24
    25 delete from ML4TEMPPERSON;
    26
    27 for P in cPERSON
    28 loop
    29 vLastName := rpad(P.LastName, 30, ' ');
    30 vFirstName := rpad(P.FirstName, 30, ' ');
    31 vSortLN := vLastName;
    32 vSortFN := vFirstName;
    33 DBMS_OUTPUT.PUT_LINE(vLastName || ', ' || vFirstName);
    34 vPK := vPK+1;
    35 INSERT into ML4TEMPPERSON
    36 ( PK, LastName, SortLN, FirstName, SortFN)
    37 values
    38 (vPK, vLastName, vSortLN, vFirstName, vSortFN);
    39 end loop;
    40 IF (vPK > 0) THEN
    41 COMMIT;
    42 END IF;
    43 END;
    44 /
    Warning: Procedure created with compilation errors.
    SQL> show errors
    Errors for PROCEDURE TESTPROC:
    LINE/COL ERROR
    25/3 PL/SQL: SQL Statement ignored
    25/15 PL/SQL: ORA-00942: table or view does not exist
    35/7 PL/SQL: SQL Statement ignored
    35/19 PL/SQL: ORA-00942: table or view does not exist
    SQL>

    Your table ML4TEMPPERSON doesn't exist in your second database, and you want do delete ans insert, may be in first database the table ML4TEMPPERSON exist
    Try this code. /* Formatted on 2009/05/21 09:10 (Formatter Plus v4.8.8) */
    SET SERVEROUTPUT ON SIZE 1000000;
    CREATE OR REPLACE PROCEDURE testproc
    AS
       vcount       NUMBER;
       vcmd         VARCHAR2 (2048);
       vlastname    VARCHAR2 (30);
       vfirstname   VARCHAR2 (30);
       vpk          INTEGER         := 0;
       vsortln      VARCHAR2 (30);
       vsortfn      VARCHAR2 (30);
       CURSOR cperson
       IS
          SELECT   lastname, firstname
              FROM generic.person
          ORDER BY lastname, firstname;
    BEGIN
       SELECT COUNT (*)
         INTO vcount
         FROM user_objects
        WHERE object_name = 'ML4TEMPPERSON';
       IF (vcount = 0)
       THEN
    /* NOTE: Omit semi-colon from command. */
          vcmd :=
             'create table ML4TEMPPERSON (PK integer not null, LastName varchar2(30), SortLN varchar2(30), FirstName varchar2(30), SortFN varchar2(30))';
          EXECUTE IMMEDIATE vcmd;
          vcmd :=
             'alter table ML4TEMPPERSON add (constraint XPKML4TEMPPERSON PRIMARY KEY (PK))';
          EXECUTE IMMEDIATE vcmd;
       END IF;
       vcmd := 'delete from ML4TEMPPERSON';
       EXECUTE IMMEDIATE vcmd;
       FOR p IN cperson
       LOOP
          vlastname := RPAD (p.lastname, 30, ' ');
          vfirstname := RPAD (p.firstname, 30, ' ');
          vsortln := vlastname;
          vsortfn := vfirstname;
          DBMS_OUTPUT.put_line (vlastname || ', ' || vfirstname);
          vpk := vpk + 1;
          vcmd :=
                'INSERT into ML4TEMPPERSON
    ( PK, LastName, SortLN, FirstName, SortFN)
    values
             || vpk
             || ', '
             || vlastname
             || ','
             || vsortln
             || ','
             || vfirstname
             || ','
             || vsortfn
             || ')';
          EXECUTE IMMEDIATE vcmd;
       END LOOP;
       IF (vpk > 0)
       THEN
          COMMIT;
       END IF;
    END;
    /Edited by: Salim Chelabi on 2009-05-21 06:12

  • Why is code to get center of image not working?

    Hey there. I have am trying to establish the center of the imags that load so that I can put them in the center of the stage. I am doing this as each image is a different size.
    Here is the code i have gotten to work before but its not working now and I have been searching to find what I have done wrong with no luck. : (
    Would you look it over and maybe you will see what I am doing wrong?
    public function placePicture(e:Event = null):void {
         rawImage = imageData.image[imgNum].imageURL;
         lastImageIndex = imageData.*.length() - 1;
         imageLoader = new Loader;
         imageHolder = new Sprite;
         imageLoader.load(new URLRequest(rawImage));
         imageLoader.x -= imageLoader.width/2; //this should set the image to the center no?
         imageLoader.y -= imageLoader.height/2;
         imageHolder.x = 640; //this is the center of the stage
         imageHolder.y = 100;
         imageHolder.addChild(imageLoader);
         masterHolder.addChild(imageHolder);    
    The result when I publish is the picture comes on stage but the top left corner goes to 640 instead of the center of the image going to 640.
    I tried several variations of this all with the same result:
    imageLoader.x = -1*imageLoader.width/2;
    I tried using setRegistrationPoint with the following tutorial: http://flashscript.ca/set-registration-as3.php
    and I tried doing all of the above by inserting the loader into a sprite and then applying the code to the sprite and then adding that sprite to another sprite and putting that at 640 and not inserting it in another sprite and trying to straight up put the existing sprite at 640 (hopefully that all makes sense). And I have tried to put it to width/3 and nothing different happens.
    If you have any other ideas or can see what I am doing wrong I would really be gratefull for some tips! : )
    Thanks for any help!
    oh, and I am getting no errors on this.

    the image's width and height are not available until loading is complete.  ie, use a complete listener/listener function.

Maybe you are looking for

  • My macbook pro 13 inch is running extremely slow and I have no idea of what to do. Can someone please help me?

    Everything is just running completely slow and it was not like this. I do not know what to do at all, please help. Thank you.

  • MacMini to Pioneer 23TXH

    I am trying to successfully hook up the MacMini to a Pioneer 23TXH. I have the DVI-HDMI going into HDMI 2 on the Pioneer and a TOS-Link going into OPTICAL INPUT 2 on the Pioneer. When I am on the menu mode you can hear the audio but as soon as you le

  • NF520T-C35 compatible with GTX460 video cards?

    Hello, to cut it short - I have problems installing Msi Cyclone GTX460 768MB/OC on this mobo. Until now I had Asus 9800GT which worked flawlesly. Preparation is done as usual (cleaning old drivers), vga in case, login to windows (XP Home, SP3), insta

  • Running a Java3D program

    Hi. When i try to open a java3D program, all that happens is that the application opens for a split second on a web browser and then closes the window completly. for example when i try click on any of the programs in www.virtualexp.net/Mindmelters.ht

  • Licensing for NComputing

    Hope we have the following senario 1. A PC with Windows 7. 2. 5 numbers of NComputing Desvices (LSeries) conneced to the PC. What are all the Licenses we have to purchase?