Get Remote Machine Name and SerialNumber

Hi -
Looking to get remote machines name and serial number using computer names in a text file. THis is what I have but it's not working. ANy suggestions? TIA
$computers = Get-Content c:\GETSN\computerlist.txt
$computers | foreach { Get-WmiObject -ComputerName computers -Class Win32_BIOS | Select -Property PSComputerName,SerialNumber}

Are you sure that all of the machines are online and you can run remote WMI queries against them?
This should try to take some of that error handling into account:
Get-Content .\computerList.txt | ForEach {
$props = @{
ComputerName = $_
SerialNumber = ''
Status = 'OFFLINE'
If (Test-Connection -ComputerName $_ -Count 1 -Quiet) {
$props.Status = 'Online'
try {
$bios = Get-WmiObject Win32_BIOS -ComputerName $_ -ErrorAction Stop
$props.SerialNumber = $bios.SerialNumber
} catch {
$props.SerialNumber = 'ERROR retrieving value'
New-Object PsObject -Property $props
} | Select ComputerName,SerialNumber,Status | Sort ComputerName
Don't retire TechNet! -
(Don't give up yet - 12,950+ strong and growing)

Similar Messages

  • How to get client machine name and IP address

    Hi,
    In my office I have one SERVER which has FORMS & Report Server installed and all the clients are accessing that application thru the following URL :
    http://OraServer:8889/forms/frmservlet
    to get the machine name I have read into a global variable like this
    SELECT USERENV('TERMINAL' ) into :global.clientname FROM DUAL;
    but obviously all the time its returning the SERVER machine name...not the name where client is accessing the program....so how can I get the client machine name..
    thanks

    Hi Frank,
    Well I am using Developer Suite 10g Release (10.1.2.0.2) ..I've gone thru the link what you have sent me and noticed that whatever updations of conf file or classpath its already there so i guess needn't to modify cause I think my release 10.1.2.0.2 has did already as webutils been bundled with it.
    Well What i did is to double click on ATTACH LIBRARY and browse the location to find webutil.pll and finally attached it...even though its showing me all the procedures like clientinfo and others...
    on my block's canvas I've put a button and used this trigger to get client info function like this.
    when-button-pressed trigger of INFOBUTTON
    DECLARE
    o_clientinfo varchar2(50) := Webutil_clientinfo.GET_HOST_NAME ;
    begin
    message(o_clientinfo);
    end;
    but when I am trying to open this form its simply not showing up..strange thing is that there is no error as well...so plz kindly guide me how to get clientinfo hostname or ipaddress using that library function.
    thanks

  • Get Machine Name and IP Address from Air Flex App

    New to Air..... Is there a way to get the name of the machine
    and the ip address for the client running the Air application? Not
    that this matters, but the applcation would be a Flex 3 application
    built specifically to be deployed to the Air runtime. I need to be
    able to have the Air/Flex application know what the client's
    machine name and ip address is. Can this be done?
    Thanks

    Hi Frank,
    Well I am using Developer Suite 10g Release (10.1.2.0.2) ..I've gone thru the link what you have sent me and noticed that whatever updations of conf file or classpath its already there so i guess needn't to modify cause I think my release 10.1.2.0.2 has did already as webutils been bundled with it.
    Well What i did is to double click on ATTACH LIBRARY and browse the location to find webutil.pll and finally attached it...even though its showing me all the procedures like clientinfo and others...
    on my block's canvas I've put a button and used this trigger to get client info function like this.
    when-button-pressed trigger of INFOBUTTON
    DECLARE
    o_clientinfo varchar2(50) := Webutil_clientinfo.GET_HOST_NAME ;
    begin
    message(o_clientinfo);
    end;
    but when I am trying to open this form its simply not showing up..strange thing is that there is no error as well...so plz kindly guide me how to get clientinfo hostname or ipaddress using that library function.
    thanks

  • Replace a 2003 (not R2) File Server with a 2012R2 files server and preferably keep the same machine name and IP when finished

    I am wanting to replace a 2003 (not R2) File Server with a 2012R2 file server and preferably keep the same machine name and IP when finished.  For the moment I just need some "high level" guidance, little details can be worked out once I know
    which direction I will go.  I was considering that DFS might be a way to help get through the process although when finished the 2012R2 Files server will be by itself with no other file server planned at this time.  DFS can stay installed for maybe
    future purposes but clearly I wouldn't need the DFS Replication with only one machine.
    Here's a few details of the environment....
    1.  DC's are 2012R2 but it is still 2003 DFL because the old 2003 DCs are still present.  But likely they will be gone and the DFL elevated before I start on the File Server project
    2. Nearly all machines in the facility have a shortcut on the "All Users" Desktop that points to the existing old File Server.  Editing or replacing that shortcut would be a major pain,...hence why I want to keep the same machine name at least,
    and maybe the same IP if not too much trouble.  This way the existing shortcut would continue to work with the new 2012R2 File Server.  The UNC path represented in that shortcut is also configured into one or more of our major business applications,
    futher emphasizing the need to keep the UNC path the same throughout the process.
    3. The facility runs 24/7/365 but is "light" on weekends.  The political environment is such that there is little to no tolerance for any down time at all.
    4. Would DFS (based from the 2012R2 machine) be a good tool to get where I need to go?
    Thanks for any suggestions.
    Phillip Windell

    Hi Sharon,
    I've done some more reading and have a few new ideas to run past you....
    Yes regular DFS wouldn't help and the Namespace would still be different than how it was with just the old server. However I was thinking DFS Replication could replace the purpose of RoboCopy and it would keep the two locations "in sync" until I was ready
    to flip over to the new server.  DFS Rep can exist independently of a DFS Namespace, so a Namespace is not even needed. It needs a minimum of 2003R2 for the "later & better" DFS Rep but I believe 2003 can do an "in place" upgrade to 2003R2, so I would upgrade
    the old server to 2003R2 first.  As long as the DFS Rep on 2012R2 and 2003R2 will properly interact I think that will work.
    Thanks for the reg info on the Shares.  I'm debating if editing that would reg file would really be much better than manually creating the Shares on the new server while the DFS Replication was doing its job.  I'll probably export that Key as a
    safety move whether I use it or not.
    Once the DFS Rep is fully in sync and the Shares are in place on the new server, I figure I would then:
    1. Remove the DFS Replication Object (optionally remove DFS Services completely)
    2. Rename the old File Server to something else and set it to DHCP
    3. Rename the new File Server to the name I want to use and give it the IP the old server had.
    How does that sound?
    Phillip Windell

  • How to get all property names and values of an bean instance at runtime?

    How can I get all property names and values of an bean instance at runtime?
    (The class of the bean instance is dynamic and I can not know before I write the code .)

    Look at Class. It has a way to get at all public methods and attributes.
    If you need to get to private attributes you can do what the Introspector does and expect the methods to follow the Bean pattern and pull the attributes out based upon that. Privates are all hidden from direct access but through the Bean Pattern they can be figured out.

  • Problem with getting the file name and type from OAMessageFileUploadBean

    Hi Tapash,
    I am trying the code below to get the file name and mime type from OAMessageFileUploadBean,
    DataObject fileUploadData = (DataObject)pageContext.getNamedDataObject("Documents");
    String uFileName = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_NAME");
    String contentType = fileUploadData.selectValue(null, "UPLOAD_FILE_MIME_TYPE");
    But this piece of code gives errors saying that selectValue selectValue(null, java.lang.String) not found in class oracle.svc.DataObject
    Any ideas? why this code is giving error?
    Can i handle the event of browse button for OAMessageFileUploadBean?
    Regards,
    Nagesh Manda.

    Try using class oracle.cabo.ui.data.DataObject
    --Shiv                                                                                                                                                                                                       

  • How to get the class name and field name dynamically

    Hi
    I have a class (ex: Contract) the fields (ex : a,b,c) .i need to get the class name and field name dynamically
    ex
    if( validation file for the field Contract.a){
    return contract.a;
    }else if(validation file for the field Contract.b){
    return contract.b;
    how to pass the field name and object dynamically
    Please help me .............
    Thanks in Advance..
    Edited by: 849614 on Aug 11, 2011 6:49 AM

    YoungWinston wrote:
    maheshguruswamy wrote:
    Agreed, but IMO, i still feel its best if there is no tie in between consumer class level details and the database it talks to. A service layer is needed in between them.Sounds like you've done a bit of this before. Me, I've either been a modeller/DBA, doling out data, or a nuts and bolts programmer (and actually more toolmaker than apps, but did a bit of that too).
    Do you know of a good book about the "middle ground" (ie, these service layers)? I understand it empirically, but haven't had a lot of exposure to it.
    Winston
    Edited by: YoungWinston on Aug 11, 2011 10:34 PM
    PS: Apologies. Edited my previous post, presumably while you were composing your reply, when I finally realized what '.filed' meant.Most of my work is in web development, never been a DBA :) . The biggest 'concern' in my shop is 'separation of concerns'. The UI group reports up to a different IT head, the DB group reports up to a different IT head and so on. The looser the coupling between these systems, the lesser the project costs (Integration, QA etc) are. Martin Fowler's books contain good information about separation of concerns in an enterprise environment. The two books which i recommend are
    [url http://www.amazon.com/Patterns-Enterprise-Application-Architecture-Martin/dp/0321127420]Enterprise Application Architecture and
    [url http://www.amazon.com/Enterprise-Integration-Patterns-Designing-Deploying/dp/0321200683/ref=pd_sim_b_1]Enterprise Integration Patterns

  • To get the machine name

    Hi,
    What is the parameter i should pass in System.getProperty() method in order to get the machine name I am working? For example, I can use System.getProperty("user.name") to get the name of the user who has currently logged into the system. This will be particularly useful when we have to tranfer some files between systems in network so that dynamic loading of system names can be done.
    Thanks
    Srini

    I used System.getproperties to get an enumeration of properties but none of them gave the correct value. All I was getting was that of os,username etc...

  • Get Windows domain name and user through jsp

    I have a jsp page that will be viewed through ie on windows platform, that is a member of domain.
    I need to get the domain name and logged in windows user name to use it in my page.
    I've looked through similar topics. Found no answer.
    1.
    System.parameter("user.name") is not ok. it returns user that runs jvm.
    2.
    import com.sun.security.auth.module.NTSystem;
    NTSystem system = new NTSystem();
    system.getDomain()
    system.getName()that didn't work through jsp, though the answer is correct.
    3. I found some api at http://www.sinotar.com/download/swin/doc/index.html
    it did the right thing, but it's not free.
    Could anyone advice me smth?
    I've looked

    well, it won't work in your jsp because jsps run server-side
    could try putting an applet on your page that does it, but I wouldn't be surprised if the security manager put the kibosh on that, too
    a third - but clunky - way would be to write a quick java app that does it, and launch it through WebStart. bit ugly, and needs extra user input they might not want to do

  • Getting  approver first name and last name

    Hi,
    Im using Multi Approval sub process for sending Approval request to multiple approvers, im unable to get the first name and last name of the approver who had responded to it.

    Hello,
    The <ref>Actual_Approver</ref> should bring you back the accountId for the actual approver for that item. Depending on how your setup is you should be able to take that information and call out to your resource and bring back that user's specific attributes. Granted your internal accountId, and your resource account Id are probably not the same so you might have to do some massaging, but you can get what you need....There should be a way to do it internally also..references the fullname attibute..but off the top of my head I can't think of a way to do that.
    Hope this helps.

  • Get the font names and image names in QXD

    Hi,
    How to get the font names and image name in Quarkxpress document file using java?.
    Is any third party packages for getting font n image names in QXD?
    thanks,
    nithya

    rtuck,
    I believe this may solve it:
    Open System Preferences and go to Accessibility. Next, select Display from the source list along the left, then check the box labelled Reduce transparency.
    It was first presented in this post #15 by TheUlser:
    https://forums.adobe.com/message/6854594#6854594

  • SQL Query to get Project Plan Name and Resource Name from Reporting database of Project Server 2007

    Can you please help me to write an SQL Query to get Project Plan Name and Resource Name from Reporting database of Project Server 2007. Thanks!!

    Refer
    http://gallery.technet.microsoft.com/projectserver/Server-20072010-SQL-Get-a99d4bc6
    SELECT
    dbo.MSP_EpmAssignment_UserView.ProjectUID,
    dbo.MSP_EpmAssignment_UserView.TaskUID,
    dbo.MSP_EpmProject_UserView.ProjectName,
    dbo.MSP_EpmTask_UserView.TaskName,
    dbo.MSP_EpmAssignment_UserView.ResourceUID,
    dbo.MSP_EpmResource_UserView.ResourceName,
    dbo.MSP_EpmResource_UserView.ResourceInitials
    INTO #TempTable
    FROM dbo.MSP_EpmAssignment_UserView INNER JOIN
    dbo.MSP_EpmProject_UserView ON dbo.MSP_EpmAssignment_UserView.ProjectUID = dbo.MSP_EpmProject_UserView.ProjectUID INNER JOIN
    dbo.MSP_EpmTask_UserView ON dbo.MSP_EpmAssignment_UserView.TaskUID = dbo.MSP_EpmTask_UserView.TaskUID INNER JOIN
    dbo.MSP_EpmResource_UserView ON dbo.MSP_EpmAssignment_UserView.ResourceUID = dbo.MSP_EpmResource_UserView.ResourceUID
    SELECT
    ProjectUID,
    TaskUID,
    ProjectName,
    TaskName,
    STUFF((
    SELECT ', ' + ResourceInitials
    FROM #TempTable
    WHERE (TaskUID = Results.TaskUID)
    FOR XML PATH (''))
    ,1,2,'') AS ResourceInitialsCombined,
    STUFF((
    SELECT ', ' + ResourceName
    FROM #TempTable
    WHERE (TaskUID = Results.TaskUID)
    FOR XML PATH (''))
    ,1,2,'') AS ResourceNameCombined
    FROM #TempTable Results
    GROUP BY TaskUID,ProjectUID,ProjectName,TaskName
    DROP TABLE #TempTable
    -Prashanth

  • New PowerBook with strange Machine Name and Model??

    I just purchased the new Higher Res screen G4 15" and noticed that the Machine Name and Machine Model are different than the earlier models. Here's what I have on my new PowerBook...
    Machine Name: Mac
    Machine Model: PowerBook5,8
    Why the "5,8" after PowerBook??
    (The previous PowerBook G4 models had the following names... Machine Name: PowerBook G4, Machine Model: Powerbook)
    Thanks,
    Clair

    Here you go:
    Hardware Overview:
    Machine Name:     PowerBook G4 15"
    Machine Model:     PowerBook5,6
    CPU Type:     PowerPC G4 (1.2)
    Number Of CPUs:     1
    CPU Speed:     1.67 GHz
    L2 Cache (per CPU):     512 KB
    Memory:     1 GB
    Bus Speed:     167 MHz
    Boot ROM Version:     4.9.1f1
    ATA Bus:
    FUJITSU MHT2080AH:
    Capacity:     74.53 GB
    Model:     FUJITSU MHT2080AH
    Revision:     81EC
    Serial Number:     xxxxxxx
    Removable Media:     No
    Detachable Drive:     No
    BSD Name:     disk0
    Protocol:     ATA
    Unit Number:     0
    Socket Type:     Internal
    OS9 Drivers:     No
    S.M.A.R.T. status:     Verified
    ATI Mobility Radeon 9700:
    Chipset Model:     ATY,RV360M11
    Type:     Display
    Bus:     AGP
    VRAM (Total):     64 MB
    Vendor:     ATI (0x1002)
    Device ID:     0x4e50
    Revision ID:     0x0000
    ROM Revision:     113-xxxxx-145
    Displays:
    Color LCD:
    Display Type:     LCD
    Resolution:     1280 x 854
    Depth:     32-bit Color
    Built-In:     Yes
    Core Image:     Supported
    Main Display:     Yes
    Mirror:     Off
    Online:     Yes
    Quartz 2D Extreme:     Supported
    Quartz Extreme:     Supported

  • How do I get the user name and password for the Apple Extreme Router to connect to a Slingbox

    How do I get the user name and password for the Apple Extreme Router to set up my Slingbox?  It will not accept the Apple Extreme Name and password.

    The AirPort Extreme does not have a User Name, but it does have a device name and device password, which you may have already tried.
    There is also a Wireless Network Name and Wireless Network Password for the AirPort Extreme, which might be what the Slingbox is looking for if you are trying to connect it to your wireless network.
    There are no other "user names" or "passwords" on the AirPort Extreme.
    You established the device name, device password, wireless network name and wireless network password when you originally configured the AirPort Extreme.
    If you cannot remember these, you will need to perform a Soft Rest to reset everything. Follow the instructions in this Apple support document:
    Resetting an AirPort Base Station or Time Capsule FAQ

  • Apple remote desktop name and organization

    Hi
    I just downloaded apple remote desktop from my developer account but when i run it and put the serial number
    it also asks for name and organization which doesnt exists in the file that have the serial number so from where
    i can get those ?

    The latest version of ARD is available from the App Store, and does not require a serial number. You can also buy the serial numbered version, with a serial number, at the online store (http://store.apple.com/us/search?find=apple+remote+desktop).

Maybe you are looking for