Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1765
  • Last Modified:

Add Virtual Directory to FTP Site in IIS7.5 to remote server

I have FTP site in server A (windows server 2008 r2). I'm running powershell script in server B (windows server 2008 r2).

I would like to add virtual directory to my FTP site in server A from server B by powershell. Could someone guide me how I can do this.

Thanks in advance :)
0
thaapavuori
Asked:
thaapavuori
  • 4
  • 3
1 Solution
 
Bryan ButlerCommented:
Here's a couple links that might help;

New-PowerShellVirtualDirectory
http://technet.microsoft.com/en-us/library/dd335058.aspx

Create a virtual directory application using powershell
http://archive.msdn.microsoft.com/pavanpenugonda
0
 
Bryan ButlerCommented:
Although this is probably your best bet:
Duplicating Virtual Directories
http://www.sqlmag.com/article/vbscript/duplicating-virtual-directories
0
 
thaapavuoriAuthor Commented:
Thanks. But how I can connect to IIS in remote computer by powershell?

I have command:

New-Item 'iis:\sites\ftp\username' -type virtualdirectory -Physicalpath c:users\username

This is working in this computer where my FTP site is located but I would like to use this command from remote computer.
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
Bryan ButlerCommented:
How about this link:

http://stackoverflow.com/questions/3581930/how-to-make-a-created-virtual-directory-in-iis6-0-as-application-using-powershell

Which has the command:
Import-Module WebAdministration
New-WebVirtualDirectory -Site "Default Web Site" -Name ContosoVDir `
                        -PhysicalPath c:\inetpub\contoso


Or this has it creating directories:

http://arcware.net/creating-iis-applications-with-powershell
0
 
thaapavuoriAuthor Commented:
Hi,

There is no any swich that could connect to remote computer....

Timo
0
 
Bryan ButlerCommented:
To be clear, do you want to run this through IIS or from the command line, or whatever you can do to get it done?  

If you want to do a remote execute from the command line, here's some info and I can get the exact command line if you need it.
http://technet.microsoft.com/en-us/library/dd819505.aspx

For IIS and "whatever", there's info in the previous links.  So, please let us know.
0
 
thaapavuoriAuthor Commented:
Thanks this link was help ful.
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now