© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3w ago•
24 replies
Will Pittenger

Attempt to start new PowerShell Cmdlet assembly fails with PSNotSupportedException

othervisual studiointermediate
I created a new assembly for PowerShell Cmdlets. Everything was mostly copied over from other Cmdlet assemblies. But when I try to start assembly (which runs
Start-Debug.ps1
Start-Debug.ps1
) I get a PSNotSupportedException.

Is there a maximum PowerShell version for the Visual Studio 2022 package? I'm running PS 7.5.4. The error message doesn't list a requirement. I checked to see if the package was out of date, but it isn't.

System.Management.Automation.PSNotSupportedException
  HResult=0x80131515
  Message=Cannot perform the ClearContent operation. The ClearContent operation is not supported by this provider.
  Source=System.Management.Automation
  StackTrace:
   at Microsoft.PowerShell.Commands.SessionStateProviderBase.ClearContent(String path) in Microsoft.PowerShell.Commands\SessionStateProviderBase.cs:line 493
System.Management.Automation.PSNotSupportedException
  HResult=0x80131515
  Message=Cannot perform the ClearContent operation. The ClearContent operation is not supported by this provider.
  Source=System.Management.Automation
  StackTrace:
   at Microsoft.PowerShell.Commands.SessionStateProviderBase.ClearContent(String path) in Microsoft.PowerShell.Commands\SessionStateProviderBase.cs:line 493
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Progress Bar in PowerShell Cmdlet without changing the PowerShell Script (Write-Progress)
C#CC# / help
3y ago
Custom cmdlet giving me a missing assembly error
C#CC# / help
3y ago
Error with assembly
C#CC# / help
2y ago
❔ Powershell Cmdlet with C# Nuget packages. Can't find the Nuget assemblies when I run the module!
C#CC# / help
3y ago