This topic contains 4 replies, has 3 voices, and was last updated by
October 22, 2014 at 1:04 am #19942
I need the following powershell script and i cant figure out how to make this.
———— pseudo powershell code ———-
Tjeck for office 2013 installation.
IF Office 2013 is installed, remove Office 2013 and Install/upgrade to Office 366
ELSE run Office 365 Quickrepair with finish dialog "Repair done"
End of script
Can someone help me with this?
October 22, 2014 at 1:52 am #19945ParticipantPoints: 0Rank: Member
October 22, 2014 at 2:28 am #19948
Hi, yes i know and i should have wrote, that i am indeed trying.
I am working on a powershell script now, but have run into the first problem.
I want to run a windows troubleshooter file (.diagcab) SILENT, from a powershell script. This file uninstalles ALL office instances on a client.
I manage to read that you have to make a answerfile to make it silent but im stuck here. :o/
October 22, 2014 at 4:20 am #19952ParticipantPoints: 0Rank: Member
Could you give an example from your script on how you are running the troubleshooting pack?
This is stated in the help file for "Get-TroubleshootingPack":
Example 4: Generate an answer file
Get-TroubleshootingPack -Path "C:\Windows\Diagnostics\System\Audio" -AnswerFile "AudioAnswerFile.xml"
This command uses the Get-TroubleshootingPack cmdlet to generate an answer file. The Areo troubleshooting pack provides
a series of questions for the user to describe the troubleshooting situation and saves that information in the specified XML file.
This is stated in the help file for "Invoke-TroubleshootingPack":
Example 3: Run a troubleshooting pack in unattended mode
$Audio = Get-TroubleshootingPack -Path "C:\Windows\Diagnostics\System\Audio" Invoke-TroubleshootingPack -Pack $Audio -AnswerFile "AudioAnswerFile.xml" -Unattended
This example runs the Audio pack in unattended mode with a specified answer file.
The first command uses the Get-TroubleshootingPack cmdlet to get a DiagPack object and stores it in the $Audio variable.
The second command invokes the troubleshooting pack stored in $Audio in unattended mode. The command specifies an answer
file, previously created by using the Get-TroubleshootingPack cmdlet.
I can't test this on your specific diagcab but you could try to run the first example I showed you and then the second one, with your specific paths of course.
October 23, 2014 at 5:30 am #19995
I managed to do it with your help.
The topic ‘Uninstall Office 2013 and install Office 365 Powershell’ is closed to new replies.