Create a folder in PowerShell

To create a folder in PowerShell, you have to use the New-Item cmdlet indicating the location and name of the folder and put the itemType parameter with the value Directory to indicate that you want a folder.

Example to create the SharedFolder folder at the root of drive C:

Once the order is validated, the result of the order is displayed:

The New-Item cmdlet is used in PowerShell to create different types like folders, registry key, file …





Related Posts


GPO: Folder Redirection – Advanced Settings

Table Of ContentsIntroductionPreparation of the environmentCreating Group Policy for Folder RedirectionGroup Policy Test Introduction In a previous tutorial: GPO: User Folder Redirection, I explained

Active Directory: Joining a Computer to a Domain at the Command Line

Introduction The Active Directory domain join of a computer can be done using either the GUI or using command line and PowerShell. In this tutorial, I will explain how to join a computer to a domain u

Administer Windows Remote Server in PowerShell with PSSession

Introduction In this tutorial, we will see how to remotely administer a Windows server in PowerShell (Powershell remoting) with PSSession. PSSession is the prefix of several Powershell commands that a