Hey everyone, Daniel here from TwinBytes with another quick tutorial for you.
This time on the top 10 useful PowerShell commands you can use to fix many different computer problems.
First off, if you're not sure how to access PowerShell. It's very easy.
Just right click on the start button and there's PowerShell.
You may also find that you need to choose the one with admin and brackets which gives you elevated
privileges to run certain commands. Also, everything that you could do in the command prompt previously,
if you know any command prompt type commands, you can run them all in PowerShell exactly the same.
So the first one is real basic. It's help. Not so much a tool to fix things with, but just to
let you know how you can get more help and find out more information. So this tells you a little
bit where you can download more information online. So when you're doing a search for
help on a certain command, you can tell it to go online and you can even update the help feature
local to your computer as well. When you're running a search for any command, for example
nbtstat, and you're not sure what you wanted to use, what the command is, you can add a
space forward slash and a question mark and that gives you help on that. Which leads us into our
number two tip here, is the nbtstat -R and you want to be sure that you
put, it's case sensitive. If you have a lower case you can see it does something completely
different where it only lists the names and the capital r purges and reloads the cache.
So this is really good to help with many different network issues that you may be having. If you're
not sure of this already, just typing in cls and hit enter clears the screen. Number three, we've got
ipconfig. Just typing in that and pressing enter it gives you some information about your network.
Now if you were to do ipconfig /all
and hit enter, it gives you quite a bit more information, where you're able to
see the physical address, which is your mac address. Continuing on with the ipconfig, something else...
once you know what your information is, by just doing the ipconfig that we did earlier,
maybe you realize that you need to get a new IP address. So ipconfig /release will
release the IP address. Once the IP is released you'll lose network access. So then you can go in
to do ipconfig /renew and press enter and that will give you a new IP address.
Now... something to do... something to know with this is that you could go straight into the ipconfig /renew
you don't have to release first. But there may be issues with that and you have to release first
before renewing. So in many cases you may still get the same IP address because it's reserved for
that computer. Number five is continuing on with the ipconfig, is flushdns and that flushes out
the DNS cache in this system. So if you're having trouble finding network resources online by their
names it may be something with DNS and that will flush it out and hopefully fix that issue.
Number six, kind of going hand in hand with this last command, of course another
ipconfig, is to register the DNS, and that forces it to re-register
the DNS information on the computer; and you can see that it gives you information on this
that it will give you an update in the event viewer within 15 minutes if there's any issues.
So if this doesn't fix your issue you could check the event viewer, a bit later on. Number seven,
something completely different here, is netsh for Net Shell, int ip reset.
and you can see that it runs through several options here
that it resets for you and it goes way beyond the ipconfig release renew that we did.
This kind of resets the entire IP stack and you can see the list of everything that it does
and you don't need to worry too much where you're seeing their resetting failed and access denied.
This happens in every single case but I've seen it fix many issues even when it's showing that
it's got these errors. So it's fairly common to see that. For number eight, we've got netsh.
Specifically with a winsock reset, and this tells you that it's successfully reset the winsock
catalog. But you're going to have to restart the computer in order for these changes to take effect.
So the winsock is actually short for window sockets and their files allow windows programs
to connect to the internet and other computers. So if you're having problems again with network
shares, this could help reset that catalog and refresh it so that you can get an up-to-date list.
Number nine is my favorite and fixing windows updates; and you may find that in order to fix
the windows updates you have to rename or delete the software distribution folder, and...
you'll get an error message such as this one that the folder is in use. So if we go into PowerShell
we can do net stop wuauserve and press enter and it says the windows update service is stopping
and then it stops successfully. So if we go back to this message, we can say try again and it's
now successfully renamed it. Continuing off of that, we can then say to start that same service.
It's starting, and then eventually successfully started and if we go back,
we can now see that it's automatically recreated that folder for us. Finally number 10
is a good one. If you're having problems with the computer overall, is sfc /scannow
and that will run a scan and repair on the entire computer system
and this can take a fair amount of time depending on the speed of your computer, how big the drive is,
and how full it is. But it will run through and it may tell you some details at the end
and asking you to restart the computer. This is a really good utility to run other than a scan disk
which is built into the windows. You may find that this fixes a lot of issues for you. Anyway that's
it for this quick tech-torial. I hope you guys did find it helpful. If you did please do give it a
thumbs up, subscribe if you haven't already, and we'll see you in the next video. Bye for now.