Skip to content

Instantly share code, notes, and snippets.

@hansgafriedzal
Last active June 11, 2020 03:57
Show Gist options
  • Save hansgafriedzal/84c752adee8788eeb864b257e9509934 to your computer and use it in GitHub Desktop.
Save hansgafriedzal/84c752adee8788eeb864b257e9509934 to your computer and use it in GitHub Desktop.
$url = @{
browser = $null
hangouts = 'hangouts.google.com'
calendar = 'calendar.google.com'
gmail = 'mail.google.com'
whatsapp = 'web.whatsapp.com'
keep = 'keep.google.com'
meet = 'meet.google.com'
teams = 'teams.microsoft.com'
}
function Start-Browser {
param
(
[ValidateSet('msedge','chrome')]
$Browser = 'msedge',
$Profile = 'Default',
[ValidateSet('browser','whatsapp','gmail','teams','calendar','hangouts','keep','meet')]
[string[]] $App
)
$App | %{
if ($url[$_])
{
start $Browser -args "--profile-directory=""$Profile"" --app=https://$($url[$_])"
}
else
{
start $Browser -args "--profile-directory=""$Profile"""
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment