Help change the script to a report

I tried, but have been unable to make this script in a report.  Here's the script I would like to make a report:

{foreach ($VMHost in Get-VMHost)
$esx = get-view-Id $VMHost.id
{foreach ($vSwitch to $esx.Config.Network.Vswitch)}
Write-Host $vSwitch.Name
Write-Host "' tmac changes:" $vSwitch.Spec.Policy.Security.macChanges
Write-Host "' tForged passes:" $vSwitch.Spec.Policy.Security.ForgedTransmits
}
}

I would also add the esx host name in the output.  I would like the output to this format if possible:

esxservername, mac, wrought changes passes

I was looking at this script as sort of a model, but when I went to replace parts of the script it just did not work properly.  This script is the VM information, but I'm looking for the script above be put in this type of report format.  Or am I wrong in that the script above is only good for just posting out on-screen during the launch in powerCLI?

$report = foreach ($vm in (Get - VM | where {$_.})) PowerState - eq 'Receiving'})) {}
Get-NetworkAdapter - VM $vm | `
Select @{N = "VMname"; E = {$vm. Name}},
@{N = "MAC address"; E={$_. MacAddress}}
}

$report | Export-Csv «.\output.csv"- NoTypeInformation - UseCulture

Thanks in advance for any help.

Hi Mark,

The following script will give you the report of your choice:

Get-View -ViewType HostSystem | ForEach-Object {
  $VMHostView =$_
  $VMHostView.Config.Network.vSwitch | ForEach-Object {
    $Report = "" | Select-Object -Property VMHost,vSwitch,"MAC Changes","Forged Transmits"
    $Report.VMHost = $VMHostView.Name
    $Report.vSwitch = $_.Name
    $Report."MAC Changes" = $_.Spec.Policy.Security.macChanges
    $Report."Forged Transmits" = $_.Spec.Policy.Security.ForgedTransmits
    $Report
  }
}

Best regards, Robert

Tags: VMware

Similar Questions

  • Help change the lightness of the foreColor script

    Hello

    I would like some help with the scripts here: I am currently using this script that I found in the forums to change the brightness of the current foreground color

    *****************

    #target photoshop

    var foreColor = new SolidColor;

    foreColorH = app.foregroundColor.hsb.hue; Initial value

    foreColorS = app.foregroundColor.hsb.saturation;

    foreColorB = app.foregroundColor.hsb.brightness;

    foreColor.hsb.hue is foreColorH + 0.;

    If (foreColorB + 10 > 100) {foreColor.hsb.brightness = 100}

    else {foreColor.hsb.brightness = foreColorB + 10 ;}

    foreColor.hsb.saturation is foreColorB + 0.;

    app.foregroundColor = foreColor;

    *********************

    Modify this script to brightness-10 only the result below (red arrows), but what I really need, is to change the lightness down if the color picker is going down, as the blue goes to the top.

    Thanks much for any help.

    lightness.jpg

    This line is incorrect. It is assign the value of brightness saturation:

    foreColor.hsb.saturation=foreColorB+0;
    

    It should be:

    foreColor.hsb.saturation=foreColorS+0;
    
  • How can I change the script on my windows live mail in English after it being hacked

    my windows live has been hacked. I decided to go back inside. But unable to change the script back to English.

    Windows Live Mail questions belong here: http://windowslivehelp.com/product.aspx?productid=15

  • Help please change the script number

    Hello!

    There is one such script or plugin, hand Controller.jsx and there is a single track camera parameter limit somehow the number that allows you to control up to 1370, for example, I need to infinity, or at least to 20,000, to try to change the number in the main Controller.jsx file but nothing changed. wrote one person here, he said the difficulty of "PresetEffects.xml" in the folder "C:-Program Files-Adobe------Adobe after effects CC 2015------Support Files. I changed the track camera up to the desired value, but as soon as I change more than 1370 all is lost. Plug-and-project joint. project of https://Cloud.mail.ru/public/3AwZ/fCu2WcPSh and https://cloud.mail.ru/public/H6C8/smxDKdXPM

    Help me please.

    Here it goes

  • the XML reader - need assistance to change the script, please help

    Hi all, I don't know if this is the right place for this question but I want to change a xml flash drive so that it creates the playlist with the name I want and not the default. Some can tell me please how to change this so that when the player has found songs in the "my_mp3s" folder it creates a named xml playlist

    'mymusic.xml ' instead of the default "audioplaylist.xml".  I tried to edit the script of the player's actions and overwrite changes but it still does not work, here is the code please help. I found this script online.

    Thank you

    Stop();

    / * ALL BUTTONS BELOW ARE MARKED FOR EDITABLE AND DON'T CHANGE, BUT IF YOU KNOW WHAT YOU ARE DOING
    THEN YOU CAN ACTUALLY CHANGE WHAT YOU WANT BUT FOR THIS APP WORKS CORRECTLY ONLY CHANGE IF NECESSARY
    ENTRIES... ONCE YOU HAVE MADE YOUR CHANGES, COPY AND PASTE THIS ENTIRE SCRIPT PAGE IN
    THE FIRST IMAGE OF THE SCENARIO THAT HE RIGHT THE SCRIPT THATS ALREADY THERE.
    The button labels for the XML READER text * /.
    SIDE MENU BUTTONS\\\
    Btn1.buttText.ButtonText.text = "DOWNLOAD FILES"; DO NOT CHANGE
    btn2.buttText.ButtonText.text = "SYSTEM VOLUME"; DO NOT CHANGE
    btn3.buttText.ButtonText.text = 'EDIT PLAYLIST XML'; DO NOT CHANGE
    btn4.buttText.ButtonText.text = "BURN CD"; DO NOT CHANGE
    btn5.buttText.ButtonText.text = "CREATE a FOLDER"; DO NOT CHANGE
    btn6.buttText.ButtonText.text = 'DELETE FILE'; DO NOT CHANGE
    btn7.buttText.ButtonText.text = "CDROM OPEN"; DO NOT CHANGE
    btn8.buttText.ButtonText.text = 'OPEN DVD'; DO NOT CHANGE
    btn9.buttText.ButtonText.text = "FTP CLIENT"; DO NOT CHANGE
    btn14.buttText.ButtonText.text = "VIEW PLAYLIST"; DO NOT CHANGE
    btn23.buttText.ButtonText.text = "INFO"; DO NOT CHANGE
    btn25.buttText.ButtonText.text = 'HELP '; DO NOT EDIT
    btn26.buttText.ButtonText.text = 'HELP MDM'; DO NOT CHANGE
    LOW BTNS
    btn19.buttText.ButtonText.text = "OPEN TRAY"; DO NOT CHANGE
    btn20.buttText.ButtonText.text = 'CLOSE CD TRAY'; DO NOT CHANGE
    btn21.buttText.ButtonText.text = "OPEN DVD TRAY"; DO NOT CHANGE
    btn22.buttText.ButtonText.text = "CLOSE DVD TRAY"; DO NOT CHANGE

    Here ARE the FUNCTIONS THAT CAN BE CHANGED, BUT THAT THOSE BRAND 'YOU CAN CHANGE this PATH' are sure to change
    MY DOWNLOAD FILES
    Btn1.onRelease = function() {}
    MDM. Dialogs.BrowseFile.filterList = "MP3 files | * .mp3 ';
    MDM System.exec ("E:\\My Music\\").    Path to the download of the file //YOU CAN CHANGE THIS path
    }
    SYSTEM VOLUME / / / DO NOT CHANGE
    btn2.onRelease = function() {}
    MDM. System.exec("sndvol32.exe");    System volume .exe
    }
    EDITING XML PLAYLIST / / / DO NOT CHANGE
    btn3.onRelease = function() {}
    MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\audiolist2.xml");    XML list
    }
    BURN CD / / YOU CAN CHANGE THIS PATH
    btn4.onRelease = function() {add your way here to your burning nero for example software
    MDM. System.exec (MDM. System.Paths.programFiles+"Nero\\nero.exe");
    }
    CREATE FOLDER / / / DO NOT CHANGE
    btn5.onRelease = function() {}
    MDM FileSystem.makeFolderUnicode ("C:\\Program Files\\Mgamerz\\Burn").    Creates a working folder for burning mp3s
    }
    DELETE FOLDER / / / DO NOT CHANGE
    btn6.onRelease = function() {///Deletes working folder if you want to remove it
    MDM. FileSystem.deleteFolder ("C:\\Program Files\\Mgamerz\\Burn", "ask", "Are you sure");
    }
    OPEN CDROM / / YOU CAN CHANGE THIS PATH
    btn7.onRelease = function() {///Opens change of cdrom drive letter to match your pc
    MDM System.exec("I:\\."); "
    }
    OPEN DVDROM / / YOU CAN CHANGE THIS PATH
    btn8.onRelease = function() {///Opens changing the letter to match your pc dvdrom drives
    MDM System.exec("I:\\."); "
    }
    FTP CLIENT / / YOU CAN CHANGE THIS PATH
    btn9.onRelease = function() {///File path to your ftp software (I use here the cover page)}


    MDM. System.exec (MDM. System.Paths.programFiles + "Microsoft FrontPage Bar\\Office\\Microsoft Office\\Office10\\Shortcut"); "
    }
    Buttons in the header at the top

    DRIVE C: / / / DO NOT EDIT
    btn10.onRelease = function() {///Opens to the top of drive c: for navigation
    MDM. System.exec (MDM. System.Paths.programFiles+"\\");
    }
    * btn11.onRelease = function() {///Opens to the top of the unit for navigation
    MDM System.exec("D:\\."); "    YOU CAN CHANGE THIS PATH
    }*/
    MY DOCUMENTS / / / NOT EDIT
    btn12.onRelease = function() {///Opens my documents for navigation}
    MDM. Dialogs.BrowseFile.filterList = "MP3 files | * .mp3 ';
    MDM. Dialogs.BrowseFile.show ("my Documents\\");
    }
    MP3 FILE / / / DO NOT CHANGE THE
    btn13.onRelease = function() {//main directory for mp3 files
    MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\my_mp3s\\");
    }
    VIEW PLAYLIST / / / DO NOT CHANGE
    btn14.onRelease = function() {///View playlist as a text file
    MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\my_mp3s\\mp3.t xt");
    }
    UPDATE XML FILE / / / DO NOT CHANGE
    btn15.onRelease = function() {///Creates xml playlist once new mp3s have been added
    MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\audiolist2.xml");
    }
    MINIMIZE BUTTON
    * btn16.onRelease = function() {//Minimizes application
    MDM. Application.Minimize (///DO) NOT EDIT
    }*/
    CLOSE BUTTON
    * btn17.onRelease = function() {///Closes application
    MDM. Application.Exit ('ask', ' are you sure you want to go out to? ") DO NOT EDIT
    }*/
    SCREEN CAPTURE DEVICE / / / DO NOT CHANGE
    btn18.onRelease = function() {///Screen capture sofdtware
    MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\apps\\Capture screen Studio\\css.exe");
    }
    OPEN CDROM TRAY / / YOU CAN CHANGE THIS PATH
    btn19.onRelease = function() {}
    MDM System.openCDTray ("I").
    }
    CDROM TRAY CLOSE / / YOU CAN CHANGE THIS PATH
    btn20.onRelease = function() {//Closes cdrom tray
    MDM System.closeCDTray ("I").
    }
    OPEN DVDROM PLATEAU / / YOU CAN CHANGE THIS PATH
    btn21.onRelease = function() {//Opens dvdrom
    MDM System.openCDTray ("H").
    }
    CLOSE TRAY DVDROM / / YOU CAN CHANGE THIS PATH
    btn22.onRelease = function() {//Closes dvdrom plateau
    MDM System.closeCDTray ("H").
    }

    * btn23.onRelease = function() {//DO NOT EDIT
    nextFrame();
    }*/
    HELP / / DO NOT EDIT
    btn25.onRelease = function() {//Closes dvdrom plateau
    MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\help.exe");
    }
    HELP OF MDM / / DO NOT EDIT
    btn26.onRelease = function() {//Closes dvdrom plateau
    MDM. System.exec (MDM. System.Paths.programFiles + "MDM helps 2.5 file\\MDM 2.5 UserManual.chm"); "
    }

    use:

    / * ALL BUTTONS BELOW ARE MARKED FOR EDITABLE AND DON'T CHANGE, BUT IF YOU KNOW WHAT YOU ARE DOING
    THEN YOU CAN ACTUALLY CHANGE WHAT YOU WANT BUT FOR THIS APP WORKS CORRECTLY ONLY CHANGE IF NECESSARY
    ENTRIES... ONCE YOU HAVE MADE YOUR CHANGES, COPY AND PASTE THIS ENTIRE SCRIPT PAGE IN
    THE FIRST IMAGE OF THE SCENARIO THAT HE RIGHT THE SCRIPT THATS ALREADY THERE.
    The button labels for the XML READER text * /.
    SIDE MENU BUTTONS\\\
    Btn1.buttText.ButtonText.text = "DOWNLOAD FILES"; DO NOT CHANGE
    btn2.buttText.ButtonText.text = "SYSTEM VOLUME"; DO NOT CHANGE
    btn3.buttText.ButtonText.text = 'EDIT PLAYLIST XML'; DO NOT CHANGE
    btn4.buttText.ButtonText.text = "BURN CD"; DO NOT CHANGE
    btn5.buttText.ButtonText.text = "CREATE a FOLDER"; DO NOT CHANGE
    btn6.buttText.ButtonText.text = 'DELETE FILE'; DO NOT CHANGE
    btn7.buttText.ButtonText.text = "CDROM OPEN"; DO NOT CHANGE
    btn8.buttText.ButtonText.text = 'OPEN DVD'; DO NOT CHANGE
    btn9.buttText.ButtonText.text = "FTP CLIENT"; DO NOT CHANGE
    btn14.buttText.ButtonText.text = "VIEW PLAYLIST"; DO NOT CHANGE
    btn23.buttText.ButtonText.text = "INFO"; DO NOT CHANGE


    btn25.buttText.ButtonText.text = 'HELP '; DO NOT EDIT
    btn26.buttText.ButtonText.text = 'HELP MDM'; DO NOT CHANGE
    LOW BTNS
    btn19.buttText.ButtonText.text = "OPEN TRAY"; DO NOT CHANGE
    btn20.buttText.ButtonText.text = 'CLOSE CD TRAY'; DO NOT CHANGE
    btn21.buttText.ButtonText.text = "OPEN DVD TRAY"; DO NOT CHANGE
    btn22.buttText.ButtonText.text = "CLOSE DVD TRAY"; DO NOT CHANGE

    Here ARE the FUNCTIONS THAT CAN BE CHANGED, BUT THAT THOSE BRAND 'YOU CAN CHANGE this PATH' are sure to change
    MY DOWNLOAD FILES
    Btn1.onRelease = function() {}
    MDM. Dialogs.BrowseFile.filterList = "MP3 files | * .mp3 ';
    MDM System.exec ("E:\\My Music\\").    Path to the download of the file //YOU CAN CHANGE THIS path
    }
    SYSTEM VOLUME / / / DO NOT CHANGE
    btn2.onRelease = function() {}
    MDM. System.exec("sndvol32.exe");    System volume .exe
    }
    EDITING XML PLAYLIST / / / DO NOT CHANGE
    btn3.onRelease = function() {}
    MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\audiolist2.xml");    XML list
    }
    BURN CD / / YOU CAN CHANGE THIS PATH
    btn4.onRelease = function() {add your way here to your burning nero for example software
    MDM. System.exec (MDM. System.Paths.programFiles+"Nero\\nero.exe");
    }
    CREATE FOLDER / / / DO NOT CHANGE
    btn5.onRelease = function() {}
    MDM FileSystem.makeFolderUnicode ("C:\\Program Files\\Mgamerz\\Burn").    Creates a working folder for burning mp3s
    }
    DELETE FOLDER / / / DO NOT CHANGE
    btn6.onRelease = function() {///Deletes working folder if you want to remove it
    MDM. FileSystem.deleteFolder ("C:\\Program Files\\Mgamerz\\Burn", "ask", "Are you sure");
    }
    OPEN CDROM / / YOU CAN CHANGE THIS PATH
    btn7.onRelease = function() {///Opens change of cdrom drive letter to match your pc
    MDM System.exec("I:\\."); "
    }
    OPEN DVDROM / / YOU CAN CHANGE THIS PATH
    btn8.onRelease = function() {///Opens changing the letter to match your pc dvdrom drives
    MDM System.exec("I:\\."); "
    }
    FTP CLIENT / / YOU CAN CHANGE THIS PATH
    btn9.onRelease = function() {///File path to your ftp software (I use here the cover page)}
    MDM. System.exec (MDM. System.Paths.programFiles + "Microsoft FrontPage Bar\\Office\\Microsoft Office\\Office10\\Shortcut"); "
    }
    Buttons in the header at the top

    DRIVE C: / / / DO NOT EDIT
    btn10.onRelease = function() {///Opens to the top of drive c: for navigation
    MDM. System.exec (MDM. System.Paths.programFiles+"\\");
    }
    * btn11.onRelease = function() {///Opens to the top of the unit for navigation
    MDM System.exec("D:\\."); "    YOU CAN CHANGE THIS PATH
    }*/
    MY DOCUMENTS / / / NOT EDIT
    btn12.onRelease = function() {///Opens my documents for navigation}
    MDM. Dialogs.BrowseFile.filterList = "MP3 files | * .mp3 ';
    MDM. Dialogs.BrowseFile.show ("my Documents\\");
    }
    MP3 FILE / / / DO NOT CHANGE THE
    btn13.onRelease = function() {//main directory for mp3 files
    MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\my_mp3s\\");
    }
    VIEW PLAYLIST / / / DO NOT CHANGE
    btn14.onRelease = function() {///View playlist as a text file
    MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\my_mp3s\\mp3.t xt");
    }
    UPDATE XML FILE / / / DO NOT CHANGE
    btn15.onRelease = function() {///Creates xml playlist once new mp3s have been added
    MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\mymusic.xml");
    }
    MINIMIZE BUTTON
    * btn16.onRelease = function() {//Minimizes application
    MDM. Application.Minimize (///DO) NOT EDIT
    }*/
    CLOSE BUTTON
    * btn17.onRelease = function() {///Closes application
    MDM. Application.Exit ('ask', ' are you sure you want to go out to? ") DO NOT EDIT
    }*/
    SCREEN CAPTURE DEVICE / / / DO NOT CHANGE
    btn18.onRelease = function() {///Screen capture sofdtware
    MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\apps\\Capture screen Studio\\css.exe");
    }
    OPEN CDROM TRAY / / YOU CAN CHANGE THIS PATH
    btn19.onRelease = function() {}
    MDM System.openCDTray ("I").
    }
    CDROM TRAY CLOSE / / YOU CAN CHANGE THIS PATH
    btn20.onRelease = function() {//Closes cdrom tray
    MDM System.closeCDTray ("I").
    }
    OPEN DVDROM PLATEAU / / YOU CAN CHANGE THIS PATH
    btn21.onRelease = function() {//Opens dvdrom
    MDM System.openCDTray ("H").
    }
    CLOSE TRAY DVDROM / / YOU CAN CHANGE THIS PATH
    btn22.onRelease = function() {//Closes dvdrom plateau
    MDM System.closeCDTray ("H").
    }

    * btn23.onRelease = function() {//DO NOT EDIT
    nextFrame();
    }*/
    HELP / / DO NOT EDIT
    btn25.onRelease = function() {//Closes dvdrom plateau
    MDM. System.exec (MDM. System.Paths.programFiles+"Mgamerz\\help.exe");
    }
    HELP OF MDM / / DO NOT EDIT
    btn26.onRelease = function() {//Closes dvdrom plateau
    MDM. System.exec (MDM. System.Paths.programFiles + "MDM helps 2.5 file\\MDM 2.5 UserManual.chm"); "
    }

  • In Windows Vista, I can not change the settings in my 'reports on problems and Solutions' Please help

    I'm the administrator of this PC, and it is the only account that I have.

    Quick fix pls help thnks

    Hello
    • What happens when you try to change the settings?
    • You receive an error message?
    • What were the changes made before the problem occurred?
    • Which settings you want to change?

    You can view these methods:
    Method 1:
    I suggest you to disable any program of security on your computer and check if it solves the problem.

    After reviewing the question you must reactivate the security on your computer program.

    Note: Run the computer without antivirus software or firewall is a potential threat to the computer; Be sure to activate security software after completing the troubleshooting steps and after identifying the problem.

    Method 2:
    I recommend you perform the clean boot.

    Configuration of your system in a clean boot state helps determine if third-party applications or startup items are causing the problem. If so, you need to maybe contact the manufacturer of the program for updates or uninstall and reinstall the program.

    See the following article in the Microsoft KB for more information on how to solve a problem by performing a clean boot in Windows Vista or Windows 7:

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135

    Note: After troubleshooting, be sure to set the computer to start as usual as mentioned in step 7 in the above article.

     
  • Can someone help me change the script function?

    I have a script for indesign:


    var link, image, frame,.
    doc = app.activeDocument,
    Links = doc.links,.
    counter = 0;

    for (var i = links.length - 1; i > = 0; i--) {}
    If (links [i] .status == LinkStatus.LINK_MISSING) {}
    try {}
    link = links [i];
    image = link.parent;
    Frame = image.parent;
    Frame.Remove ();
    counter ++;
    }
    {} catch (err)
    $.writeln (i + "-" + err);
    }
    }
    }


    which is made by Kasyan Servetsky, function: remove all objects from the missing link, it works fine, but only works on the single file,.
    now, I want to change the purpose of the function to let him work on all open files.


    for example, I opened more than a dozen files, all the files have disappeared as objects, I want to delete all items in the missing link in the file by a simple click the script,


    is this possible?

    Hi Harvey.

    I guess that's what you expect below,

    ***********************************************************************

    var link, image, image;

    var openDocs = app.documents.

    var openDocsLen = openDocs.length;

    for (var d = 0; d)< opendocslen;="" d="">

    currDoc = openDocs [d],

    Links = currDoc.links,.

    counter = 0;

    for (var i = links.length - 1; I > = 0; i--) {}

    If (links [i] .status == LinkStatus.LINK_MISSING) {}

    try {}

    link = links [i];

    image = link.parent;

    Frame = image.parent;

    Frame.Remove ();

    counter ++;

    }

    {} catch (err)

    $.writeln (i + "-" + err);

    }

    }

    }

    }

    *****************************************************************************

    Please add extra code to save the document if you need

    Concerning

    Augustine

  • How can I change the unique name of Report.vi in the images?

    I have a VI that generates an HTML with the Report.vi that is intended to be downloaded for the monitoring of certain values via internet, and I generate the html code of all the 15 minutes.  My problem is that even if the file report.HTML is replaced the graphic images are not. After a day or 2 so I have lots of jpgs in my file with only 1 htm file. Is - this here anyway to make the report.vi to change this and simply use the same name for the graphics? So I just end up with 3 files instead of a lot after a few days.

    Thanks for the help

    Hi - L-,

    You can change the name of your file in the following (see attachment).

    Mike

  • need help with a script of PowerCLI report IOPS / s

    I found the following script that gives me the data I want, but not ultimately I need. At the moment he puts it in the PowerCLI window, but I need to get into a csv file so it can be easily sent to others for review.

    This is the script that I found:

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    11

    12

    13

    14

    15

    16

    17

    18

    19

    20

    21

    22

    23

    24

    25

    26

    27

    Add-pssnapin VMware. VimAutomation . Core -ErrorAction SilentlyContinue

    $daysback = -30

    write-host ' What vCenter you want to connect to? -You may be prompted for a user name and password'

    write-host ""

    Se connect-VIServer -menu

    write-host ""

    $vm_data = reading-host "Enter the number of a-Org"

    write-host ""

    write-host "ARE gathering Ops / s Stats"

    write-host ""

    $vms = Get-Folder | where {$_. Name -like "*$vm_data*" } | get-vm | where {$_. PowerState -eq "PoweredOn" }

    write-host ( "{0,-70}`t{1,8}`t{2,8}`t{3,8}`t{4,8}" -f "VM", "W IOPS avg", "R IOPS avg", "W IOPS max", "R IOPS max" ) `

    ; $vms | sort | % {

    $wval = ()()()Get-Stat $_ -stat « datastore.numberWriteAveraged.average » -Start ()Get-Date). AddDays ($daysback) -Finish (Get-Date) ) | select -expandproperty Value) | measure -average -max);

    $rval = (((Get-Stat $_ -stat "datastore.numberReadAveraged.average" -Start (Get-Date). AddDays ($daysback) -Finish (Get-Date) ) | select -expandproperty Value) | measure -average -max);

    write-host ( "{0,-70}`t{1,8:N2}`t{2,8:N2}`t{3,8:N2}`t{4,8:N2}" -f $_. Name , $wval. average , $rval. average , $wval. maximum , $rval. maximum )

    }

    write-host ""

    write-host "You can copy the output by selecting the text and copy it to NotePad ++ or similar: .

    write-host " " "

    " read-host" Hit Enter to Output.

    In one, I run, I changed the "Connect-VIServer-menu" to simply plug the vCenter Server I use. I also changed line 16 to 'Get-ResourcePool' since there's not enough pools to make this work. Using the PowerCLI utility, I don't have the option that indicates on line 25. I used the export feature to create csv files in other scripts, but I can't make it work in this case. I know it's probably something simple that I'm just missing.

    I like the length of time that this script uses the information. If anything, I don't want to go back to the suite to get a better idea of what the actual maximum number what is / was. It is also necessary to have the columns for information (as he shows). If we are to refine for which metric is present, I would be ok with just having the IOPS numbers / s max in the table.

    Any guru PowerCLI have an idea?

    Try like this

    Add-pssnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue

    $daysback = - 30

    write-host "what vCenter you want to connect to? -You may be prompted for a user name and password"

    write-host "

    SE connect-VIServer-menu

    write-host "

    $vm_data = read-host "enter the number of a - Org"

    write-host "

    write-host "gathering IOPS / s Stats.

    write-host "

    $vms = get-file | where {$_.} {Name: like "* $vm_data *"} | Get - VM | where {$_.} PowerState - eq "Receptor"}

    $report = $vms | kind | % {

    $wval = (((get-Stat_$_-stat_"datastore.numberWriteAveraged.average"-Start_(Get-Date).adddays ($daysback) - Finish (Get-Date)) |))

    Select - expandproperty value) | measure - average - max);

    $rval = (((get-Stat_$_-stat_"datastore.numberReadAveraged.average"-Start_(Get-Date).adddays ($daysback) - Finish (Get-Date)) |))

    Select - expandproperty value) | measure - average - max);

    $_ | Select Name,

    @{N = "IOPS / W avg s";} E = {$wval. Average}},

    @{N = "Avg R Ops ARE / s";} E = {$rval. Average}},

    @{N = "W IOPS / s max";} {E = {$wval.maximum}}.

    @{N = "IOPS R / s max";} {E = {$rval.maximum}}

    }

    $report | Export Csv report.csv - NoTypeInformation - UseCulture

  • Change the script function

    Hello world

    I use this script:

    App.Selection [0] .silence = "[Undefine]"; "

    App.Selection [0]. Underline = true;

    to change what I chose

    01.png

    change to [Remove], do highlight.

    02.png

    but:

    If I add the
    [Remove] in inserpoint,

    3.jpg

    the comeout would not insist.

    4.jpg

    Can someone help me to change the functions:

    is no question of the
    selection or inserpoint I want to get [Remove] it with underscores.

    Thank you

    Consider

    Teetan

    Try this,

    var mySelection = app.selection[0];
    if(mySelection instanceof InsertionPoint)
    {mySelection.insertionPoints[0].underline=true; mySelection.contents="[undefine]";}
    else if(mySelection instanceof Cell)
    {for(i=0; i
    

    Vandy

  • Change the locale for a report from jasper who was called pit utl_http

    All,

    When we call the utl_http package to generate a report of jasper within the oracle and save it as a BLOB in the default language (nls_language and nls_territory) gets crushed by AMERICA/America.

    This gives problems as decimal points and comma...

    In regard to is that I know that it is not possible to change the language within the server of jasper.

    I suspect that utl_http creates a virtual browser with a default language (AMERICAN), that it becomes hereditary by server of jasper. Is there a way to change this language?

    I've already tried
    execute immediate ('alter session set nls_language= ''DUTCH'' nls_territory= ''BELGIUM'' nls_numeric_characters='',.''');
    It did not work!

    Work around for now is to change the format mask in my report Jasper query, but so that we can do is more aggregate functions.

    Any help is greatly appreciated...

    Thnx

    Hello

    Just a guess. Try following

    req := utl_http.begin_request('http://www.psoug.org');
    utl_http.set_header(req, 'Content-Language', 'da');
    resp := utl_http.get_response(req);
    

    For more information on HTTP headers, see http://en.wikipedia.org/wiki/List_of_HTTP_header_fields

    ----
    Lavenu
    MaxApex accommodation
    http://www.maxapex.com

  • Help with the scripts of "event handler".

    Ok. I am new to using event handler and the Listener Script for I have not every little thing down yet.

    What I'm trying to do is set up an event handler to activate a script when I select a layer. As I have now, the active script no matter what I choose and I'm unable to limit it to only activate when I select a layer. The ScriptListener output was:

    var idslct = charIDToTypeID ("TPCV");
    var desc10 = new ActionDescriptor();
    var idnull = charIDToTypeID ("null");
    ref19 var = new ActionReference();
    var idLyr = charIDToTypeID ("Lyr");
    ref19.putName (idLyr, 'Face');
    desc10.putReference (idnull, ref19);
    var idMkVs = charIDToTypeID ("MKV");
    desc10.putBoolean (idMkVs, false);
    executeAction (idslct, desc10, DialogModes.NO);

    I used TPCV under the name of the event during the creation of the new event in the event handler. However, this same ID is used when a tool is selected. This isn't a huge problem, but for the fact that my reason for setting this up is so that when I select a layer, first I want to implement a predefined specific tool to use on it. If I can change the tools (select another tool) and have always the same layer selected in the script automatically selects the initial tool to the layer which is always selected this layer is always the active layer.

    Example: Suppose I have the following layers...

    Texture

    Heal

    Tones

    Eyes

    Lips

    Face

    These are not my normal layers, but for example when I select the layer "Cure" I would like to start with the Healing Brush tool. However, sometimes I want to use clone on this layer as well. Using the event at this time, Heal would still be the active layer when I make the choice to the clone tool so the script would then return the selected tool, Healing Brush tool.

    So, is it possible to limit the selection event ID to activate only when a layer is selected? I noticed that the line above in bold/red is the event ID of layer. I don't know how to do this in the event handler or the script.

    Thanks for any help.

    Mike

    Here ya go...

    //
    // SelectLayerHandler.jsx
    //
    
    function _selectLayerHandler(desc) {
      // do whatever when a layer is selected
      var doc = app.activeDocument;
      var layer = doc.activeLayer;
      alert("Layer " + layer.name + " selected");
    };
    
    cTID = function(s) { return app.charIDToTypeID(s); };
    sTID = function(s) { return app.stringIDToTypeID(s); };
    
    try {
      if (arguments.length >= 2) {
        var desc = arguments[0];
        var event = arguments[1];
        if (event == cTID('slct')) {
          var ref = desc.getReference(cTID('null'));
          var cls = ref.getDesiredClass();
          if (cls == cTID('Lyr ')) {
            _selectLayerHandler(desc);
          }
        }
      }
    } catch (e) {
      alert( "Error: " + e + ":" + e.line );
    }
    
    "SelectLayerHandler.jsx";
    // EOF
    
  • Can someone help with the scripts on this file?

    Hi, I hope someone with a bigger brain can help me here.

    I have an existing Flash CS3 file that makes up the result to http://www.infusion-set.com/Flash/eLearning/Inset30/inset30_eguide.html .

    The customer asked if I could add an extra tab at the top after that 'group' called 'Contact us' with link to an additional page. The design was done in ActionScript 2 with references to XML files for dynamic content because it has been done in other languages.

    I modified the XML file with the correct references to a new page and a .swf file that accompanies it to play in the field of animation.

    I tried a .fla version where I duplicated one of the existing tabs script, changed the XML references and changed the variables if necessary to "con or"Con"(which is to reach us). Unfortunately, he made the menu tab go completely off the page and was patently false in some way.

    Can someone give me a clue as to what to change here on the original file that I am a novice with ActionScripts, so ask me.

    For reference, I have attached the HTML files with scripts of original file and my incorrect version. The chronology is 103 images with the scripts placed in frame 1 and 102

    Thank you.

    Garry

    The buttons are all created using the same library object (but MC), except for the code you have in the revised file does not call on it for the con button.

    You calling on something with a name of 'con' link, which tells me that a quick check is not - then it is undefined in the code when you try to use it.  I found this by using trace (newConBut._x); After its _x value was assigned, as I said, you should try.   So the first thing you want to do is to change the following line from...

    var newConBut = _root.attachMovie ("con", "conbut", _root.getNextHighestDepth ());

    TO

    var newConBut = _root.attachMovie ("but", "conbut", _root.getNextHighestDepth ());

    so that it uses the but MC who is used to this end in the library.  So, you want to correct the assignment _x of the buttons and I think that you had previously...

    newConBut._x = 650 - newConBut._width;
    newRecBut._x = newConBut._x - newRecBut._width;

    Here is a picture of what these changes (note, without the XML file, I had to finagle things just to work, then the labels of biutton are not what they will be)...

  • How can I change the name of this report?

    sined-out.png

    In an APEX application, there is a named Sined-Out report.  It should be signed-Out.  (see photo).  How can I change the name?  Thank you

    Oracle Application Express version 4.0

    Nevermind, I see how to do it.  Thanks anyway.

  • help for the script

    Hello team

    [I wrote the script for collecting host information, basically I get some information is correctly, but for some fields, I'm System.Object]

    Here's the script for any domain

    vnic vnicspec pnicdevice pnicmac pnickey pnicdriver nodewwn hbadevice fagit linkspeed vswitch

    I'm System.Object [], kindly help

    # Handler VM guests

    $objHosts = @)

    $vmhosts = get-vmhost

    If ($null - eq $vmhosts) {}

    write-host ' Retry «$VIServ»»

    $vmhosts = get-vmhost

    }

    # for each host download the info from the inventory, I want to...

    {foreach ($vmhost to $vmhosts)

    $vmhostview = $vmhost | Get-View

    $objHost = "" | Select

    Region, name, OSType, OSFullName, OSVersion, OSBuild, vendor, model, UUID, MemorySize, CpuModel, CpuMHz, NumCPuPkgs, NumCPuCores, Vm

    otionEnabled, ESXHostID, vmnicscount, hbacount, OCPU, OMEM, uptime, memreservation, cpureservation, memlimit, cpulimit, prdley, vs

    witch, vnic, vnicspec, pnicdevice, pnicmac, linkspeed, pnickey, pnicdriver, nodewwn, hbadevice, lboot, ClusterID, fagit

    write-host "host treatment for ' $vmhostview. Name

    $objHost.Region = $Region

    $objHost.Name = $vmhostview. Name

    $objHost.OSType = $vmhostview. Config.product.Name

    $objHost.OSFullName = $vmhostview. Config.product.FullName

    $objHost.OSVersion = $vmhostview. Config.product.Version

    $objHost.OSBuild = $vmhostview. Config.product.Build

    $objHost.Vendor = $vmhostview.summary.hardware.Vendor

    $objHost.Model = $vmhostview.summary.hardware.Model

    $objHost.UUID = $vmhostview.summary.hardware.UUID

    $objHost.MemorySize = ([int] ($vmhostview.summary.hardware.MemorySize / 1 MB))

    $objHost.CpuModel = $vmhostview.summary.hardware.CpuModel

    $objHost.CpuMhz = $vmhostview.summary.hardware.CpuMhz

    $objHost.NumCPuPkgs = $vmhostview.summary.hardware.NumCPuPkgs

    $objHost.NumCPuCores = $vmhostview.summary.hardware.NumCPuCores

    $objHost.VmotionEnabled = $vmhostview.summary.config.VmotionEnabled

    $objHost.ESXHostID = $vmhostview.moref.value

    $objHost.vmnics = $vmhostview.summary.hardware.numnics

    $objHost.vmhbas = $vmhostview.summary.hardware.numhbas

    $objHost.lboot = $vmhostview.summary.runtime.Boottime

    $objHost.OCPU = $vmhostview.summary.quickstats.overallCPUusage

    $objHost.OMEM = $vmhostview.summary.quickstats.overallMemoryUsage

    $objHost.uptime = $vmhostview.summary.quickstats.Uptime

    $objHost.memreservation = $vmhostview.config.systemresources.config.memoryallocation.reservation

    $objHost.cpureservation = $vmhostview.config.systemresources.config.cpuallocation.reservation

    $objHost.memlimit = $vmhostview.config.systemresources.config.memoryallocation.limit

    $objHost.cpulimit = $vmhostview.config.systemresources.config.CPUallocation.limit

    $objHost.prdley = $vmhostview.config.network.portgroup.key

    $objHost.vswitch = $vmhostview.config.network.portgroup.vswitch

    $objHost.vnic = $vmhostview.config.network.vnic.portgroup

    $objHost.vnicspec = $vmhostview.config.network.vnic.spec.mac

    $objHost.pnicdevice = $vmhostview.config.network.pnic.device

    $objHost.pnicmac = $vmhostview.config.network.pnic.mac

    $objHost.linkspeed = $vmhostview.config.network.pnic.linkspeed

    $objHost.pnickey = $vmhostview.config.network.pnic.key

    $objHost.pnicdriver = $vmhostview.config.network.pnic.driver

    $objHost.Nodewwn = $vmhostview.config.storagedevice.hostbusadapter.NodeWorldWideName

    $objHost.portwwn = $vmhostview.config.storagedevice.hostbusadapter.PortWorldWideName

    $objHost.hbadevice = $vmhostview.config.storagedevice.hostbusadapter.device

    $objHost.ClusterID = ($vmhost |) Get - Cluster). Name

    $objHosts = $objHosts + $objHost

    }

    # Write the host inventory to a CSV...

    $Filename = "ESX_Host_Report1.csv".

    $objHosts | Export-Csv $Filename - noType

    No tricks, just a join of elements in the array.

    # Get the VM guests

    $objHosts = @)

    $vmhosts = get-vmhost

    If ($null - eq $vmhosts) {}

    write-host ' Retry «$VIServ»»

    $vmhosts = get-vmhost

    }

    # for each host download the info from the inventory, I want to...

    {foreach ($vmhost to $vmhosts)

    $vmhostview = $vmhost | Get-View

    $objHost = "" | Select

    Region, name, OSType, OSFullName, OSVersion, OSBuild, vendor, model, UUID, MemorySize, CpuModel, CpuMHz, NumCPuPkgs, NumCPuCores, Vm

    otionEnabled, ESXHostID, vmnicscount, hbacount, OCPU, OMEM, uptime, memreservation, cpureservation, memlimit, cpulimit, prdley, vs

    witch, vnic, vnicspec, pnicdevice, pnicmac, linkspeed, pnickey, pnicdriver, nodewwn, hbadevice, lboot, ClusterID, fagit

    Write-Host "host treatment for ' $vmhostview. Name

    $objHost.Region = $Region

    $objHost.Name = $vmhostview. Name

    $objHost.OSType = $vmhostview. Config.product.Name

    $objHost.OSFullName = $vmhostview. Config.product.FullName

    $objHost.OSVersion = $vmhostview. Config.product.Version

    $objHost.OSBuild = $vmhostview. Config.product.Build

    $objHost.Vendor = $vmhostview.summary.hardware.Vendor

    $objHost.Model = $vmhostview.summary.hardware.Model

    $objHost.UUID = $vmhostview.summary.hardware.UUID

    $objHost.MemorySize = ([int] ($vmhostview.summary.hardware.MemorySize / 1 MB))

    $objHost.CpuModel = $vmhostview.summary.hardware.CpuModel

    $objHost.CpuMhz = $vmhostview.summary.hardware.CpuMhz

    $objHost.NumCPuPkgs = $vmhostview.summary.hardware.NumCPuPkgs

    $objHost.NumCPuCores = $vmhostview.summary.hardware.NumCPuCores

    $objHost.VmotionEnabled = $vmhostview.summary.config.VmotionEnabled

    $objHost.ESXHostID = $vmhostview.moref.value

    $objHost.vmnics = $vmhostview.summary.hardware.numnics

    $objHost.vmhbas = $vmhostview.summary.hardware.numhbas

    $objHost.lboot = $vmhostview.summary.runtime.Boottime

    $objHost.OCPU = $vmhostview.summary.quickstats.overallCPUusage

    $objHost.OMEM = $vmhostview.summary.quickstats.overallMemoryUsage

    $objHost.uptime = $vmhostview.summary.quickstats.Uptime

    $objHost.memreservation = $vmhostview.config.systemresources.config.memoryallocation.reservation

    $objHost.cpureservation = $vmhostview.config.systemresources.config.cpuallocation.reservation

    $objHost.memlimit = $vmhostview.config.systemresources.config.memoryallocation.limit

    $objHost.cpulimit = $vmhostview.config.systemresources.config.CPUallocation.limit

    $objHost.prdley = $vmhostview.config.network.portgroup.key

    $objHost.vswitch = $vmhostview.config.network.portgroup.vswitch

    $objHost.vnic = $vmhostview.config.network.vnic.portgroup

    $objHost.vnicspec = $vmhostview.config.network.vnic.spec.mac

    $objHost.pnicdevice = $vmhostview.config.network.pnic.device - join ' | '

    $objHost.pnicmac = $vmhostview.config.network.pnic.mac - join ' | '

    $objHost.linkspeed = $vmhostview.config.network.pnic.linkspeed - join ' | '

    $objHost.pnickey = $vmhostview.config.network.pnic.key - join ' | '

    $objHost.pnicdriver = $vmhostview.config.network.pnic.driver - join ' | '

    $objHost.Nodewwn = $vmhostview.config.storagedevice.hostbusadapter.NodeWorldWideName - join ' | '

    $objHost.portwwn = $vmhostview.config.storagedevice.hostbusadapter.PortWorldWideName - join ' | '

    $objHost.hbadevice = $vmhostview.config.storagedevice.hostbusadapter.device - join ' | '

    $objHost.ClusterID = ($vmhost |) Get - Cluster). Name

    $objHosts = $objHosts + $objHost

    }

    # Write the host inventory to a CSV...

    $Filename = "ESX_Host_Report1.csv".

    $objHosts | Export-Csv $Filename - noType

Maybe you are looking for