Catch instant and Email reports

Hi guys,.

Located in different places, including here the ends of scripts for creating a script to login to a vcenter, a list of some virtual machines in a file format it and embed it in a mail to send (must not be attached)

This is what ive got so far:

SE connect-VIServer Servername

$smtpSrv = 'name '.
$from = "[email protected]".
$to = "[email protected]".
$subject = "report snapshot."
$body = get-folder foldername. Get - VM | Get-Snapshot | Select name, VM, SizeMb | FT - AutoSize
$msg = new-object Net.Mail.MailMessage ($from, $to, $subject, $body)
$smtp = new-object Net.Mail.SMTPclient ($smtpSrv)
$smtp.send ($msg)

so it seems to work when ran but email out the following in my Inbox (exchange 2010 server)

Microsoft.PowerShell.Commands.Internal.Format.FormatStartData
Microsoft.PowerShell.Commands.Internal.Format.GroupStartData
Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData
Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData
Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData
Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData
Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData

any help much appreciated

Try to change this line

$body = get-folder foldername. Get - VM | Get-Snapshot | Select name, VM, SizeMb | FT - AutoSize

in

$body = get-folder foldername. Get - VM | Get-Snapshot | Select name, VM, SizeMb | Out-string

Since PowerShell v2, you can send emails with a cmdlet.

Your script would become

Connect-VIServer Servername

$body = Get-Folder foldername | Get-VM | Get-Snapshot | Select Name, VM, SizeMb | Out-StringSend-MailMessage -From "[email protected]" -To "[email protected]" `  -SmtpServer "name" -Body $body `  -Subject "Snapshot Report"

Tags: VMware

Similar Questions

  • Get the error message "send and receive reported an error (0x800CCC92): your e-mail server rejected your login. '. Check your username and password in your account properties.

    Get the error message "send and receive reported an error (0x800CCC92): your e-mail server rejected your login. '.  Check your username and password in your account properties.
    I'm using Outlook 2002 on the XP Pro operating system.

    It lasts for almost a year, but I managed to work around the issue since it was started using a different outgoing SMTP user name and the password.  (More settings, outgoing server tab, log in using...)  Now it has stopped working.

    There are four machines at this place and all suffer from the same problem.  I use a LinkSys RVS4000 router.  The previous Linksys router has also had the same problem so I replaced, thinking he can correct the problem, he didn't.
    Troubleshooting:
    a. I am able to recreate the account on another machine to a different place and it works.
    b. I can take an account of my machine, create in this place and it will not work.
    c. accounts deleted and created a new, did not
    d. has replaced the router to the place with a new Linksys router
    e. contacted support for ISP, (Time Warner), they accuse the hosting company
    d. contacted support for hosting of the company (HostCentric) they blame the ISP
    c. confirmed username and passwords are correct.
    e. There are 4 machines in this place with different addresses.  All started having this problem/error the same day within hours
    f. may receive emails cannot be sent.

    http://expwinproblems.blogspot.com/2010/11/error-messages-in-Outlook-when-send-or.html

  • Emailing reports on performance in 6.0

    Hey all,.

    I received a request to send reports to tell a group of VMs for the CPU usage and memory to say that last 30 days on a weekly report.  How

    I would accomplish this?

    This should be simple enough, but there are quite a few steps.

    Create a custom group:

    If the Group of virtual machines are not all in the same cluster and easy to report, you can create a custom group and make sure that the virtual machines are all in this group.

    Start by browsing to an overview of the environment. You should see a screen similar to the image below:

    Click the Green plus sign to create a new group:

    Please fill out the sections that I pointed out. It doesn't have to be exactly the same as what I did. As the 'Group Type' can be changed to anything you want, you can also choose custom policies that you have never defined. Make sure that you select the Type of object as a Virtual Machine, and you can add criteria that you want to add. In this example, I am now simple and just add specific objects, while the group will not dynamically updated.

    Then expand the "objects to always include" using the double arrows at the bottom right. Be sure to select "All items" in the drop down menu under 'Filtered objects' on the left side (default for the custom groups). Then simply browse to your objects, in this case vCenter adapter-> virtual-> select the checkboxes for each virtual machine that you want to. Finally, click the 'Add' button to move them into the group.

    You can also develop 'objects to always exclude' but once again since we keep it simple and do a static group I'm not going to get into that. But it's essentially the same concept as what we just talked.

    Now you have a custom group. Then, we create a view to feed our report.

    Create a custom view:

    Go to Home-> content in-> views. You should see a screen like this:

    Click the Green plus sign to create a new view. Give it a name and a description. Then click on "Presentation".

    Choose the type of presentation you want to present. I put a list for this demonstration. Then select "subjects."

    For the subjects that you want to be sure to select 'Virtual Machine' as the subject. We must not add at this point. Then select "Data".

    Now you must take your steps on the left side and drag - move to the right. I would also change the label to something more readable as who will appear in the column headers for your report. I forgot to change the "Transformation" on this image, but you can select average, Maximum, etc. for each indicator according to your needs. It is default to the 'last' which is the last value declared for each measure. Then click on 'Visibility' to choose where this point of view will be seen/used.

    I'm simply check the box for 'Reports', but you can use this view to dashboards as well. Click on save and you're done.

    Now that we have the view that we need to add it to a report. Fortunately, this is the easiest part of the whole process.


    Create a custom report:

    Go to Home-> content in-> reports. You should see a screen like this:

    Click the Green plus sign to create a custom report. Give it a name, a description and click on "views".

    Filter on the name of your view by typing it in the search box. Then drag your opinion on the right pane. Click on "format".

    I usually just keep the PDF and CSV checked because you never know when you will use either. Click on "Layout Options '.

    Now you can add a cover page, table of contents, and footer. I generally do not include these but if you want to have a custom brand report you would simply upload a picture here so that he looks at all the fancy. Click 'Save' and you're done with your report.

    Finally, we just need to schedule the report.

    Planning a report:

    Go to home page-> overview of the environment. Note that when "Custom groups" is selected your custom group poster upward. Click on your custom in the main pane group.

    Now that your custom group is selected, click the 'Reports' tab on the right side of the page. Type the name of your custom report to filter the others. Then click on the "Calendar" link to create a schedule for your report. Then click on the Green plus sign in the window that opens (not shown).

    Choose how often you would like your report to be generated. And at the bottom if you have set up email for your instance of vROPs already (I have not because I'm lazy), you can click on the "Email report" box and enter the email addresses of those you wish to receive your scheduled report.

    Well, it turned out be a lot more time than I expected. But if you have any questions do not hesitate to ask, and I will be more late to answer.

    See you soon,.

    Jeff

  • "Email report" feature does not work as it supposed to?

    Jin
    I created a custom OEM public report, and I am the calendar by sending e-mail. However, the mail I receive is:
    From: incorrect value-> it contains the value of the field "answer to" in the calendar folder
    the content is just a link to the OEM login page!

    I thought at least I'll have a link to the report and even report output in the received mail.

    Is this a bug or is it normal behavior?

    Thanks for your replies
    Christophe

    It is because of the bug and has been fixed in the version of SGD 11 G R2. The woraroun is
    go to the OEM configuration page and select 'management and repository services' tab. Check the value of the URL for the console. If it contains some value then remove it and make it void. Now try the report by email, it should work.

    Feraud

  • With the updated 31.4.0 version - demand for return confirmation and email send priority disappeared. How can I access them now? Thank you!

    With the updated 31.4.0 version - demand for return confirmation and email send priority disappeared.
    How can I access them now?

    Thank you!

    Did? I find in the title bar of the alternatives

  • I have copy of old tbird and seamonkey e-mail files with the files and emails for each. I need to add to new tbird install. can not find a way to do it. Help

    I have copy of old tbird and seamonkey e-mail files with the files and emails for each. I need to add to new tbird install. can not find a way to do it. HELP PLEASE. previous e-mail files are under mail then mail.earthlink* .net and each of the five mail .net is an email address I have. I can't find a way to identify each file by email to the specific email address (IE mail.my E-mail name.net) so I can copy the files and emails from the past to the email addresses now under tbird. previous installed e-mail identities may not be the current configuration of e-mail files in tbird. I think that I must be sure that mail.name.net matches the previous mail.name.net to be able to copy and paste the old to the new. is there a way to find the file name correct the old email and correspond to the new? all my emails very important information are mostly in the old mail electronic id and must be available in the identification of email again (but same) how can I do this?

    http://KB.mozillazine.org/Importing_folders

    Use this module.

    https://addons.Mozilla.org/en-us/Thunderbird/addon/ImportExportTools/

  • photos has not been loaded for weeks (usually the browser chrome on PC windows at work).  I tried now on some other computers and get the same error message and I report every time.  can I do or just wait for someone to fix it

    photos has not been loaded for weeks (usually the browser chrome on PC windows at work).  I tried now on some other computers and get the same error message and I report every time.  is there anything I can do or just wait for someone to fix it?

    If you want any help here, you'll have to tell us what the error message.

    Which report you errors to?

  • I just installed Firefox 6, and the report does more - the same problem you had with Firefox 5. What is going on?

    You prompted me to install Firefox 6 tonight, because it addresses serious security/stability problems, but when I did this, the report icon has disappeared from the address bar. Reinstall the latest version of the report was corrected not it.
    It's the same thing with Firefox 5 a few months ago, and it has taken report per week to develop a new compatible version.
    Why this happened again? You not check this before launching new versions? Or, why at all not least we warn in advance that some programs will not work for X days? I prefer to be without the latest Firefox for a week or two, and no report - not least because that my Bank, I have to use the report.

    Please advise as soon as POSSIBLE.

    Malcolm Oliver

    This is the link in the message that Trusteer sent me today. I have updated and works great so far.

    Please contact the Support technique Trusteer.

    We are pleased to inform you that a version of the report that supports Firefox 6 has
    been released and is now available for download in the following link:
    http://download.Trusteer.com/NkuiAcruiKc/RapportSetup.exe

    Please be sure to restart your computer once the installation process
    completed.

    Please note: this version of the report is currently a beta version. We'd
    appreciate any comments you may have about this version.

    If the report indicates that the version of the report that you are trying to install is older
    than the version already installed, follow these steps:
    1. choose uninstall report
    2. When prompted, select 'delete all user settings '. Please, assisted by the
    suite of image: http://consumers.trusteer.com/files/images/uninstall.jpg
    3 reinstall the report from the link above.

  • Unable to open a direct link with my SMS and email

    Hi, I have a 6 + 64 GB iPhone a year and 3 month old device.

    I noticed that since I downloaded and installed to 9.3 last IOS, I can't open a URL or a direct link on any of my text Messages and emails!  I click on the URL and nothing happens!  Help!  It's totally frustrating.  I shouldn't have installed the latest iOS.  Please tell me that there is an IOS update that corrects this frustration!

    Thank you.

    sumsplus wrote:

    Please tell me that there is an IOS update that corrects this frustration!

    You will have to show patience. Apple he has not yet released. In the meantime, see if something in this thread helps:

    Links, Hanging Apps: An overview of solutions

  • Safari and emails on my ipad freezes as soon as I click on any link.

    Safari and emails on my ipad freezes as soon as I click on any link. I am on ios 9.2.1.  When checking for updates, it is said that the software is uptodate. pls help. Thank you.

    Seeing that your iPad is updated probably has to do with 9.3 being pulled from servers. For the rest, it seems to be a bug or glitch with safari. Finally, I knew that he had no solution outside waiting for Apple to fix things. You can use another browser in the meantime and use it as a work-around. I use atomic but you can search for a browser in the app store that looks good to you and use it.

    Try to keep your finger pressed on the link until you see the popup 'copy' come then paste this link into the navigation bar of Safari and see if this allows you to follow the links.

  • form name and email are autofilled. Cannot remove

    I use the latest firefox 4/Vista... .see below

    When I go to some sites, the user name and the e-mail I used before a loooong time ago on another site automatically appear in the name field and email (in the comment section).

    I've never visited these sites before and still less posted something on them or used the e-mail/logon in a different way. There is no cookies associated with these sites in my cookies.

    I tried turnign off remember search and form history
    I tried to delete and move delete
    whenever I return to these areas of the site, same thing.
    I don't use any plugin autoform.

    I think that extra detective work may be necessary. Here's a thought. Some sites share comments, reviews and investigations. If you right-click close the form with the unwanted information in it, is there a 'this framework' in the context menu? If so, which follow to display the frame information see the area of the true source. You may need to clear cookies from this domain.

  • A way to find my previous questions and problem reports?

    Is it possible on this forum to find my previous questions and problem reports? Since viewing a question earlier today, I found the greater PART of the answer and would like to add that I found the question, without waiting for someone else to answer. I can't remember the title I gave to the previous question, or I would use this title in the search for it.

    Information troubleshooting below is most relevant to a previous problem that this question.

    Contributions my link on main page of the forum should display a list of all your job offers.

    See the search in this forum for your username under "posed by".

  • I don't remember my password or security questions, and email recovery is an old, that I no longer use. What can I do?

    I don't remember my password or security questions, and email recovery is an old, that I no longer use. What can I do?

    You will need to contact support in the country where you are (and therefore the country on your account) for questions (and the password) reset: Contact Apple for the Apple ID account security support

    If your country is not on this page, then try this form to contact Support: https://www.apple.com/emea/support/itunes/contact.html

    When they have been reset you can then update your email address of relief for possible future use: on your Apple ID - Apple Support email addresses

    Or if it is available in your country, you can substitute 2-step verification: frequently asked questions about two-step for Apple ID verification

  • I need help, I forgot my security answers and Email not send to my Email of relief.

    I need help, I forgot my security answers and Email not send to my Email of relief.

    Unless it is in a spam filter, you have to ask Apple to reset your security questions. To do this, click here and choose a method; If this page does not list one for your country or if you are unable to call, complete and submit this form.

    (137175)

  • VB 6.0 and Crystal Report 8.5

    one of our private applications was developed by VB 6.0 and Crystal Report 8.5. Let me these EOS or produced without license

    Try asking in the forums of Visual Basic:
    http://social.msdn.Microsoft.com/forums/vstudio/en-us/home?Forum=vbgeneral

    Crystal Reports is not a product of Ms. You need to ask them.

Maybe you are looking for