Git Sub Module Check if is upto date

I am looking for a way to check if a submodule is up to date with the version held in git hub before i do a pull

for example..

I am working on Repo A, Repo B is a sub module containing set of common tools that spans a number of projects. To ensure that each time a change is made its made across the board without missing any of the other repos and other people in my team can ensure they have the right version too.

however before doing a pull each time to ensure i have the latest is there a way i can check to see if there is an updated version via powershell without having to do a pull

i have tried

git pull
git pull --dry-run

and although they work indipendatley if i put them in a variable it doesnt give me a result

$repoUpToDate = (git pull --dry-run)
if(![string]::IsNullOrEmpty($repoUpToDate))
    {   
        $response = Read-Host "(Your repo is out of date type 'yes' if you wish to update)";
        if ($response -ne 'yes') { return; }
        Write-Host "Updating Sub Module"
        (git submodule update)
    }

Git Baby is a git and github fan, let's start git clone.