Add-Host 127.0.0.1 localsite.dev y
Will add an entry to your hosts file, refresh you local DNS, and launch the IIS manager
You can also launch notepad with the hosts file loaded by adding a second y:
Add-Host 127.0.0.1 localsite.dev y y
To prevent your local DNS from being refreshed you can enter (this will also prevent IIS and notepad from launching):
Add-Host 127.0.0.1 localsite.dev exit