Printing output from select-object with write-host

$lastdir = Get-ChildItem 'C:\Users\' | select Name | sort | select -last 1 name
write-host $lastdir
results printed as @{Name=guptal}
how do I get it just to print the "guptal" part only? How do I access this object values?

Hi,
Add -ExpandProperty to your Select-Object.
EDIT: Or use $lastdir.Name
Don't retire TechNet! -
(Don't give up yet - 13,225+ strong and growing)

Similar Messages

  • Reading the output from a object running in the local machine.

    Reading the output from a object running in the local machine.
    By using a signed applet i am lunching a small application that returns an image object, how to read that without storing it in the hard disk.
    Which means i need to read the image object return by the local application using applet or jsp .
    i am using tomacat and an html page with an applet with it to lunch the application.

    You can write that image in a binary format using OutputStream for System.out and then read it in your applet.

  • Split Output from Select into 2 different Cols

    Hi,
    I am new to oracle dev. Env Oracle 10g R2
    I need a help with the following.
    I have a select query that returns comma separated values.
    Column LIST1 in table svp_1.
    This needs to hold that data returned by the select query.
    Datatype of Column LIST1 varchar2(4000)
    I get the follwing error.
    ORA-19011: Character string buffer too small
    CREATE OR REPLACE PROCEDURE
    sale_temp( pType in Char,lDate in date) as
    cnt number;
    v_error_code NUMBER;
    v_error_msg VARCHAR2(2000);
    cursor c1 is select svp
    from sale
    where type = pType
    var1 c1%ROWTYPE;
    BEGIN
    UPDATE svp_1
    SET LIST1 = ( SELECT LTRIM( xmlagg (xmlelement (c, RTRIM(RELATED_SVP) || ',')).extract ('//text()'), ',' ) AS RELATED_SVP from (
    SELECT rtrim(BASE_SVP) BASE_SVP,
    rtrim(RELATED_SVP) RELATED_SVP
    from
    svp_enc se
    where
    se.effective date<= pDate
    and (se.expiration_date is null or se.expiration_date > plDate )
    and se.base_svp in
    ( var1.svp
    and se.RELATION_TYPE = '4'
    )group by base_svp)
    WHERE type = pType
    commit;
    dbms_output.put_line('UPDATE done' );
    end;
    end loop;
    close c1;
    END ;
    My requirement :
    In need to capture the data from the select query and update the column.
    The data needs to be returned as comma separated values.
    This data can also be split into 2 columns.....ie data split and updated into 2 cols ie LIST1 AND LIST2 ( can be added to existing table).
    What is the best way to do this?
    Is the below approach possilble?
    LOOP through cursor ...check the length of data....for the select query ....check length .if > 3990 byte.....then write into 2 plsql variables.....and update 2 cols....
    Is this apporach right, if so how to do that in the procedure ? Please give an example...
    Are there any other approaches...?
    All I need is to Split Output from Select into 2 different columns and avoid the ORA-19011: Character string buffer too small error.
    Thanks in advance.

    Re: ORA-19011: Character string buffer too small

  • How to retrive data from selected checkboxes with fieldnames

    hi experts,
    how to retrive data from selected checkboxes with fieldnames into another alv grid report.(here the fieldnames selected from  table names is dynamically).
    thankx in advance
    rani.k.

    Hi,
    Use user_command in the alv grid and then
    do the follwoing code
    FORM user_command1 USING lv_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    Declaration of local Variables
      DATA : lv_ref1 TYPE REF TO cl_gui_alv_grid.
      DATA lv_cnt TYPE i.                                    "+INS SUHESH 12.07.2008
    Check function code
      CASE lv_ucomm.
        WHEN 'ONLI'.
          CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
            IMPORTING
              e_grid = lv_ref1.
          CALL METHOD lv_ref1->check_changed_data.
    now loop ur final internal table where check = 'X'.
    now pass data to other internal table..Now the internal table will be having values that the user selcetd on the screen.
    Hope this helps.
    Regards,
    Nagaraj

  • Running function with "Write-Host" and redirect output to file does nothing.

    Hello,
    I created this function:
    function TicketSolutionInformation {
    Write-Host "User has been created." -ForegroundColor Green
    TicketSolutionInformation | Out-File -filepath ("123" + ".txt") -append
    but the file 123.txt is always empty. Why ?

    Write-Host will write text to console, not pipepeline so you'll always get nothing.
    Consider changing function to this:
    function TicketSolutionInformation {
    Param(
    [switch]$Passthru
    Write-Host "User has been created." -ForegroundColor Green
    if($Passthru){
    "User has been created."
    }TicketSolutionInformation -Passthru | Out-File -filepath ("123" + ".txt") -append

  • Can't print A3 from autocad 2013 with hp officejet 7610 in win 7 32 bit

    I can't print in A3 paper from Autocad 2013 with hp officejet 7610 in win 7 32 bit OS.Printing result is always A4 ussing this software.Other software have no problem printing in A3.An expert tried for three hours to solve the problem but has no luck.I have no problem print in A3 paper in win 8.1 64 bit system with the same software and printer.I think this is a problem of 32 bit driver of hp officejet 7610.Please help me to solve this serious problem.

    We're experiencing a similar problem with cad 13 and win 8.1 with 7610 e-all in one printer. always plots a4  or letter size in the middle of the  A3 paper.  We need urgent help please!!!ı ve tried to delete and re install the printer driver and no response!! ı hva another computer with win 8.1 and cad 13 installed.But we have no problem in this machine ?? I can not understand where is  the exact problem? Isn't there any professional to help us ?

  • Print output from CS4 Illustrator

    I need to output gradients in Illustrator with a dot pattern of 35 lpi. Illustrator only shows the default lpi as low as 50. Does anyone know how I can manipulate the lpi output in this program?

  • HELP!!  Unable to select objects with the selection tool

    Not sure if I accidently hit a key that I wasn't supposed to, but the selection tool stopped working the way it should. When I put the cursor on top of an object and click the mouse button, nothing happens.  Also ctrl A doesn't work.  Any suggestions?  I've shut down and restarted and that didn't work.

    grooveslapp,
    To keep previously selected objects selected, ShiftClick the following ones.
    If Ctrl+A does not select anything, and if no selection appears in the Info palette (select Objects in the flyout), something else is the matter, and it may be time to Move the folder

  • Deskjet 2800 can't print 11x17 from tray 2 with windows 7

    After my PC had windows 7 installed I can't print 11x17 from tray 2. The hp website driver download page doesn't list a windows 7 driver, it instructs me to use the in os driver but that driver will only print to 8.5x11. Is there a fix for this?
    Thanks, Jimmy

    "iTunes could not connect to the iPod update server because you are not connected to the internet.
    Make sure your internet connection is active and try again."
    perhaps try the technique from the following post:
    Kirk1701: Re: ipod wont update - "you are not connected to the internet"

  • I have a hp4620 AirPrint . I print wirelessly from my Mac with no trouble. How do I print from my I Pad. It doesn't recognize it?

    How do I print wirelessly from my I Pad 2? I have a HP 4620 and I have no problem printing from my Mac. Can anyone help me. Do I need a app to do this?

    http://www.apple.com/support/iphone/assistant/airprint/

  • Output from selected string

    i have two table and i am giving the structures bellow
    tWO TABLE
    TBL1
    ID DATA                    COL1 COL2
    1     TESTING 1 DATA      2     DEPTID YEAR
    MESSGAE :TESTING DEPTID DATA 2008 ( 1 REPLACES COL1 VALUE AND 2 REPLACES COL2 VALUE
    TBL2
    ID     DEPTID     NAME
    1     IT     ALEX
    2     AC     GEORGE
    AFTER CALLING OUTPUT SHOULD BE FOR INPUT ID-1
    TESTING IT DATA 2008 . HOW I WILL GET THIS? THROUGH PROCEDURE OR FUNCTION

    (note: UPPERCASE is considered shouting)
    I get the feeling that you have only provided us with half of your actual requirement.
    Based on the little bit you've given us, this will achieve what you want...
    SQL> with tbl1 as (select 1 as id, 'TESTING 1 DATA 2' as data, 'DEPTID' as col1, 'YEAR' as col2 from dual)
      2      ,tbl2 as (select 1 as id, 'IT' as DEPTID, 'ALEX' as name from dual union all
      3                select 2, 'AC', 'GEORGE' from dual)
      4  --
      5  select replace(replace(data, '1', tbl2.deptid), '2', to_char(sysdate, 'YYYY')) as data
      6  from tbl1 join tbl2 on (tbl1.id = tbl2.id)
      7  /
    DATA
    TESTING IT DATA 2008
    SQL>I assume, however, that you are looking for something a little more dynamic in some way, but you need to tell us how.

  • Turn off 'pretty print' output from XLST processor

    How do I turn-off the "pretty-print" type output that the XSLT processor seems to generate? The XSLT processor seems intent on generating very pretty xml markup, all nicely indented. The problem is that if the markup is XHTML and you are feeding it to browsers they render things quite differently based on the white space between tags...annoying, but true. I have struggled with every swicth I could find on the parsers/processor or embedded in tags in the XSLT files....but nothing seems to work. All I want to do is have the markup I have created in the XSLT template be output 'as is' with the exception of any <xsl:> tag data substitution. How do I do this so things render correctly in my browser i.e maintain the white space and formatting I used in creating the XHTML tags?

    The only way that <xsl:output indent="no"> can behave as you are seeing is:
    (1) You're using a release before 2.0.2.6
    (2) Your program calls the processXSL()
    that returns a DocumentFragment instead
    of the one that writes to a PrintWriter
    (3) You are using our .\sample\XSLSample
    program which calls the processXSL
    to get a DocumentFragment (not the
    one that writes to the PrintWriter)
    Are you saying that our command-line oraxsl
    for version 2.0.2.6 on your stylesheet
    which includes <xsl:output> in the correct location in the stylesheet (outside of
    any template but inside the "top-level"
    <xsl:stylesheet> element) is not
    working properly? If so, will need
    a simple testcase.
    null

  • My Epson printer stopped working with Firefox today. It does test pages, will work on Notebook, and will work with IE. Up until today it worked with Firefox. Why can't I print anything from the internet with Firefox?

    Up until today, I did everything with Firefox. Then I was on Paypal and went to print a shipping label and the printer would not work. I went to troubleshoot page and it printed a test page. I uninstalled my printer and then re-installed it. Still would not work from an internet page. I did a system restore. Still didn't work. Called Epson. They say it's a Firefox problem because it works on Notebook and test pages. I installed IE and the printer works. What happened and how can I get it back working with Firefox?

    I have the same problem, I cannot print PayPal shipping label off of Firefox. I did the about.config entry and have seen that the print.print_printer does not exist at all in the list of entries. I use Vista 32. I use an Epson 545 wirelessly.
    Can anyone help?

  • Can anyone print photos from dvd created with imac?

    hi,
    If I burn 400 JPEG photos in a dvd using iMac, can any one be able to print those JPEG's?
    I am going to photograph a wedding and it is essential that the JPEG show impeccable... how should I proceed?
    thanks for your answer.
    Angie.
    www.photographyangie.com

    If you create slideshows of the photos in iDVD via the "+" button:
    and burn a video DVD disc the only possible copy anyone could get would be a screen shot of the DVD playing on a computer and that would be a small, low resolution (~72 dpi) image that would not be much good for printing anything other and a very small copy.
    Create slideshows of 95 slides or less by importing the photos into an iDVD slideshow.  Before importing crop the photos to the 4:3 size ratio that iDVD uses.  You can create multiple slideshows in one iDVD project:
    If you create slideshows in iDVD from still photos the viewer will be able to advance forward and backward one slide at a time with the Forward and Back buttons on the DVD player's remote tool.
    If you create a movie of the photos and add that the only option is to fast forward or fast backward in the resulting movie. 
    In addition, follow the workflow below to help assure the best qualtiy product:
    Once you have the project as you want it save it as a disk image via the  File ➙ Save as Disk Image  menu option.  This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image and launch DVD Player and play it.  If it plays OK with DVD Player the encoding was good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    OT

  • Dynamically generating and printing output from user input on pdf form

    Hi Everyone,
    I am consider the purchase of of Designer with the hopes of doing something really simple (and hopefully in a simple way)
    I would like to present the user with a form which they will fill out. On clicking a "submit button", I would like to generate a letter and have it print out based on the information provided in this form (note, the user doesn't ever really even need to see the letter).
    Would Designer be able to do something like this? I have been messing around with the trial version, so I am somewhat familiar with the scrip language. For instance, I am at the point where I would be able to get all the information, and generate the letter in HTML stored in a string object. But I wouldn't know what to do with this string to render and print it.
    Thanks!
    - Dave

    I have just downloaded the trial version of Acrobat 7. It appears that if you want to create a new form, it pretty much brings you to Designer... which is really fine by me.
    I appreciate everyone telling me that it is doable, I'm still left with the problem of what I should actually do to do it! =)
    - Dave

Maybe you are looking for