Windows 10: this error is comming up when i use powershell 7 as administrator

Discus and support this error is comming up when i use powershell 7 as administrator in Windows 10 Gaming to solve the problem; the text which pops up during this "An error has occurred that was not properly handled. Additional information is shown below. The PowerShell process... Discussion in 'Windows 10 Gaming' started by Nilesh Barat, May 25, 2024.

  1. this error is comming up when i use powershell 7 as administrator


    the text which pops up during this "An error has occurred that was not properly handled. Additional information is shown below. The PowerShell process will exit.Unhandled exception. System.Management.Automation.CmdletInvocationException: Failed to create instance: -2147023174 ---> System.Runtime.InteropServices.COMException 0x800706BA: Failed to create instance: -2147023174 at Microsoft.WinGet.Client.Engine.Helpers.ManagementDeploymentFactory.Create[T]Type type, Guid& iid at Microsoft.WinGet.Client.Engine.Helpers.ManagementDeploymentFactory.CreateCreateCompositePackageCatalogOpt

    :)
     
    Nilesh Barat, May 25, 2024
    #1

  2. this error is comming up when i use powershell 7 as administrator

    Hi Nilesh,

    Does the error occur when running winget --info from PowerShell 7?

    Please post a screenshot of the error.
     
    Ramesh Srinivasan, May 25, 2024
    #2
  3. ddelo Win User
    Export All Administrative Events to Excel

    To analyze events, from the Windows Event Viewer, there is a simple way to export all Administrative Events to Excel, with PowerShell.

    Exporting all Administrative Events to Excel is a simple two Step process, as described here:

    Step 1 - Create the Administrative Events View .xml file
    1. Open Eventviewer (%windir%\system32\eventvwr.msc)
    2. Navigate to: Event Viewer (Local) > Custom Views > Administrative Events
    3. In the “Actions” pane select “Filter Current Custom View”.
    4. Select the the XML tab.
    5. Press Ctrl+A to select all the XML code of the Custom View.
    6. Open a notepad, paste the selected code and save the file to your Desktop as AdmEvtView.xml


    Step 2 - Create the csv file with the events
    1. Download the ExportEvtCSV.zip file, which contains the script ExportEvtCSV.ps1 and unzip it, on your Desktop.
      It's not a fancy script, just basic PowerShell commands to create a csv file on the Desktop.
    2. In Windows Search, type “ISE” (without the quotes) to open “Windows PowerShell ISE” and Run as administrator
    3. To allow running the script, change the ExecutionPolicy, for this session. To do that, in the Console pane type:
      Code:
    4. In the Windows PowerShell ISE, open and run the script: ExportEvtCSV.ps1
      The script will create a csv file with a name YYYYMMDD.HHMM.csv on the Desktop
    5. When done, open the newly created .csv file, format the columns as needed and optionally save it as .xlsx, if you wish.
    That’s it! You now have all the Administrative Events in Excel for filtering and further analysis. this error is comming up when i use powershell 7 as administrator :)

    Now to the more technical hard stuff... *Confused

    There is a reason for running the script from within PowerShell ISE!

    It would be great if everything was also working perfectly, when running the script from an elevated PowerShell too.

    We can run it from an elevated PowerShell, which means that you just follow the Step 1, as above but for the Step 2 instead of the ISE you run the script from an elevated PowerShell.

    The problem is that it will work only for anybody who has en-US format for the dates. Everyone else, who has another format (i.e. en-GB, fr-FR, el-GR etc.), the dates are not translated properly by Excel (although the script uses the –UseCulture switch) and remain as text in the en-US format.

    I'm not sure if this a bug of the "export-csv" cmdlet, but although it runs the way it supposed to from within the ISE, from PowerShell there is a problem with the dates format.
    As I haven’t found a way to overcome this obstacle, any suggestion from the PowerShell gurus of the forum (like my good friend Shawn @Brink, for instance), is welcome.
     
    ddelo, May 25, 2024
    #3
  4. Remon Ont Win User

    this error is comming up when i use powershell 7 as administrator

    Error Message: COM Surrogate has stopped working

    Hi Bernard,

    COM Surrogate is a process in Windows 10 that is in charge of showing thumbnails and similar information. Issues with COM Surrogate
    is probably caused by MacType or codecs and other COM components installed by various software, like some versions of DivX or Nero.

    We would like to know some information to better assist you:

    • Have you done any changes on your computer prior to the issue?
    • What specific activity are you doing when the error message come up?
    • What specific troubleshooting steps have you tried so far? for us to know what troubleshooting steps we can provide next.

    Please check the details of the errors using the steps below and provide us with a screenshot:

    • Press Windows key + S.
    • Type View all, then click on View all problem reports Control panel.
    • Right-click on a few of the "COM Surrogate", "Stopped working" errors.
    • View technical details.

    We will wait for your response.
     
    Remon Ont, May 25, 2024
    #4
Thema:

this error is comming up when i use powershell 7 as administrator

Loading...
  1. this error is comming up when i use powershell 7 as administrator - Similar Threads - error comming powershell

  2. this error is comming up when i use powershell 7 as administrator

    in Windows 10 Software and Apps
    this error is comming up when i use powershell 7 as administrator: the text which pops up during this "An error has occurred that was not properly handled. Additional information is shown below. The PowerShell process will exit.Unhandled exception. System.Management.Automation.CmdletInvocationException: Failed to create instance: -2147023174...
  3. Powershell 7 !

    in Microsoft Windows 10 Store
    Powershell 7 !: Hi, when I use things like SCANNOW I now use Powershell instead of Command prompt. I keep seeing the message "try new cross-platform Powershell 6 ! I have looked in the Microsoft store and and "7" is listed is this the latest ? I guess the next question is "should I download...
  4. Powershell 7 !

    in Windows 10 Gaming
    Powershell 7 !: Hi, when I use things like SCANNOW I now use Powershell instead of Command prompt. I keep seeing the message "try new cross-platform Powershell 6 ! I have looked in the Microsoft store and and "7" is listed is this the latest ? I guess the next question is "should I download...
  5. Powershell 7 !

    in Windows 10 Software and Apps
    Powershell 7 !: Hi, when I use things like SCANNOW I now use Powershell instead of Command prompt. I keep seeing the message "try new cross-platform Powershell 6 ! I have looked in the Microsoft store and and "7" is listed is this the latest ? I guess the next question is "should I download...
  6. PowerShell fails to launch excel with CLSID COM error

    in Windows 10 Gaming
    PowerShell fails to launch excel with CLSID COM error: Hi Community,Really simple issue here we cannot figure out:1. Since 2015, Microsoft released this functionality and is officially documented here2. When we try to run the command in PowerShell below this is what happens:$excel = New-Object -ComObject...
  7. PowerShell fails to launch excel with CLSID COM error

    in Windows 10 Software and Apps
    PowerShell fails to launch excel with CLSID COM error: Hi Community,Really simple issue here we cannot figure out:1. Since 2015, Microsoft released this functionality and is officially documented here2. When we try to run the command in PowerShell below this is what happens:$excel = New-Object -ComObject...
  8. PowerShell fails to launch excel with CLSID COM error

    in Windows 10 BSOD Crashes and Debugging
    PowerShell fails to launch excel with CLSID COM error: Hi Community,Really simple issue here we cannot figure out:1. Since 2015, Microsoft released this functionality and is officially documented here2. When we try to run the command in PowerShell below this is what happens:$excel = New-Object -ComObject...
  9. PowerShell 7 compatibility with PowerShell 5

    in Windows 10 Gaming
    PowerShell 7 compatibility with PowerShell 5: Hi just like to ask if a ps1 script written in PowerShell 7 can be used in PowerShell 5 without any issues? https://answers.microsoft.com/en-us/windows/forum/all/powershell-7-compatibility-with-powershell-5/cb95ea7c-070c-4f1f-8d48-6f68d95c2cb1
  10. The Next Release of PowerShell - PowerShell 7

    in Windows 10 News
    The Next Release of PowerShell - PowerShell 7: Recently, the PowerShell Team shipped the Generally Available (GA) release of PowerShell Core 6.2. Since that release, we’ve already begun work on the next iteration! We’re calling the next release PowerShell 7, the reasons for which will be explained in this blog post. Why...