What's going on, guys?
It is Bernardo and today is all about capturing the device hardware I.D.
for Windows Autopilot.
So let's get right into that.
All right.
So capturing the device hardware ID is not a typical thing
that you guys would do at your 9 to 5 job.
The whole Windows autopilot thing works well.
If you are creating
and establishing a relationship with your vendor
that you purchase your hardware from your laptops
or desktops from like Dell, Lenovo or whomever, right?
They are the ones that are going
to capture the hardware ID and then import it into your windows
autopilot section, which I'm going to show you in the later video.
Today is all about capturing the idea.
I just want to show you guys how they do it, the vendor side.
Right.
So right now I have a Windows ten machine,
and the first thing that we need to do is we need to
kind of bypass the execution
policy within the Windows box to run a couple of PowerShell scripts.
So what I did was I clicked on my start button, I typed in PowerShell
and I am going to locate the Windows PowerShell app
and I'm going to run it as an administrator.
Click on that and it's going to load up.
Now, the first command I ran was I'm going to set
the execution policy within the machine because again,
I need to run some PowerShell scripts that I need to download from online.
Now this is the command that are in and I hit enter and I got this, you know,
windows PowerShell updated your execution policy successfully,
but the setting is overridden by a policy
defined at a more specific scope.
Right.
So I ran this again, I gave it a scope to machine
policy and I and I forced the bypass and I hit enter again.
And I still got this.
Now I don't like to see error.
I like everything to be clean.
So what I did, I did a little bit of investigation
and it looks like there is a particular local group policy that you need
to set on this machine to run on Windows ten
to kind of force the bypass.
So I'm going to right
click on the start button and I'm going to click on Run Within Run.
I'm going to type in gpedit.msc hit Okay, It's going to load this up.
Now we need to get into the following computer configuration,
administrative templates, Windows components, Windows PowerShell
and the one that we need to configure would be turn on script execution.
So double click on that.
We are going to enable it on the dropdown menu you have three options
for this video.
I'm going to pick, allow all scripts, we're going to apply it,
we're going to okay it and if you want, you're able to log off and log back on.
Now open up your Windows PowerShell
and within Windows PowerShell, I'm going to set the following.
All right.
I'm actually going to set an item property within the registry name
execution policy and the value is going to be bypassed
is basically the same thing that I did in the beginning,
but I'm actually going to do it on a registry level.
So hit enter boom and now let's do
get execution policy with a parameter of list.
And you're going to see now that the machine policy is bypass
and the local machine is bypass, which is what I wanted
at the very beginning.
So now we're going to create a folder on the C drive
because this is where I'm going to drop that CSV file into.
Yes, we're going to create that type of file and boom, it created the folder.
Awesome.
And now we are going to do a CD backslash to get into the root of the C drive.
Within here I am going to do a CD and the name of the folder
that we just created and hit enter to get into that particular folder.
Now the first command that I'm going to do is run
install script with a parameter of name.
We're going to install, get Windows autopilot info
and we're going to force it and hit enter it’s going to give you this.
We're going to hit Y on the keyboard and hit enter
and it's going to start installing the package Once
it's completed, boom, It takes you back into your PowerShell prompt.
Now, the first command that we're going to do is establish Variable Environment
Path, and I'm going to pointed to the PowerShell script folder, right
Hit enter here next command and we're going to do is get Windows
autopilot info dot ps1 because it is a script
that we're going to call the parameters going to be output file.
Once you do this, we're going to hit enter and it's going to actually grab
the information that you want.
Now, this is a serial number for this virtual machine,
and this information is what you're going
to actually import within your tenant, within your Azure tenant.
Now open up your File Explorer and go inside the C drive and the folder
that we created, If you go inside of it, you're going to see that CSV file
and this is the file.
Like I said before, we're going to take it and we're going to import it
within our Windows autopilot to get it ready to push out profiles.
And that's it, guys.
Hopefully, guys enjoy this video and I catch you guys on the next one.
Peace out.