🌐
Computer Performance
computerperformance.co.uk β€Ί home β€Ί powershell
PowerShell Get-BrowseMaster Function | Windows Browse Master
July 21, 2018 - In any scripting language I am very fond putting the 'If' logic to good use. The key point of this command is that when the output of NBTStat contains MSBrowse, then we have found the local network's browse master. One feature of this function is the way it combines built-in Microsoft Windows utilities, with PowerShell commands.
🌐
Reddit
reddit.com β€Ί r/powershell β€Ί one-liner: find local netbios master browser
r/PowerShell on Reddit: One-liner: find local NetBIOS Master Browser
July 15, 2016 -

We sometimes see weird name resolution issues on a remote subnet, e.g. where a computer can't be accessed because it seems to have the wrong IP address. 9 times out of 10, this is because the local NetBIOS Master Browser has gone nuts and needs to be taken down. The NetBIOS Master Browser is automatically selected by the computers on the subnet, and it's not always obvious which computer has the role.

This PowerShell one-liner will query the local subnet and report which computers are advertising themselves as a Master Browser.

net view | ? { $_ -match '^\\\\(\S+)' } | % { $matches[1] } | ? { nbtstat -a $_ | sls '__MSBROWSE__' }

And here it is broken apart and explained:

net.exe view |                                  # list netbios devices on local network
    where-object { $_ -match '^\\\\(\S+)' } |   # only use lines formatted like '\\computername'
    foreach-object { $matches[1] } |            # extract the computer name
    where-object {                              # only return computers which satisfy the following:
        nbtstat.exe -a $_ |                     # ...of all the netbios names that computer advertises...
            select-string '__MSBROWSE__'        # ...which ones contain '__MSBROWSE__'?
    }
Discussions

Command to view who is the master browser?
Find answers to Command to view who is the master browser? from the expert community at Experts Exchange More on experts-exchange.com
🌐 experts-exchange.com
December 23, 2013
Workstation is master browser? - Software & Applications - Spiceworks Community
I’m troubleshooting a logon issue with a particular computer and while I was in the event log I noticed an 8021 error saying the computer was unable to retrieve a list of servers from the browser master, it then goes on to name one of my other workstations as the master. More on community.spiceworks.com
🌐 community.spiceworks.com
5
November 25, 2016
Modern Browser in Powershell GUI
https://github.com/nkasco/Destiny-API-PowerShell-Bootstrapper This should be a good example of what you are looking for. A while back I made a PowerShell based WinForm app that embeds a WebView2 object. In this case, for the purpose of handling a OAuth2 authorization code flow to fetch an API token. Should be enough there for you to do whatever you'd like with either PowerShell 5 or 7, just know they are different dlls. Enjoy. More on reddit.com
🌐 r/PowerShell
18
3
November 10, 2023
Setting default browser with powershell without 'How do you want to open this?' prompts - Stack Overflow
all, I recently tried to setup edge as a default bowser in a login script. #Edge Set-ItemProperty 'HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice' -name ProgId IE. More on stackoverflow.com
🌐 stackoverflow.com
🌐
Computer Performance
computerperformance.co.uk β€Ί home β€Ί powershell
PowerShell Registry Browse Master | MaintainServerList
July 21, 2018 - The point of this page is to show that it's possible to rig the browse master election by changing the value of MaintainServerList to 'Yes', or 'No'. ... Note 2: This only works after you restart the Computer Browser Service on both 'White' and 'Red', alternatively you could restart the machines. # Run this PowerShell script on your 'White' machine Clear-Host $Reg = "HKLM:\SYSTEM\CurrentControlSet\services\Browser\Parameters" Set-ItemProperty -path $Reg -Name MaintainServerList -Value "Yes" Restart-Service 'Computer Browser'
🌐
GitHub
github.com β€Ί rvrsh3ll β€Ί Misc-Powershell-Scripts β€Ί blob β€Ί master β€Ί Get-BrowserData.ps1
Misc-Powershell-Scripts/Get-BrowserData.ps1 at master Β· rvrsh3ll/Misc-Powershell-Scripts
PS C:\> Get-BrowserData Β· Β· Enumerates browser information for all supported browsers for all current users. Β· .EXAMPLE Β· Β· PS C:\> Get-BrowserData -Browser IE -Datatype Bookmarks -UserName user1 Β· Β· Enumerates ...
Author Β  rvrsh3ll
🌐
GitHub
github.com β€Ί powershellvb β€Ί PowerShell-7 β€Ί blob β€Ί master β€Ί Docs β€Ί install-chrome-browser.md
PowerShell-7/Docs/install-chrome-browser.md at master Β· powershellvb/PowerShell-7
Mega collection of 250+ useful cross-platform PowerShell scripts. - PowerShell-7/Docs/install-chrome-browser.md at master Β· powershellvb/PowerShell-7
Author Β  powershellvb
🌐
GitHub
github.com β€Ί jajp777 β€Ί powershell-scripts-1 β€Ί blob β€Ί master β€Ί Get-BrowserHistory.ps1
powershell-scripts-1/Get-BrowserHistory.ps1 at master Β· jajp777/powershell-scripts-1
Parses Chrome and IE browser history. Optionally refines the results by username and/or URL. ... The computer name to get browsing history from. Defaults to localhost (actually...
Author Β  jajp777
🌐
Powershell Commands
powershellcommands.com β€Ί powershell-set-default-browser
Set Default Browser with PowerShell: A Quick Guide
October 26, 2024 - Mastering the PowerShell Enumerator: A Quick Guide Β· Yes, it is possible to set the default browser for all users, but it requires modifying the registry keys in `HKEY_LOCAL_MACHINE` instead of `HKEY_CURRENT_USER`. This typically necessitates higher privileges and should be done with caution, ensuring that it aligns with the needs of all users.
🌐
Experts Exchange
experts-exchange.com β€Ί questions β€Ί 10062271 β€Ί Command-to-view-who-is-the-master-browser.html
Solved: Command to view who is the master browser? | Experts Exchange
December 23, 2013 - I'm sure I used NET somehow (VIEW? USE?) I believe it was NET VIEW /Wrkgrp and then some flag to list the browser elections. Thanks! ionate@hotmail.com ... There is a utility available on the windows nt resource kit, other then this there is no way to know who the master browser is.
Find elsewhere
🌐
Spiceworks Community
community.spiceworks.com β€Ί software & applications
Workstation is master browser? - Software & Applications - Spiceworks Community
November 25, 2016 - I’m troubleshooting a logon issue with a particular computer and while I was in the event log I noticed an 8021 error saying the computer was unable to retrieve a list of servers from the browser master, it then goes on …
🌐
Microsoft Learn
learn.microsoft.com β€Ί en-us β€Ί powershell β€Ί module
PowerShell Module Browser - PowerShell | Microsoft Learn
Search all PowerShell modules and cmdlets from Microsoft - just start typing in the box below.
🌐
Medium
medium.com β€Ί @waxodium β€Ί use-powershell-in-the-browser-8cd34ecfff38
Use PowerShell in the Browser. PowerShell in the browser refers to… | by waxodium | Medium
April 14, 2026 - Use PowerShell in the Browser PowerShell in the browser refers to running a PowerShell session through a web interface instead of a traditional terminal. This can be done using tools like Sheh, which …
🌐
NinjaOne
ninjaone.com β€Ί home β€Ί script hub β€Ί how to set a default browser for all users with powershell: a step-by-step guide
How to Set a Default Browser for All Users with PowerShell: A Step-by-Step Guide - NinjaOne
October 13, 2025 - This blog post will explore a PowerShell script designed to set the default browser for all users on a Windows machine, providing IT professionals and Managed Service Providers (MSPs) with a powerful tool to maintain control over their environments.
🌐
Scottie's Tech.Info
scottiestech.info β€Ί home β€Ί networking β€Ί how to determine the master browser in a windows workgroup
How to Determine the Master Browser in a Windows Workgroup | Scottie's Tech.Info
December 27, 2018 - Here's a little problem that drove me crazy: How do you determine the Master Browser in a Windows Workgroup? First of all, lemme explain a bit about how a workgroup works. When you have a LAN set up running Windows machines, each machine can see all the others in Network Neighborhood (or just "Network" in
🌐
Reddit
reddit.com β€Ί r/powershell β€Ί how to run local powershell code from a web browser.
r/PowerShell on Reddit: How to run local PowerShell code from a web browser.
March 20, 2021 -

So first, I will say that this is just for fun and not a practical tool. Also, if this is not done correctly, then even as a novelty project it is a very very bad idea.

Create the following registry key:

HKEY_CLASSES_ROOT\powershell\shell\open\command

Set the value of

HKEY_CLASSES_ROOT\powershell\(Default)

to

URL:Powershell Protocol

Create a String with no value:

HKEY_CLASSES_ROOT\powershell\URL Protocol

Create a script for launching scripts that cleans the arguments that it will get with a regex like

'(?<=powershell://).+(?=/)'

Example:

param($Name)
$ScriptName = [Regex]::Matches(
    $Name,
    '(?<=powershell://).+(?=/)'
).Value -replace '"'
if(Test-path "D:\$ScriptName"){
    &"D:\$ScriptName"
}

Set the value of

HKEY_CLASSES_ROOT\powershell\shell\open\command\(Default)

to

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy RemoteSigned -file <PATH TO LAUNCHER SCRIPT> -name '%1''

Then to run a script from a webpage, create a link on it to

powershell://<Name of Script>

For example:

<a href="powershell://Test.ps1">Test Me</a>

When the link is clicked, you will get a confirmation prompt and when you hit OK it should run the script.

Edit: Added some stuff to clean the input in the example script + a better warning. + I like that what is quickly rising to the top of my controversial submissions was awarded gold. Thanks πŸ™ƒ

Top answer
1 of 5
15

Nope, this is not a good idea at all and I can't think of a single-use case where this would be prudent.

I can/see hear your risk management/security folks knocking down your door/desk/cubicle immedialty.

There are better options. PowerShell Web Access for example: (no reg hacking required) and 100% Microsoft supported

Use the Web-based Windows PowerShell Console

https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh831417(v=ws.11)

Install and Use Windows PowerShell Web Access

https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh831611(v=ws.11)

PowerShell Web Access – Just how practical is it?

https://practical365.com/blog/powershell-web-access-just-how-practical-is-it

This is very similar to Azure Cloud Shell.

PowerShell Team: Using PowerShell From a Browser to Manage Cloud Resources by Danny Maertens - YouTube

Because the above is a Web browser console, it can be properly hosted and secured; which means I can use any device with a browser to run PowerShell script, even your phone.

BTW, you can run PS from an HTA (stand-alone local HTML application (only on Windows), just as you could WMI stuff via VBScript in an HTA (stuff like the below was fairly common back in the day)...

<head>
<title>HTA Test</title>
<HTA:APPLICATION 
     APPLICATIONNAME="HTA Test"
     SCROLL="yes"
     SINGLEINSTANCE="yes"
     WINDOWSTATE="maximize"
</head>
<script language="VBScript">
    Sub TestSub

        Set WshShell = CreateObject("WScript.Shell")
        return = WshShell.Run("powershell.exe -ExecutionPolicy ByPass-File test.ps1", 0, true)
        Set fso  = CreateObject("Scripting.FileSystemObject")
        Set file = fso.OpenTextFile("D:\temp\abc.txt", 1)
        text = file.ReadAll     
        alert(text)     
        file.Close      
    End Sub
</script>
<body>
    <input type="button" value="Run Script" name="run_button"  onClick="TestSub"><p> 
</body>

... (there is even an IDE for the vbsedit.com); though most orgs/enterprises today block HTA's.

If you want to run PS from a website, that is what N-Tier app deployment is for.

For Example:

DevInfra-US: Using PowerShell 2.0 from ASP.NET Part 1

Create a Powershell Web Application - IT Droplets

Making a powershell script run from aspx - it worked in 1/2 hour! - elbsolutions.com Project List & Blog

Else you'd also look at going down this path:

java - HTML Web page that Launches a PowerShell script - Stack Overflow

2 of 5
7

then this is a very very bad idea

Even if it is done correctly it is very*30 bad idea.

Also you can bypass all that and just make a .cmd to launch the script - it would work just fine.

An example of a self-contained PS script in the .cmd

Yet, I'm slightly amused by your idea.

And got a little giggle from -RemoteSigned.

🌐
Powershell Commands
powershellcommands.com β€Ί powershell-change-default-browser-to-chrome
PowerShell Change Default Browser to Chrome: A Simple Guide
October 15, 2024 - To change the default browser to Google Chrome using PowerShell, you can modify the associated settings in the Windows Registry with the following command: Start-Process "powershell.exe" -ArgumentList "Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http' -Name 'Progid' -Value 'ChromeHTML'" Start-Process "powershell.exe" -ArgumentList "Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https' -Name 'Progid' -Value 'ChromeHTML'"
🌐
UNBLOG
think.unblog.ch β€Ί home page β€Ί master browser lookup
Master Browser Lookup - UNBLOG Tutorials
November 7, 2024 - To discover the master browser on a local network, the following content can be created in a batch file.
Rating: 5 ​ - ​ 2 votes
🌐
Powershell Commands
powershellcommands.com β€Ί powershell-open-website
Powershell Open Website: A Quick Guide to Browsing Automation
December 1, 2024 - Master the art of using PowerShell to effortlessly open websites. Discover concise commands and tips to enhance your scripting skills.