PS C:\Windows\System32> Fictional-CmdletName1 $Null -NamedParameter1 "TempPolicy1"Remove-CsApplicationAccessPolicy -identity "TempPolicy1" -global $null Fictional-CmdletName1: The term 'Fictional-CmdletName1' is not recognized as a name of a cmdlet, func

David COOPER 0 Reputation points
2026-11-21T07:53:50.0133333+00:00

powershell not recognizing reccomended arguments and terms eg:$null when executing sugested commands

Windows for business | Windows Server | User experience | PowerShell

3 answers

Sort by: Oldest
  1. AI answer

    2026-11-21T07:54:02.4833333+00:00

    $null is a valid automatic variable in PowerShell. The problem in the shown command is not that PowerShell fails to recognize $null; the command syntax is incorrect.

    Remove-CsApplicationAccessPolicy deletes an existing application access policy and the documented example is:

    Remove-CsApplicationAccessPolicy -Identity "ASimplePolicy"
    

    For TempPolicy1, use:

    Remove-CsApplicationAccessPolicy -Identity "TempPolicy1"
    

    Key points:

    1. Grant-CsApplicationAccessPolicy does not accept $null as a parameter value for removing the policy globally.
    2. To remove the policy itself, use Remove-CsApplicationAccessPolicy.
    3. $null in PowerShell represents a null value, and using an uninitialized variable also evaluates to $null.
    4. If PowerShell says a term is not recognized, that specific term is being interpreted as a cmdlet or command name. In the shown input, Fictional-CmdletName1 is not a valid cmdlet name.

    If commands are being pasted from a web page or document, run only the actual cmdlet line and remove any extra text before or after it.


    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

  2. Marcin Policht 113.9K Reputation points MVP Volunteer Moderator
    2026-11-21T14:24:12.5266667+00:00

    This is not a valid PowerShell syntax. PowerShell is attempting to execute Fictional-CmdletName1, which is likely a placeholder name rather than an actual cmdlet. The command to use would have been copied with placeholder text or concatenated with another command.

    $null is a valid PowerShell automatic value representing null. It is not a command and should not generate a "term not recognized" error when used correctly as a parameter value.

    Your actual command appears to be:

    Remove-CsApplicationAccessPolicy -Identity "TempPolicy1" -Global $null
    

    However, if the intent is to remove the policy named TempPolicy1, the command should be:

    Remove-CsApplicationAccessPolicy -Identity "TempPolicy1"
    

    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    Was this answer helpful?

    0 comments No comments

  3. MotoX80 37,951 Reputation points
    2026-11-22T13:41:04.8433333+00:00

    The title to your question all runs together, so it's difficult to interpret exactly what you are doing.

    I'll comment on this part: The term 'Fictional-CmdletName1' is not recognized as a name of a cmdlet, func

    Your current working directory is C:\Windows\System32. I would expect that your cmdlet file is stored in some other directory. So to execute it, you would need to provide the full path to the file.

     C:\users\me\documents\scripts\Fictional-cmdletname1.ps1 -parm1 -parm2
    

    If the .ps1 file exists in the current working directory, then you can "dot source" it.

    cd C:\users\me\documents\scripts\
    .\Fictional-cmdletname1 -parm1 -parm2
    

    What I have is a folder, c:\Utils, where I put all my scripts and useful tools like the Sysinternals programs. C:\Scripts would be another good name. You need to add that folder name to your system PATH environment variable so that Windows can "find" your scripts when your current working directory is some other folder like C:\Windows\System32.

    Then you can just run the cmdlet.

    Fictional-cmdletname1 -parm1 -parm2
    

    If you need additional help, I would recommend that you use the snipping tool and post an image of the Powershell window so that we can see exactly what you are typing in.

    Was this answer helpful?

    0 comments No comments

Your answer

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