ADSUTIL.VBS

MSDN Documentation here:
MSDN AdsUtil.vbs

According to this TechNet article, you should be able to view, create and delete Virtual Directories in the IIS7 GUI admin tool, but I had difficulties with it.

AdsUtil can be found here: c:inetpubAdminScripts
(on machines running Windows 2008 and IIS7).
It’s a VB/Script (.vbs suffix) and you should always run it with CSCRIPT (the command prompt version of VBScript that causes all output to write to the console rather than popping up message boxes).

Why am I documenting this? I had a case using the BizTalk Deployment Framework (BTDF) from CodePlex where I had deleted a Virtual Application in IIS, but apparently a Virtual Directory was still remaining. When I ran the BTDF deploy function, it told me that the virtual directory already existed. I had to resort to some method of manually deleting it. In theory, with IIS7, we should be able to use APPCMD in c:inetpubAdminScripts, but I had some situations where ADSUTIL showed the VDIR and APPCMD did not.

Testing a Path with ADSUTIL

{!{code}!}czo5OTU6XCIKYzppbmV0cHViQWRtaW5TY3JpcHRzPmNzY3JpcHQgYWRzdXRpbC52YnMgRU5VTSAvVzNTVkMvMS9ST09UL1RGQklDLlJ7WyYqJl19Q1QuQml6VGFsawouT3JjaGVzdHJhdGlvbnMKTWljcm9zb2Z0IChSKSBXaW5kb3dzIFNjcmlwdCBIb3N0IFZlcnNpb24gNS43CkNvcHtbJiomXX15cmlnaHQgKEMpIE1pY3Jvc29mdCBDb3Jwb3JhdGlvbi4gQWxsICByaWdodHMgcmVzZXJ2ZWQuIAoKS2V5VHlwZSAgICAgICAgICAge1smKiZdfSAgICAgICAgICAgICAgOiAoU1RSSU5HKSBcIklJc1dlYlZpcnR1YWxEaXJcIgpBcHBSb290ICAgICAgICAgICAgICAgICAgICAgICAgIHtbJiomXX06IChTVFJJTkcpIFwiL0xNL1czU1ZDLzEvUk9PVC9URkJJQy5SQ1QuQml6VGFsay5PCnJjaGVzdHJhdGlvbnNcIgpBcHBGcmllbmRseU57WyYqJl19YW1lICAgICAgICAgICAgICAgICA6IChTVFJJTkcpIFwiVEZCSUMuUkNULkJpelRhbGsuT3JjaGVzdHJhdGlvbnNcIgpBcHBJc29sYXRle1smKiZdfWQgICAgICAgICAgICAgICAgICAgICA6IChJTlRFR0VSKSAwClBhdGggICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAoU1RSSU57WyYqJl19RykgXCJDOmluZXRwdWJ3d3dyb290VEZCSUMuUkNULkJpelRhbGsKLk9yY2hlc3RyYXRpb25zXCIKQXV0aEZsYWdzICAgICAgICAgICAge1smKiZdfSAgICAgICAgICAgOiAoSU5URUdFUikgMQpBdXRoQmFzaWMgICAgICAgICAgICAgICAgICAgICAgIDogKEJPT0xFQU4pIEZhbHNlCkF7WyYqJl19dXRoQW5vbnltb3VzICAgICAgICAgICAgICAgICAgIDogKEJPT0xFQU4pIFRydWUKQXV0aE5UTE0gICAgICAgICAgICAgICAgICAgIHtbJiomXX0gICAgOiAoQk9PTEVBTikgRmFsc2UKQXV0aE1ENSAgICAgICAgICAgICAgICAgICAgICAgICA6IChCT09MRUFOKSBGYWxzZQpBdXRoe1smKiZdfVBhc3Nwb3J0ICAgICAgICAgICAgICAgICAgICA6IChCT09MRUFOKSBGYWxzZQpBcHBQb29sSWQgICAgICAgICAgICAgICAgICAgICB7WyYqJl19ICA6IChTVFJJTkcpIFwiRGVmYXVsdEFwcFBvb2xcIgpOVEF1dGhlbnRpY2F0aW9uUHJvdmlkZXJzICAgICAgIDogKFNUUklORykgXCJOZXtbJiomXX1nb3RpYXRlLE5UTE1cIgpcIjt7WyYqJl19{!{/code}!}

Delete a Virtual Directory with ADSUTIL

{!{code}!}czoyNjM6XCIKYzppbmV0cHViQWRtaW5TY3JpcHRzPmNzY3JpcHQgYWRzdXRpbC52YnMgREVMRVRFIC9XM1NWQy8xL1JPT1QvVEZCSUN7WyYqJl19LlJDVC5CaXpUYQpsay5PcmNoZXN0cmF0aW9ucwpNaWNyb3NvZnQgKFIpIFdpbmRvd3MgU2NyaXB0IEhvc3QgVmVyc2lvbiA1LjcKQ3tbJiomXX1vcHlyaWdodCAoQykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLiBBbGwgcmlnaHRzIHJlc2VydmVkLgoKZGVsZXRlZCBwYXRoIFczU1ZDe1smKiZdfS8xL1JPT1QvVEZCSUMuUkNULkJpelRhbGsuT3JjaGVzdHJhdGlvbnNcIgpcIjt7WyYqJl19{!{/code}!}

Leave a Reply

Recent Posts

Archives

Categories

Meta

All Rights Reserved Theme by 404 THEME.