Hi<\/p>\n
I need to uninstall eset off of 1000+ machines using sccm I have a script to remove and can do it at log on, but as there is no requirement for user interaction, I just want a powershell progress bar from 0 to 100% (doesnt have to be accurate)<\/p>\n
my script to remove AV is this and works fine<\/p>\n
$avsoftware = get-wmiobject Win32_Product | Where Name -eq ‘ESET Endpoint Antivirus’
\n$avguid = $avsoftware.IdentifyingNumber
\n$avagent = get-wmiobject Win32_Product | Where Name -eq ‘ESET Management Agent’
\n$agguid = $avagent.IdentifyingNumber<\/p>\n
msiexec.exe /x $agguid /qr PASSWORD=“xxxxxx”
\nstart-sleep -Seconds 120
\nnew-item c:\\windows\\esetremoved.txt
\ncls
\nmsiexec.exe /x $avguid /qr /promptrestart PASSWORD=“xxxxxx”<\/p>\n
and the script to do a generic PS progress bar is this<\/p>\n
for ($i = 1; $i -le 100; $i++ )
\n{
\nWrite-Progress -Activity “Updating your Anti-Virus Software - Please wait for AUTOMATIC REBOOT” -Status “$i% Complete:” -PercentComplete $i
\nStart-Sleep -Milliseconds 2500
\n}<\/p>\n
Now I would like some how to have one script that does the eset lookup and can show a progress bar all in one<\/p>\n
I have tried calling the scripts individually and it fails to display my generic progress bar<\/p>\n
I tried using start-process -argumentlist “-file \\path to file\\file.ps1”<\/p>\n
but not having success<\/p>\n
thanks<\/p>\n
Cliff<\/p>","upvoteCount":4,"answerCount":4,"datePublished":"2021-11-18T02:34:17.000Z","author":{"@type":"Person","name":"spiceuser-e7rf8","url":"https://community.spiceworks.com/u/spiceuser-e7rf8"},"suggestedAnswer":[{"@type":"Answer","text":"
Hi<\/p>\n
I need to uninstall eset off of 1000+ machines using sccm I have a script to remove and can do it at log on, but as there is no requirement for user interaction, I just want a powershell progress bar from 0 to 100% (doesnt have to be accurate)<\/p>\n
my script to remove AV is this and works fine<\/p>\n
$avsoftware = get-wmiobject Win32_Product | Where Name -eq ‘ESET Endpoint Antivirus’
\n$avguid = $avsoftware.IdentifyingNumber
\n$avagent = get-wmiobject Win32_Product | Where Name -eq ‘ESET Management Agent’
\n$agguid = $avagent.IdentifyingNumber<\/p>\n
msiexec.exe /x $agguid /qr PASSWORD=“xxxxxx”
\nstart-sleep -Seconds 120
\nnew-item c:\\windows\\esetremoved.txt
\ncls
\nmsiexec.exe /x $avguid /qr /promptrestart PASSWORD=“xxxxxx”<\/p>\n
and the script to do a generic PS progress bar is this<\/p>\n
for ($i = 1; $i -le 100; $i++ )
\n{
\nWrite-Progress -Activity “Updating your Anti-Virus Software - Please wait for AUTOMATIC REBOOT” -Status “$i% Complete:” -PercentComplete $i
\nStart-Sleep -Milliseconds 2500
\n}<\/p>\n
Now I would like some how to have one script that does the eset lookup and can show a progress bar all in one<\/p>\n
I have tried calling the scripts individually and it fails to display my generic progress bar<\/p>\n
I tried using start-process -argumentlist “-file \\path to file\\file.ps1”<\/p>\n
but not having success<\/p>\n
thanks<\/p>\n
Cliff<\/p>","upvoteCount":4,"datePublished":"2021-11-18T02:34:17.000Z","url":"https://community.spiceworks.com/t/show-progress-while-uninstalling/817297/1","author":{"@type":"Person","name":"spiceuser-e7rf8","url":"https://community.spiceworks.com/u/spiceuser-e7rf8"}},{"@type":"Answer","text":"