powershell script ?

i want to know what will be ps script to just show the following result ?

Example:

Host Id:    023548FCCFD1

Host Name: TestServer

Thanx


  • Edited by babarmunir Friday, February 13, 2015 7:52 AM
February 13th, 2015 10:50am

thanx a lot this is the result:

PSComputerName : FFF-VRT-SRV1
SerialNumber   : 00253-50220-00FF0-AA442

i want MAC address not serialnumber which should be without "-"

i want to display "Host id" rather than PSComputerName and "Host Name" on SerialNumber..

actually i have to sent information to client who needs details according to his requirement..


  • Edited by babarmunir Friday, February 13, 2015 9:06 AM
Free Windows Admin Tool Kit Click here and download it now
February 13th, 2015 12:01pm

thanx but does not show the result which i am looking for.. only show MAC address.

I'm not trying to do your work for you, I'm simply trying to show you an example you can use to complete part of your task.

You should have enough examples in this thread to complete what you originally asked.

February 16th, 2015 9:11am

i completely agree with you what you have said... the only difference is as i am not expert in ps neither i am  charging for it.. we are paying for the s/w.. tnx

If you are paying for the software, then you should expect it to work. As well, it should come with documentation that tells you how to run it and what the output means or is to be used for.

If the software is not actually the script you are asking about, I don't understand the purpose of the script. Does your client (actually if you bought their product then you are their client) want you to create and run a script to get this information from your system? If that info is needed by the software that they sell, then they should provide the tool to get the information.

Free Windows Admin Tool Kit Click here and download it now
February 16th, 2015 2:51pm

Here is the script and its output:

PS C:\Users\Al> type '.\show result.ps1'
@"
Example:
Host Id:    023548FCCFD1
Host Name: TestServer
Thanx
"@
PS C:\Users\Al> & '.\show result.ps1'
Example:
Host Id:    023548FCCFD1
Host Name: TestServer
Thanx
PS C:\Users\Al>

This does exactly what you asked. Now, did you want to ask a slightly different question? Like, perhaps, what kind of cmdlet will show me information like host id, host name, and/or mac address?

Also, is your client a paying client? If you are going to get paid for what you get here you should probably expect to contribute more than just the quest

February 16th, 2015 2:54pm

That script is pointless. It just prints what is stored in the string:

PS C:\Users\Al> type '.\show result.ps1'
@"
Example:
Host Id:    023548FCCFD1
Host Name: TestServer
Thanx
"@

Look closely as hw is showing the contents of the script.

I think someone is playing games here.

Free Windows Admin Tool Kit Click here and download it now
February 16th, 2015 3:17pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics