web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Script to uninstall GP?

(0) ShareShare
ReportReport
Posted on by

I've seen Mariano's post (http://dynamicsgpblogster.blogspot.com/2008/11/how-to-uninstall-microsoft-dynamics-gp.html) but I'm wondering if there's a better way to do this.

I would like to have a script that I can run that will uninstall old versions of GP without me having to manually do it when we upgrade to the latest version.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    L Vail Profile Picture
    65,271 on at

    Hi Carl,

    We use PowerShell to do it. I need to give credit to Mark Helms at ProAudio.com for developing the script. We just used it to uninstall the old GP version from about 20 workstations. We also used it to install GP and all of the third party modules. Have you tried that option?

    Kind regards,

    Leslie

  • Community Member Profile Picture
    on at

    I have not...what is the script?

  • L Vail Profile Picture
    65,271 on at

    Hi Carl,

    It will be different depending on what you are trying to do. It isn't hard to write - kind of like the batch language. You need to have a little bit of knowledge about PowerShell before it will make any sense. Run PowerShell ISE from your 'run' box and make sure it's installed.

    Kind regards,

    Leslie

  • Verified answer
    L Vail Profile Picture
    65,271 on at

    Hi again,

    I talked to Mark at ProAudio.com and he gave me some more details on how PowerShell was used. He developed two scripts and a text file. The first script uninstalled the program, the text file listed all of the machines the program should be uninstalled from, and the second script invoked the uninstall script. Here is the first script:

       $app = Get-WmiObject -Class Win32_Product `

                        -Filter "Name = 'the name of the program goes here'"

          Write-Host $app

       if (!$app)

       {

           Write-Host "  Software isn't installed"

       }

       if ($app)

       {

           Write-Host "  Software is being uninstalled"

           $app.Uninstall()

       }

    The text file is a simple list of the workstation names. The invoke script looks like this:

    #Variables

    $computername = Get-Content 'C:\ps\workstations.txt'

    #This section will install the software

    foreach ($computer in $computername)

    {

       Invoke-Command -ComputerName $computer -FilePath 'C:\ps\uninstall sep.ps1'

    }

    The 'C:\ps\uninstall sep.ps1' is the name of the uninstall script that should be executed.

    Kind regards,

    Leslie

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans