Powerpoint Full Screen Mode - issue

My deployment script continues to run and nag users if Powerpoint 2016 is detected in full screen mode. The log file shows the detection, but I assumed the script should stop or wait? OS is Windows 10 x64. Help appreciated.

<![LOG[[Pre-Installation] :: Check if PowerPoint is in either fullscreen slideshow mode or presentation mode…]LOG]!><time=“16:52:37.4020” date=“12-19-2016” component=“Test-PowerPoint” context=“domain\user” type=“1” thread=“7744” file=“Deploy-Adobe_ReaderDC_15.020.20039_x86_R1.ps1”>
<![LOG[[Pre-Installation] :: PowerPoint application is running.]LOG]!><time=“16:52:37.4170” date=“12-19-2016” component=“Test-PowerPoint” context=“domain\user” type=“1” thread=“7744” file=“Deploy-Adobe_ReaderDC_15.020.20039_x86_R1.ps1”>
<![LOG[[Pre-Installation] :: Find open window title(s) [^PowerPoint Slide Show] using regex matching.]LOG]!><time=“16:52:37.4490” date=“12-19-2016” component=“Get-WindowTitle” context=“domain\user” type=“1” thread=“7744” file=“Deploy-Adobe_ReaderDC_15.020.20039_x86_R1.ps1”>
<![LOG[[Pre-Installation] :: Detected that PowerPoint process [POWERPNT] has a window with a title that beings with [PowerPoint Slide Show].]LOG]!><time=“16:52:37.5420” date=“12-19-2016” component=“Test-PowerPoint” context=“domain\user” type=“1” thread=“7744” file=“Deploy-Adobe_ReaderDC_15.020.20039_x86_R1.ps1”>
<![LOG[[Pre-Installation] :: PowerPoint is running in fullscreen mode [True].]LOG]!><time=“16:52:37.5580” date=“12-19-2016” component=“Test-PowerPoint” context=“domain\user” type=“1” thread=“7744” file=“Deploy-Adobe_ReaderDC_15.020.20039_x86_R1.ps1”>

I’d try to add a if statement before the show-installationwelcome. Something like

If(Test-PowerPoint) {
exit-script -exitcode 1618
}

Unable to try it myself at the moment as I’m traveling. Unsure what Test-PowerPoint returns, so you might have to tweak that part a bit.

Cheers