Public/Start-Dropbox.ps1
Function Start-Dropbox { <# .Synopsis Starts Dropbox .Description For the lazy ones, starts Dropbox from PowerShell .Example Start-Dropbox Starts Dropbox .Inputs None .Outputs None .LINK about_functions_advanced .LINK about_CommonParameters #> [CmdletBinding( ConfirmImpact = "Medium" )] Param () $dropbox = "C:\Program Files (x86)\Dropbox\Client\Dropbox.exe" $args = "/home" $FileExists = Test-Path $dropbox If ($FileExists -eq "True") { If (!(Get-Process Dropbox -ErrorAction SilentlyContinue)) { Write-Verbose "Starting Dropbox..." Start-Process $dropbox $args } } Else { Throw "Dropbox not found, exiting..." Break } } |