Creating Folders using Power Shell

Hi Team i am trying to create a folders using the power shell comand i have saved the below script in a text file and then i use the read text file activity and save the output in a variable

using the below scipt

Specify the path

$path = “C:\”

Specify the folder name

$folderName = “NewFolder”

Combine the path and folder name

$fullPath = Join-Path -Path $path -ChildPath $folderName

Check if the folder already exists

if(Test-Path -Path $fullPath)
{
Write-Output “Folder $fullPath already exists.”
}
else
{
# Create a new folder
New-Item -ItemType Directory -Path $fullPath
Write-Output “Folder $fullPath has been created.”
}

In the “command text” i save the varaiable which i created in the read text activity
What shoud be the Input and parameters in this case?
i have ticked the “isScript” box.

whats should be the PowerShellVaraiables and TypeArgument

Are there any reasons why it is done with powershell and not modelled within UiPath?

Reason power shell is used for the speed

we would doubt a performance boost using Powershell and get called by UiPath for creating a single folder

However you can have a look by using PowerShellVariables for passing it to the PS Script