Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 03-20-2017, 02:48 PM   #1
Daemon Poster
CrackerJacker's Avatar
Join Date: Jun 2006
Location: USA
Posts: 987
Send a message via Skype™ to CrackerJacker
Default PowerShell Noob. Remote Requesting Basic Info (Bios info, mac, ETC)

So, I've just just been messing around with this stuff.
I'm on a domain with 100's of laptops connected to the network.

I can run Get-WmiObject win32_bios | Out-File C:\Users\1379E\Downloads\txt.txt
It will pop up the some basic Bios info on txt file.

Now If I want to grab bios info remotely from another machine. I figured out how to Run "Enter-PSSession -ComputerName PRPRL-A98697:

Now I'm connected to the computer and the text reads out
[prprl-a98697]: PS C:\windows\system32> Get-WmiObject win32_bios

SMBIOSBIOSVersion : V4.01L12 M31
Manufacturer : American Megatrends Inc.
Name : BIOS Date: 01/01/13 00:00:00 Ver: 04.06.05
SerialNumber : 4CTYA98697
Version : MATBIO - 1072009

Sweet... I can get bios from another computer in another building.

The question is now how do I make a txt file on my local computer that shows that info. The command " | Out-File C:\Users\1379E\Downloads\biosinfo.txt" Will only output it to that machine I'm connected too.

[prprl-a98697]: PS C:\windows\system32> Get-WmiObject win32_bios | Out-File C:\Users\1379E\Downloads\txt2.txt
Could not find a part of the path 'C:\Users\1379E\Downloads\txt2.txt'.
+ CategoryInfo :
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutF ileCommand

USAF KC-135R Crew Chief
i7 2770 @ 3.4ghz, Geforce GTX 560 ti, 8GB DDR3 1600, SSD 120gb, cup holder
I would imagine if you could understand Morse Code, a tap dancer would drive you crazy
CrackerJacker is offline   Reply With Quote
Old 03-21-2017, 09:12 AM   #2
Site Team
root's Avatar
Join Date: Mar 2004
Posts: 8,107
Default Re: PowerShell Noob. Remote Requesting Basic Info (Bios info, mac, ETC)

what's really weird is... you're on your computer connected to their computer, but you can't save on your computer because their computer isn't connected to your computer...

that command is trying to save 'C:\Users\1379E\Downloads\txt2.txt'. on their computer (and I guess that user doesn't exist - hence the path doesn't exist either)

if I was you i'd create a network share to log all that stuff to. and then just run it as a logon script so you get all hundred whenever the user next logs on.
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 12:20 AM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0