I am using Powershell and BMC for automation, I have created a Powershell script to create a folder:
$directoryname= "D:\sysdba"
$DoesFolderExist = Test-Path $directoryname
$null = if (!$DoesFolderExist){MKDIR "$directoryname"}
$directoryname= "D:\temp"
$DoesFolderExist = Test-Path $directoryname
$null = if (!$DoesFolderExist){MKDIR "$directoryname"}
I am using below command to create folder on host server:
<commands>
<command>\\Path\SPUpgrade\Create_Folder.ps1</command>
</commands>
But it is creating a file instead of folder:
Any idea why? I am confused as why not creating folder and why file