Powershell - Create New folder from Site ID - I have completed most of this just the last part - iis 7/ 7.5


  • Hi Guys/ Girls, 

    I need help regarding IIS - I want to fetch the Website ID and Create a new folder in a directory. However i have the powershell code below; but i need - 

    -----> Get Website ID ------> ID = "1" ------> Create a new folder in a directory ------> Folder name should be website ID "1" 

    PS C:\> Get-Website | Where-Object {$_.Name -match "Default Web Site"} | Select-Object -ExpandProperty ID
    PS C:\> New-Item c:\scripts\Windows PowerShell -type directory

    Tuesday, December 17, 2013 4:33 PM


All replies