From very good post here from "Jack Corbett" -
http://www.sqlservercentral.com/Forums/Topic989304-391-1.aspx
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
$spw = Get-SPSite "http://server.domain.com"
$clientID = "86e47e56-f289-4f68-b832-58b0542e0c96"
$authRealm = Get-SPAuthenticationRealm -ServiceContext $spw
$spAppId = $clientID + "@" + $authRealm
$spAppPrincipal = Get-SPAppPrincipal -Site $spw.RootWeb -NameIdentifier $spAppId
Set-SPAppPrincipalPermission -Site $spw.RootWeb -AppPrincipal $spAppPrincipal -Scope SiteSubscription -Right FullControl