unable to remove PhysicalPath

Hello

trying to remove an application from a site, i get the error:

Could not find mandatory property PhysicalPath. Add this property and try again.

  • CategoryInfo : ObjectNotFound: (root/Microsoft/…gurationManager:String) [], CimException
  • FullyQualifiedErrorId : MI RESULT 6
  • PSComputerName : web1

I set the ensure field to ‘absent’

{
ShortName = "BSroot"
DNSSuffix = "123.com"
SiteAuthors = ('ME')
State = "Started"
IISAnonymousAuth = 'Enabled'
IISAnonymousUser = 'IUSR'
Enable32Bit = "Enabled"
Nodes = ('web1',WEB2')

Applications = @(
@{
Name = 'BS'
Authors = ('users')
IISAnonymousUser = 'IUSR'
IISWindowsAuth = 'Enabled'
PhysicalPath = 'Unique'
Ensure = 'absent'
}
)

 

 

Is it possible to show the configuration script ? Please check the physicalpath as well, it should be a valid directory location.

the entire script is over 7000 lines.

Not sure why i cant remove this one application i was thinking maybe something to do with this site has the application physicalpath as unique but it does exist currently under windows, permissions look correct.

@{
ShortName = "Bsroot"
DNSSuffix = "123.com"
SiteAuthors = ('ME')
State = "Started"
IISAnonymousAuth = 'Enabled'
IISAnonymousUser = 'IUSR'
Enable32Bit = "Enabled"
Nodes = ('WEB1', 'WEB2')
Applications = @(
@{
Name = 'BS1'
Authors = ('users')
IISAnonymousUser = 'IUSR'
IISWindowsAuth = 'Enabled'
PhysicalPath = 'Unique'
Ensure = "Absent"
}
)
}

Do a Get-WebApplication and see the physicalpath