what to do when Get-Help produces duplicates

Welcome Forums General PowerShell Q&A what to do when Get-Help produces duplicates

Viewing 7 reply threads
  • Author
    Posts
    • #181197
      Participant
      Topics: 4
      Replies: 11
      Points: 103
      Rank: Participant

      hi all,
      I am want to lear something about Scheduled Job and that lead me to searching for about_ help files.
      My problem is that Get-Help produces duplicate topics and this way I can't actually read their content.
      Here's what is happening on my Powershell:

      PS C:\shelldemo> man about_scheduled*                                                                                                                                                                                                                               Name                              Category  Module                    Synopsis
      ----                              --------  ------                    --------
      about_Scheduled_Jobs              HelpFile                            Describes scheduled jobs and explains how to use and manage 
      about_Scheduled_Jobs_Advanced     HelpFile                            Explains advanced scheduled job topics, including the fi... 
      about_Scheduled_Jobs_Basics       HelpFile                            Explains how to create and manage scheduled jobs.           about_Scheduled_Jobs_Troublesh... HelpFile                            Explains how to resolve problems with scheduled jobs        
      about_Scheduled_Jobs              HelpFile                            Describes scheduled jobs and explains how to use and manage 
      about_Scheduled_Jobs_Advanced     HelpFile                            Explains advanced scheduled job topics, including the fi...
      about_Scheduled_Jobs_Basics       HelpFile                            Explains how to create and manage scheduled jobs.
      about_Scheduled_Jobs_Troublesh... HelpFile                            Explains how to resolve problems with scheduled jobs
      

      So that if i want to read one of them, say about_Scheduled_Jobs that is what happens:

      PS C:\shelldemo> man about_scheduled_jobs -Full
      
      Name                              Category  Module                    Synopsis
      ----                              --------  ------                    --------
      about_Scheduled_Jobs              HelpFile                            Describes scheduled jobs and explains how to use and manage
      about_Scheduled_Jobs              HelpFile                            Describes scheduled jobs and explains how to use and manage
      

      Any idea on what to do to remove the duplicate topics or at least leave them but been able to read an about_ file?

      Thanks in advance
      PS: I already issued the command

      Update-Help -Force -Ea SilentlyContinue
    • #181200
      Participant
      Topics: 4
      Replies: 11
      Points: 103
      Rank: Participant

      just an update: I was able at least to read the help file issuing the command:

      PS C:\shelldemo> man (man about_scheduled_Jobs | select -First 1)

      So now the only problem is how to get rid of the duplicates

      Thanks in advance

    • #183072
      Participant
      Topics: 0
      Replies: 24
      Points: 157
      Helping Hand
      Rank: Participant

      The help files are stored in:

      C:\Windows\System32\WindowsPowerShell\v1.0\en-US

      The about_* files are just plain text files. Check to see if you have any similar/duplicate named  files.

      PS D:\> dir C:\Windows\System32\WindowsPowerShell\v1.0\en-US\*scheduled*
      
      Directory: C:\Windows\System32\WindowsPowerShell\v1.0\en-US
      
      Mode LastWriteTime Length Name
      ---- ------------- ------ ----
      -a---- 8/9/2015 9:46 AM 11769 about_Scheduled_Jobs.help.txt
      -a---- 8/9/2015 9:46 AM 10104 about_Scheduled_Jobs_Advanced.help.txt
      -a---- 8/9/2015 9:46 AM 11374 about_Scheduled_Jobs_Basics.help.txt
      -a---- 8/9/2015 9:46 AM 21054 about_Scheduled_Jobs_Troubleshooting.help.txt
    • #183129
      Participant
      Topics: 10
      Replies: 118
      Points: 508
      Helping Hand
      Rank: Major Contributor

      Is it possible you have a profile.ps1 file with something causing the duplicates? Or have you tried help using another user on the same system?

    • #183135
      Participant
      Topics: 10
      Replies: 118
      Points: 508
      Helping Hand
      Rank: Major Contributor

      Though it may not exactly match your scenario, this might shed some light:

      https://serverfault.com/questions/313570/powershell-2-how-to-eliminate-duplicate-help-entries

    • #185315
      Participant
      Topics: 4
      Replies: 11
      Points: 103
      Rank: Participant

      thanks for the responses.
      i tried to find some duplicate text files and that is the result:

      PS C:\> dir -File about_Scheduled_Jobs.help.txt -Recurse -force -ea SilentlyContinue
      
      
          Directory: C:\Users\Administrator\AppData\Local\Temp\eaa334kg\Microsoft.PowerShell.Core_00000000-0000-0000-0000-000000000000_
          en-US_HelpContent
      
      
      Mode                LastWriteTime         Length Name
      ----                -------------         ------ ----
      -a----       09/08/2015      9:46          11769 about_Scheduled_Jobs.help.txt
      
      
          Directory:
          C:\Users\Administrator\AppData\Local\Temp\gzawvlbv\PSScheduledJob_50cdb55f-5ab7-489f-9e94-4ec21ff51e59_en-US_HelpContent
      
      
      Mode                LastWriteTime         Length Name
      ----                -------------         ------ ----
      -a----       09/08/2015      9:46          11769 about_Scheduled_Jobs.help.txt
      
      
          Directory: C:\Windows\System32\WindowsPowerShell\v1.0\en-US
      
      
      Mode                LastWriteTime         Length Name
      ----                -------------         ------ ----
      -a----       09/08/2015      9:46          11769 about_Scheduled_Jobs.help.txt
      
      
          Directory: C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSScheduledJob\en-US
      
      
      Mode                LastWriteTime         Length Name
      ----                -------------         ------ ----
      -a----       09/08/2015      9:46          11769 about_Scheduled_Jobs.help.txt
      
      
          Directory: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\en-US
      
      
      Mode                LastWriteTime         Length Name
      ----                -------------         ------ ----
      -a----       09/08/2015      9:46          11769 about_Scheduled_Jobs.help.txt

      Due to this search, i already tried to modify the file name inside C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSScheduledJob\en-US
      naming the helpfile Xabout_Scheduled_Jobs.help.txt make disappear the duplicate of that file.

      Now probably in my early efforts to begin understanding powershell i messed around installing modules?
      But the question that matter to me is: did I suppose to cancel helpfiles inside C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSScheduledJob\en-US?

      According to Sean the about_ help files are stored inside C:\Windows\SysWOW64\WindowsPowerShell\v1.0\en-US (already checked, they are there indeed)
      I tried to uninstall-module and remove-module PSSheduledJobs but nothing happened, i mean powershell cant find that module

      A safer way would be to just rename the '...\Module\En-Us' help files and get rid of it, but if erasing those files in your opinion do not 'break' anything
      i will do it

      By the way thank you all for pointing me in the right direction to figure out the duplicate problem đŸ™‚

      PS: here is the result after renaming:

      PS C:\> man about_scheduled*
      
      Name                              Category  Module                    Synopsis
      ----                              --------  ------                    --------
      about_Scheduled_Jobs              HelpFile                            Describes scheduled jobs and explains how to use and manage
      about_Scheduled_Jobs_Advanced     HelpFile                            Explains advanced scheduled job topics, including the fi...
      about_Scheduled_Jobs_Basics       HelpFile                            Explains how to create and manage scheduled jobs.
      about_Scheduled_Jobs_Troublesh... HelpFile                            Explains how to resolve problems with scheduled jobs

      UPDATE:
      every time I use Update-Help -Force -ea SilentlyContinue i have again duplicate about_Scheduled files.
      Not a big deal to erase the ones in the 'wrong' directory, but if you think of a alternative/permanent solution let me know ^^

    • #185909
      Participant
      Topics: 0
      Replies: 24
      Points: 157
      Helping Hand
      Rank: Participant

      It looks like you have multiple copies of the module installed in different locations. Update-Help is updating the help files for every location.

    • #190801
      Participant
      Topics: 4
      Replies: 11
      Points: 103
      Rank: Participant

      thanks for the response,
      I think too that is the problem, but when I try to search installed modules nothing shows up:

      PS C:\shelldemo> Get-Module
      
      ModuleType Version    Name                                ExportedCommands
      ---------- -------    ----                                ----------------
      Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...
      Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
      Script     2.0.0      PSReadline                          {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PS...
      

      Is there any other method or cmdlet to find what modules are actually installed locally on my computer?
      According to get-module cmdlet no "sheduled" module are redundant on my machine so the issue with duplicate topics is not solved yet.

      I can leave with it, I just only remember myself to erase the duplicates, not a big deal. But i'd like to solve this issue permanently if I can.

Viewing 7 reply threads
  • You must be logged in to reply to this topic.