Warning PowerShell ID 300

Piero 75 Reputation points
2024-09-14T17:41:59.9366667+00:00

Hi,

More than a year after reporting the problem, I continue to receive the same PowerShell warning despite everything working normally and all versions being up to date.

Maybe with this new information we can better understand the problem.

I know it doesn't affect the functioning, but I'm a bit picky...

Thanks for any help.

thumbnail image 2 of blog post titled  Warning PowerShell ID 300 Re: Warning PowerShell ID 300 Re: Warning PowerShell ID 300 Re: Warning PowerShell ID 300 Re: Warning PowerShell ID 300 Re: Warning PowerShell ID 300 Re: Warning PowerShell ID 300 Re: Warning PowerShell ID 300 Re: Warning PowerShell ID 300 Re: Warning PowerShell ID 300 Re: Warning PowerShell ID 300 Re: Warning PowerShell ID 300 Re: Warning PowerShell ID 300 Re: Warning PowerShell ID 300 Re: Warning PowerShell ID 300

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,581 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,520 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Piero 75 Reputation points
    2024-09-20T16:25:31.9+00:00

    Sorry

    In fact, the event also occurs when manually starting "Windows PowerShell", from Terminal App not as administrator, while with other versions the problem does not occur.

    In app, Terminal there are: Windows PowerShell; Command prompt; PowerShell; and Azure Cloud Shell..

    Thanks


  2. Piero 75 Reputation points
    2024-09-28T17:06:07.82+00:00

    This is the output of the command in both versions, however the version that causes problems should be 5.1 which is automatically displayed when the operating system starts.

    The thing is that PowerShell versions are automatically installed in the system in Terminal and here I have as per attachment.

    Can't uninstall version 5.1??

    Thanks

    Screenshot 2024-09-28 193041

    PowerShell 7.4.5
    PS C:\Windows\System32> cd\
    PS C:\> $profile
    C:\Users\Piero\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
    PS C:\> $profile.AllUsersAllHosts
    C:\Program Files\WindowsApps\Microsoft.PowerShell_7.4.5.0_x64__8wekyb3d8bbwe\profile.ps1
    PS C:\> $profile | gm | Where-Object -Property MemberType -eq NoteProperty | ft -Property Name, Definition
    
    Name                   Definition
    ----                   ----------
    AllUsersAllHosts       string AllUsersAllHosts=C:\Program Files\WindowsApps\Microsoft.PowerShell_7.4.5.0_x64__8wekyb3d…
    AllUsersCurrentHost    string AllUsersCurrentHost=C:\Program Files\WindowsApps\Microsoft.PowerShell_7.4.5.0_x64__8weky…
    CurrentUserAllHosts    string CurrentUserAllHosts=C:\Users\Piero\Documents\PowerShell\profile.ps1
    CurrentUserCurrentHost string CurrentUserCurrentHost=C:\Users\Piero\Documents\PowerShell\Microsoft.PowerShell_profile.…
    
    
    Windows PowerShell
    Copyright (C) Microsoft Corporation. Tutti i diritti riservati.
    Installa la versione più recente di PowerShell per nuove funzionalità e miglioramenti. https://aka.ms/PSWindows
    PS C:\Users\Piero> cd\
    PS C:\> $profile
    C:\Users\Piero\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
    PS C:\> $profile.AllUsersAllHosts
    C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1
    PS C:\> $profile | gm | Where-Object -Property MemberType -eq NoteProperty | ft -Property Name, Definition
    Name                   Definition
    ----                   ----------
    AllUsersAllHosts       string AllUsersAllHosts=C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1
    AllUsersCurrentHost    string AllUsersCurrentHost=C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_pr...
    CurrentUserAllHosts    string CurrentUserAllHosts=C:\Users\Piero\Documents\WindowsPowerShell\profile.ps1
    CurrentUserCurrentHost string CurrentUserCurrentHost=C:\Users\Piero\Documents\WindowsPowerShell\Microsoft.PowerShell...
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.