Date of creation of VM - support in a script

Hi people,

I need to know a date of creation of virtual machine, and apparently the only way is to run a script on the event logs. I found this script: time determination of vCenter VM creation events & amp; laquo; vmdev.info

I copied the script in Notepad and saved in a .ps1 file.

I'm a newbie with powershell and powercli, but had everything installed and working. I have connected to a host (5.5) and ran the script.\script.ps1. Nothing, no errors, no results. The cursor just returned.

Can someone help me with what Miss me? Or y at - it another way to determine the creation date? Now that I've started, I'm very keen to learn powercli. Thank you

Did you actually call the function (see the last line)?

Function Get-VMCreationTimes {}

$vms = get - vm

$vmevts = @)

$vmevt = new-object PSObject

{foreach ($vm to $vms)

#Progress bar:

$foundString = "found:" + $vmevt.name + "" + $vmevt.createdTime + ""+ $vmevt. " ' IPAddress + "" + $vmevt.createdBy.

$searchString = "search for:" + $vm.name.

$percentComplete = $vmevts.count / $vms.count * 100

write-progress-activity $foundString - $searchString - percentcomplete $percentComplete status

$evt = get-vievent $vm | Sort the Createduserid | Select - 1 first

$vmevt = new-object PSObject

$vmevt | Add-Member-type NoteProperty-Createduserid name-value $evt.createdTime

$vmevt | Add-Member-type NoteProperty-Name name - value $vm.name

$vmevt | Add-Member-type NoteProperty-IPAddress name-value $vm. Guest.IPAddress

$vmevt | Add-Member-type NoteProperty-createdBy name-value $evt. Username

#uncomment lines of the following to extract the data store (s) each virtual stored on computer

#$datastore = get-datastore - VM $vm

#$datastore = $vm. Hard drives [0]. File name | sed / \ [\(.*\) \]. * / \1 /' #faster that get-datastore

#$vmevt | Add-Member-type NoteProperty-name-value $datastore data store

$vmevts += $vmevt

$vmevt # #uncomment this to print the results line by line

}

$vmevts | Sort the Createduserid

}

Get-VMCreationTimes

Tags: VMware

Similar Questions

  • date of creation in v$ datafile

    Hello

    This is my system config.

    >
    Development Server
    OEL 5.0

    Version of DB
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    AMT for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production

    >

    I've added a data file to a TS User and then run following query
    select * from v$datafile;
    There is a column called "Date of creation", it shows me the day for this new data file but shows 30 June 2005 for the other data files that are members of the system, sysaux TS... so my question is why it shows old date for system data files? is it because the Oracle software was packaged by Oracle Corp. in 2005?

    Second question also is since I am new to Oracle and use for most sqldeveloper tool instead of sqlplus, is it true that at some point I'll have to use sqlplus, since the sql developer does not support execution of orders / queries like for example when I execute 'archive list journal' in sql, more it works where the fine as the same does not work in sql developer tool , so I'm just trying to understand this am I have something wrong, or is my correct assumption I should also start learning how to use sqlplus?

    Concerning

    Learner

    If the database was created with a script CREATE DATABASE, CREATION_TIME in V$ DATAFILE_HEADER would correspond to this date.

    If the database has been "created" via DBCA by using pre-configured models in Oracle, seed files don't have "created", they actually get "extract" from an RMAN backup that is in the model and restored and renamed. As a result, the CREATION_TIME in these files are database that Oracle created and put into its models.

    See the update 25 July 10 to my post at http://hemantoracledba.blogspot.com/2010/07/vdatabasecreated-is-this-database.html where I as the CREATION_TIME of my SYSTEM data file, a 10.2.0.4 model database is "12 March 08.

    Hemant K Collette

  • Date of creation and the Date of importation

    When you import photos or video in the Photos to a folder, the application uses the date of importation of integration rather than the original creation date.  The result is that imports are all presented together under "Today."  Many photos and video taken on different dates, so I would only they listed according to date of creation rather than be grouped under the date of importation.  I went 'View' and checked "date of creation".  Photos don't work with "SORT" because it is always grey.  Any help would be greatly appreciated!

    If you look in the window of Photos photos and videos are sorted by date with the oldest items at the top.  This sort order cannot be change.

    In the pictures window, the elements are sorted by the date imported into the library with the oldest at the top.  The sort order cannot be changed here either.

    So, you can use a smart album to include all your photos in the library and then sort them one of these ways:

    The smart album could be created to this criterion:

    that would include all the photos in the library.  Now you can sort them as you like.  Just make sure that the date is early enough to catch all the photos in the library.

    Moments in Photos are new events, i.e. groups of photos sorted by date of catch.

    When the iPhoto library has been migrated first to the pictures there is a folder created in the box titled iPhoto events and all migrated iPhoto events (which are now Moments) are represented by an album in this folder. Use the Command + Option + S key combination to open the sidebar if it is not already open.

    NOTE: it has been reported by several users that if the albums of the event are moved in the iPhoto Library folder in the sidebar, they disappear.  It is not widespread, but several users have reported this problem.  Therefore, if you want to if ensure that you keep these event albums do not transfer out of the iPhoto events folder.

    Is there a way to simulate events in pictures.

    When new photos are imported in the library of Photos, go to the smart album last import , select all the photos and use the file menu option ➙ New Album or use the key combination command + N.  Call it what you want.  It appears just above the folder to iPhoto events where you can drag it into the events in iPhoto folder

    When you click on the folder to iPhoto events, you will get a window simulated of iPhoto events.

    Albums and smart albums can be sorted by title, by Date, with the oldest first and by Date with the most recent first.

    Tell Apple what missing features you want restored or new features added in Photos Photo-Applefeedback.

  • How to copy "Date to update the" to "Date of creation"?

    For some reason, all my photos have had their 'date Created' changed for a date in 2015? I do not have a back-up I can restore (a more 30 000 photos), but both the "date modified" and the date of "Last opened" remain as the original "date of creation".

    Is it possible to copy the 'date Modified' or the 'last opening' to replace the 'created date '?

    ANY suggestions much appreciated.

    Thank you and happy new year,

    Kenneth

    I use a MacBook Air with the latest Photos and operating system installed.

    Where you see the 'creation Date' in the Photos?  The information about the Photos Panel is only indicating the date of capture integrated in the file original image IPTC and EXIF tags.

    File creation date that you see in the Finder, if you access the originals using the Finder, may change, if your library is synchronized with iCloud. All original image in my library on my MacBook Pro to iCloud retina display a date of creation sometime in July, when I downloaded the iCloud library.

  • You can use Windows Explorer (in Windows XP) to view my files according to their DATE OF PUBLICATION (rather than the date of creation or modification).

    I have a lot of cuts in MY Documents. They are variously in format (TXT, WORD, and PDF). Using Windows Explorer, I know exactly how to display these documents based on their date of creation or update. But how to display these documents based on their release date.

    (1) there must be a way to set "date of publication" as a property of TXT, Word, and PDF files.

    (2) there must be a way to display in chronological order the files in Windows Explorer - not according to their creation or modification date, but according to their date of publication.

    Can someone please? Maybe someone write an essay with many historical sources can feel my pain. I was playing with MS Word properties and trying to create custom, attributes but so far I still did not understand how to format a) correctly a new attribute for b) search for this custom in Windows Explorer or the Publication Date attribute.

    In short, I want to see all my files, because they have been published so that I can have a "timeline of events" outcome of saved newspaper clippings.
     
    Rabindra

    Name/rename the files with numbers on the front of the file name; for example, 01-11-2009 - historicaldocument1.doc, 02-13-1957 - historicaldocument2.doc. There is no way for Windows can read the text of a file whether it refers to the great Chicago Fire what on such and such a date.

    If you are doing historical research, you can check on some forums/newsgroup user on your particular area to see if other people use the documents management software. It would be the best way to go. MS - MVP - Elephant Boy computers - don't panic!

  • date of creation of account user in XP and windows 7

    Hello

    I am managing a project on the security of the information, the goal of the project is out of privilege the user admin, so that they cannot create/install new software from unauthorized accounts and change the policy of the company on manchine there without assistance.

    I want to know if the user has admin privilege account and created the account, say abc or test with administrator privileges, can enter us date of creation of such accounts, if so how? and there at - there no report available on XP/Windows 7 that can help?

    I hope that the people of knowgeable in the forum can guide me on this

    Concerning

    Maneesh Kumar

    You can get some of this information when you type this command at the command prompt:

    NET user 'Kumar '.
  • Time zone and date of creation of PDF

    Hello

    I have two questions which I would like to please your help:

    -Can the date of the creation of a pdf file be changed? What is strong evidence that the document was born in effect on that date? I should specify that the document was created with the pages mac application, and the date of creation has been consulted by checking the properties of the document on the adobe reader software.

    -I am located in France/Paris GMT + 1, will be the creation date poster/converted in my local time zone (GMT + 1) or is it possible that the document seems to have been created later it should be because the creator or sender (later than the sender said) was in a different time zone?

    Thank you for your help

    The date of the creation of a PDF document can be easily changed by using Adobe Acrobat or many other third-party PDF viewers. There is no hard proof when in fact the file was created.

  • Not possible to export a list of virtual machines that are created in the past 7, 30, 120 and 180 days since an imported csv file containing the date of creation of virtual machine

    Not possible to export a list of virtual machines that are created in the past 7, 30, 120 and 180 days since an imported csv file containing the date of creation of virtual machine. My questions is the correct statement to the variable: $VmCreated7DaysAgo: $_CreatedOn "-lt" $CDate7.

    # #SCRIPT_START

    $file = "C:\Users\Admin\Documents\WindowsPowerShell\08-18-2014\VM-Repo.csv".

    $Import = import-csv $file

    $VMCreatedLast7RDayRepoFile = "C:\Users\Admin\Documents\WindowsPowerShell\08-18-2014\Last7Days.csv".

    $start7 = (get-Date). AddMonths(-1)

    $CDate7 = $start7. ToString('MM/dd/yyyy')

    $VmCreated7DaysAgo = $Import | Select-object - property name, Powerstate, vCenter, VMHost, Cluster, file, Application, CreatedBy, CreatedOn, NumCpu, MemoryGB | Where-Object {$_.} CreatedOn - lt $CDate7} | Sort-Object CreatedOn

    $TotalVmCreated7DaysAgo = $VmCreated7DaysAgo.count

    $VmCreated7DaysAgo | Export-Csv-path $VMCreatedLast7RDayRepoFile - NoTypeInformation - UseCulture

    Write-Host "$TotalVmCreated7DaysAgo VMs created in 7 days" - BackgroundColor Magenta

    Invoke-Item $VMCreatedLast7RDayRepoFile

    # #SCRIPT_END

    You can use the New-Timespan cmdlet in the Where clause, it returns the time difference between 2 DateTime objects.

    An example of this cmdley

    New-TimeSpan-start (Get-Date). AddDays(-7)-end (Get-Date). Select days - ExpandProperty

    In your case, you could do

    Where {(New Timespan-démarrer ([DateTime] $_.))} CreatedOn) - end $start7). {7 days - gt}

    But beware of negative numbers.

  • [nQSError: 43119]:-the data type: 25 is not supported columns error for data type "uniqueidentifier".

    Hi all


    I am facing a problem while creating a BI reports to the SQL Server 2008 Database.

    Access to columns of data type "uniqueidentifier" I get error [nQSError: 43119]:-the data type: 25 is not supported.

    • OBIEE 11.1.1.6.11 on Linux x86_64 servers is hosted by the Services of Oracle Cloud.
    • Using last "ODBC driver for SQL server 11" for connection (also tried driver "DataDirect SQL Server 6.0 native Wire Protocol").
    • No "Uniqueidentifier" data type columns display correctly in reports.
    • I tried to change the columns of data type "Uniqueidentifier" to char (36), VARCHAR (36), VARCHAR (40), types of binary data (16) in the physical layer on various suggestions but error still there.

    Same columns questioned the SQL Developer (using third-party jTDS JDBC driver "jtds - 1.2.7 - dist") I am able to see these "uniqueidentifier" data columns. record sample:-"CB350576-FCD8-DE11-B111-002219598619".


    Please advice if this is a bug or I'm missing some property of SQL server database settings.


    Thanks in advance.

    Yes Srini,

    This type of column becomes UNKNOWN when they are imported into SPR but its strange after changing to VARCHAR (36), we can use it for joining tables without any problem.

    Only issue I'm facing now is the limitation to use in queries like calculate the total number of incidents (in my case incidentid is the primary key).

    But I've found a workaround. I am formulating a measure in MDB layer to get the number of total incidents as {CASE WHEN is NULL then 0 otherwise 1 END}.  the aggregation is defined on the sum and I get incident count works correctly.

    Thanks for your help.

  • data recovery 1.2 only supports 2 destinations at once

    I started with vdr1.1 and had 3 installation of destinations (due to the limit of 256 GB), 2 were databases shared (from physical disk 1 500gig) and 1 was a network share.

    I installed the unit version 1.2 to version 1.1 of 'upgrade '.

    the mount on the part of network went well and automatically mounted 1 the datstores, but I can climb is no longer the third destination, a warning window

    presents itself. indicating the unit of data recovery is no longer supports more than 2 destinations both...

    Right now I can't do anything while I wait for the integrity check. (looks like it will take hours)

    so

    My questions are:

    can I move those jobs to other databases without creating new jobs?

    Can I set up another new device to use this database?

    Could I "extend" a data to another store

    Any other recommendations would be useful

    VMware has always said not more than 2 destinations, but they did not restrict it.

    now they do looks like.

    However, there is some good news here.  VMWARE now allows up to 10 devices VDR vCenter Server and you can switch between them from the vdr plugin.  so you can set up 2 separate devices vdr with 2 destinations, which allows you to spread your load of deduplication on several hosts.

    now I have 2 setting up devices vdr with 2 vmfs3 vmdk depupe stores and will perform tonight my initial backups.  wish me good luck.

    p.s. I didn't have much luck upgrading my 1.1 restore points, I thought that it's probably just better start fresh... you can keep the vmdk files if you have the room incase you have to perform a restore, just not config in the new vdr, or mount them.

    just a suggestion.

  • Can video clips first CC sort by "date of creation" in the media browser?

    First CC, video clips can not sort by "date of creation" in the media browser?

    Ah!  I was talking about the project panel where it doesn't seem to be an option to sort by creation date.  At least, not one I can find, not even editing metadata.

    I have it!

    Project Panel > metadata display > basic > creation Date

    .. .in the project Panel. The list view, click on Date created column head to select sort.

  • Bin - the kind of bug in the date of creation (the basic metadata) in CC?

    I have my date of creation resulting .mov files - but I can't sort through the column header even if I posted it - I can fix all other metadata columns first but topics within the base do not seem to be able to be sorted by, in CS6 it worked, is this a bug CC?

    Thank you

    Oli

    Looks like this is fixed in version 2015 CC :-)

    Even better, now you can sort all the columns of metadata include custom!

  • Date of creation of CONTENT

    I'm organizing my files in Bridge for the first time. I have used PS, AI, ID, etc. for years, but the bridge always seemed strange to me. Bridge is still odd to use, but it allows me to label and keyword files, I need to organize my files. I tried their organization without things like these for years, and he simply does not, especially for files that I create with adobe products.

    I went to the workspace METADATA (assuming that the bridge called the workspaces, the fact of PS) because there the file details table, but then I noticed the Date of creation was wrong, this is actually the Date the. Why my psd files which are digital paintings have a Date taken, I don't know (they don't come from cameras or scanners). Why the bridge called "Date taken" "Date Created" I'm not sure that either. But I need to organize my files, and the bridge is "Date file created" which shows the true "creation Date" I need.

    Anyway, I'm in the METADATA, and I need to see the real creation Date (Date file created) in the file in the CONTENT Panel table. However, I can not understand how do. Is it possible to do?

    (I know that I can open the METADATA Panel to get to the Date of creation, but I would not open rather a whole range for just this 1 field, I have several files to organize and meet is quite slow on my desktop with the METADATA Panel closed)

    I use Brisge CS6 via creative cloud on Windows 7. Both are up to date. Desktop is the custom about build 6 months to 2 years old depends on how much we are talking about. I can get to more detailed tech specs if they are needed.

    You know that logic PS uses to define this data element?

    Unfortunately quite logical and Adobe are not often a matching pair. Due to different teams (often also in another location and country) working on various applications and the Adobe company wide, it seems very difficult to get everyone on the same line for more details. It comes from a known point of frustration for many users, even in the Creative Suite itself.

    But for a digital image captured by a camera PS and bridge to read IPTC data in the Exif data that is created in the device itself and is written to the file Info. Ideally, this amounts to each provider in accordance with the standard of the IPTC world but you know how it is with an ideal situation...

    I don't know exactly where the bridge to get data for the fields of his shows in the metadata Panel (there are lots of tabs in the Info file, especially for a digital image, just check for yourself), but a file created in gets PS its creation date and time of when you save it and it is the change of date and time when you save the changes you have applied to this file. Of course only shows the last change.

    As Curt said, in the miniature Bridge preferences section you can choose to display the Date created and date taken under the thumbs. The sort order respecting information also.

  • 5 d Classic - problems with the Date of creation on the files

    I use Bridge CS5 v 4.1.0.54 and am having a problem with my 5 d classic, where some of my photos are dated correctly, and then some are dated as 11 hours later. They were all kick the same camera and same lens (no), a few seconds apart. Date information only appear to be incorrect in Bridge and are therefore sorted incorrectly, making it difficult for the workflow. However, I still have the pictures on my camera, so I took the CF card and examine its contents in Windows. In this case, all dates seem to match and be consistent. I posted in other forums, and most have suggested that there is probably a problem with Bridge, ACR, or Photoshop.

    I have provided links below for an example of images with different info Date created by bridge and then the correct information of the Date of creation in Windows when you view them on the map see

    I saw cela in at least two different scenarios recently. Haven't looked through all of my recent photos still to say whether or not it's got more than that.

    Any help would be appreciated.

    Thank you

    Jamie

    -Adobe http://www.jamiegphotography.com/portals/0/images/datecompare.jpg

    -Windows http://www.jamiegphotography.com/portals/0/images/PhotosWindows.jpg

    Have seen the problem before.  Two things to try.

    1. empty the cache in the folder with the bad weather (Tools/cache/purge cache folder xxxx).

    2. read this link http://forums.adobe.com/thread/854763.  The guy is from Austrialia and concluded that, after a certain time bridge labled it the next day.  Where are you from?

  • Canvas support in Indesign scripts?

    Hello

    short version:

    I was wondering if it is possible in any way to include automatically generated content (Using canvas api for example) raster design using JavaScript?

    Long version:

    I noticed that the In-design supports a very old version of JavaScript, and since I'm pretty new to InDesign scripting, I thought, it's best to inquire about its capabilities / limitations before planing on what to do with it! I wrote a Javascript (not in in-design script) code which generates unique random patterns of patterns, now, I'm interested if I can integrate it into scripts in design so she would put one of these raster images in each page of a design document (IE: left and right of each face relatively pages);

    also since my first guess after reviewing documentation of object a little design model has been that it is very limited to what is possible via the user interface software (and not everything/something new/more), so I was wondering (in this case), how is it possible to connect a script for an external script and send and receive the data/vars between them; like putting the two scripts in the same folder, one calls the other is giving some info (size of the document, etc.), the second script runs (outside of ID), put the images on the disk and return to the main script when's done it! :/

    I have a few other sketches of solution as well in my mind, but wanted to get your opinion before doing anything ridiculous! :-)))

    I really appreciate your in - put on this point.

    THX, mim,

    And Yes! It seems that I can run an external file of any type!

    After reading and looking for some time, finally:

    In the page 52nd documentation, it says:

    Execute()
    fileObj.execute)
    Open this file using the appropriate application, as if she had been double-clicked in a file Explorer. You can use this method to run scripts, launch applications and so on

    Voila! Exactly what I need (if what I think I need is actually what I need! indeed!)

    I'll try to see if it works later (actually impatient!) and thx again!

    mim

Maybe you are looking for