![]() ![]() The way I ended up fixing it was through something I Found in the link below I can get to run in a bat file if I just add powershell -Command "PS_COMMAND_HERE" How do I make both cmdlets run in PowerShell script and see the outputs? I want them to execute in order and have the pause happen at the end It drove me nuts Press Enter to continue.: ![]() It was always the first out that ran and it was always after the pause. The result would come as follows and not both cmdlets would run. Get-NetAdapter -Name "*Ethernet*","*Wi-Fi*"| Select Name,MacAddress Get-NetIPAddress -InterfaceAlias "*Ethernet*","*Wi-Fi*" -AddressFamily IPv4 | Select InterfaceAlias, IPAddress The problem arouse when I tried to run them in PowerShell file such as example.ps1. I had to use a different Cmdlet to get the IP Get-NetIPAddress -InterfaceAlias "*Ethernet*","*Wi-Fi*" -AddressFamily IPv4 | Select InterfaceAlias, IPAddress I came across this command over PowerShell to get the MAC address Get-NetAdapter -Name "*Ethernet*","*Wi-Fi*"| Select Name,MacAddress I needed to get the MAC address of several PCs as well as there IPs. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |