$ie = New-Object -ComObject 'internetExplorer.Application'
$ie.Visible= $true # Make it visible
$ie.Navigate("www.linkedin.com")
while ($ie.Busy -eq $true){Start-Sleep -seconds 4;}
$usernamefield = $ie.Document.getElementByID('session_key-Login')
$usernamefield.value = 'YouEmailAddress@gmail.com'
$passwordfield = $ie.Document.getElementByID('Session_password-login')
$passwordfield.value = 'YouP@ssword'
$link=$ie.Document.getElementByID('signin')
$link.click()