We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

View Complete Thread
  • Re: 'Object reference not set to an instance of an object' error in IIS Powershell

    Jun 11, 2009 10:05 PM|sergeia|LINK

    Mike, I think what you see is the problem with access from PowerShell to your remote home holder.

    In my questions when I asked to show output from 'dir iis:\sites\parentSite' I meant 'parentSite' for your vdir, i.e. in your case it is 'Default Web Site'. And I suspect that you will get the same error.

    Now, when new-webvirtualdirectory is getting processed, PowerShell checks existance of its home folder. I see that you have this error:

    Output for dir \\alliance\dwebdfs02\iisapps\TestWACSFullTrust\1.1.0.0\:

    Get-ChildItem : Object reference not set to an instance of an object.

    It means you cannot access  home folder of your new vdir, and it causes an error. Please confirm if this is the case. If it is, then it is generic issue with PowerShell access to this folder, because this command above is executed on file system provider.

     

    --Sergei