Intune Questions - Outfile to Remote Server

Isaias Perez
Isaias Perez used Ask the Experts™
on
Question regarding gathering hardware ID. I was told that during the setup process of a new machine you can click on Shift F10 on the Regions page to get to the cmd prompt. Once there I typed the command powershell to run that and then set the proper execution policy. Once I get to the point that I install the WindowsAutoPilotInfo Script and run the Get-WindowsAutoPilotInfo.PS1 -OutputFile AutoPilotHWID.CSV I am wondering how do i extract that CSV File from the machine if its still in the middle of setup and i do not at that point have access to windows explorer. I tried to do the following but got credentials errors.
Get-WindowsAutoPilotInfo.PS1 -OutputFile \\ComputerName\HWID\AutoPilotHWID.CSV 

Open in new window

How can i use the -outputfile switch to put the file on a remote machine? On the remote machine I created a folder in the root of C and shared it. Also gave everyone full access to that folder.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Rajkumar DuraisamyIT Service Manager
Top Expert 2012

Commented:
Copy the ps1 file to a remote computer. Open PowerShell as administrator, navigate to the power where you copied the ps1 file and run the below command

.\Get-WindowsAutoPilotInfo.ps1 -ComputerName MYCOMPUTER1,MYCOMPUTER2 -OutputFile .\MyComputers.csv 

Open in new window


Change MYCOMPUTER1,MYCOMPUTER2 name as per your requirement..
Rajkumar DuraisamyIT Service Manager
Top Expert 2012

Commented:
Please inform whether you are able to get the results and also whether any other assistance required on this..
Isaias PerezIT Operations Manager

Author

Commented:
I dont actually  have the PS1 file. I use the Install-Script cmdlet in Powershell to install it so not sure how to follow  your instructions above.

Install-Script -Name Get-WindowsAutoPilotInfo
Get-WindowsAutoPilotInfo -Outputfile C:\HWID.csv
IT Service Manager
Top Expert 2012
Commented:
Please refer this and the examples listed

Copy the code to notepad and save it as .ps1 file "Get-WindowsAutoPilotInfo.ps1" and follow the steps that I shared

https://www.powershellgallery.com/packages/Get-WindowsAutoPilotInfo/1.6/Content/Get-WindowsAutoPilotInfo.ps1

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial