You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
New-TemporaryDirectory or New-TemporaryItem or New-Item -Temporary #25754
Issue-Enhancementthe issue is more of a feature request than a bugResolution-No ActivityIssue has had no activity for 6 months or moreUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdletsgeneral cmdlet issuesWG-ReviewedA Working Group has reviewed this and made a recommendation
Currently, there is only one option for creating temporary items without relying on [System.IO] calls and that is New-TemporaryFile.
Since users subjected to Constrained (CLM) or Restricted (RLM) Language Modes can not use [System.IO], if they want to create a directory, they must use:
New-TemporaryFile|% { rm $_; ni $_-ItemType Directory }
The WG has discussed this idea and agrees that it is a worthwhile addition. The recommended proposal is to create a cmdlet called New-TemporaryDirectory that follows the pattern of New-TemporaryFile.
This issue has not had any activity in 6 months, if there is no further activity in 7 days, the issue will be closed automatically.
Activity in this case refers only to comments on the issue. If the issue is closed and you are the author, you can re-open the issue using the button below. Please add more information to be considered during retriage. If you are not the author but the issue is impacting you after it has been closed, please submit a new issue with updated details and a link to this issue and the original.
Issue-Enhancementthe issue is more of a feature request than a bugResolution-No ActivityIssue has had no activity for 6 months or moreUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdletsgeneral cmdlet issuesWG-ReviewedA Working Group has reviewed this and made a recommendation
Activity
jdhitsolutions commentedon Nov 19, 2025
The WG has discussed this idea and agrees that it is a worthwhile addition. The recommended proposal is to create a cmdlet called
New-TemporaryDirectorythat follows the pattern ofNew-TemporaryFile.Add New-TemporaryDirectory cmdlet
Add New-TemporaryDirectory cmdlet (Fixes PowerShell#25754)
Add New-TemporaryDirectory cmdlet (Fixes PowerShell#25754)
microsoft-github-policy-service commentedon May 30, 2026
This issue has not had any activity in 6 months, if there is no further activity in 7 days, the issue will be closed automatically.
Activity in this case refers only to comments on the issue. If the issue is closed and you are the author, you can re-open the issue using the button below. Please add more information to be considered during retriage. If you are not the author but the issue is impacting you after it has been closed, please submit a new issue with updated details and a link to this issue and the original.
Add New-TemporaryDirectory cmdlet (Fixes PowerShell#25754)
Add New-TemporaryDirectory cmdlet (Fixes PowerShell#25754)