You can try something like this:
I have not tested if it works. I have PowerShell V3 Beta installed - it may be necessary to run these commands.
Register-ScheduledJob -name ConnectVPN -ScriptBlock { & rasphone MyVpnConnection $trigger = New-JobTrigger -AtLogOn Add-JobTrigger -Name ConnectVPN -Trigger $trigger Get-ScheduledJob -Name ConnectVPN | Get-JobTrigger
source share