It turns out there’s a lot to getting Powershell to connect to FTP servers. Here’s two functions I’ve written that can list FTP contents and download files. Enjoy.
VMWare released “Photon” earlier this week, which is a lightweight Linux OS for hosting Docker containers. It’s amazingly slim like CoreOS and deploys in a matter of seconds. I gave it a spin today and it worked pretty well. Installing it on vSphere was pretty straightforward following documentation on the Photon GitHub site. Once it was installed, I needed to make a few changes to get it working smoothly.
Setting the proxy
If your environment uses a proxy to connect to the internet, continue with this section. If not, skip.
First, create a new directory to store the extra configuration.
|
|
Next, create a http-proxy.conf
file in the directory and edit it.
|
|
Add the following information to the file (substituting where necessary) and save with Ctrl + X
.
|
|
Reload the systemd
daemon and restart Docker.
|
|
Docker now has access to the internet.
Allow Docker connection via TCP
By default, Docker only allows connection through UNIX sockets. Since we will be controlling it via the Windows client, we need TCP access.
Open up the Docker service file in nano
|
|
Edit the Service -> ExecStart
line to allow TCP connections by changing:
|
|
to
|
|
Reload the systemd
daemon and restart Docker.
|
|
Upgrade the Docker binary
Photon comes with Docker 1.5.0 but unfortunately the Windows client only works with 1.6.0 and above.
If you are using a corporate proxy, you will first need to set the http_proxy
environmental variable so wget
works
|
|
Download the Docker 1.6.0 binary
|
|
Move the binary to /bin/
and mark it as executable
|
|
You will now have Docker 1.6.0 running.
Connecting from Windows
Download Docker 1.6.0 for Windows from Docker.com - 32-bit or 64-bit and open PowerShell in that directory. At this point I recommend renaming the file to docker.exe
.
To connect to the Photon host, run the following:
|
|
This will show information about the Docker host like so:
|
|
You are now connected!
To install (requires a restart):
dism /online /Enable-Feature /FeatureName:Internet-Explorer-Optional-amd64
To uninstall (doesn’t require a restart):
dism /online /Disable-Feature /FeatureName:Internet-Explorer-Optional-amd64
This is a possible scenario that can happen with Veeam and Server 2012 deduplication:
|
|
To fix this unfortunately you need to start a whole new chain on a new volume. When formatting the volume, use format drive: /fs:ntfs /v:volumelabel /Q /L
. The /Q
switch does a quick format, and the /L
switch enables large-size file records.
Unfortunately this switch isn’t very well documented - it’s not even in the format.exe
knowledgebase article. You can however get some information from format /?
in command prompt.
|
|
A Microsoft primer on how NTFS works (Source.aspx)) sheds some light but it doesn’t show you the limit of setting large-size file records.
Reference: Microsoft KB2891967
I ran in to an issue with a user getting a 400 error on an IIS server. Turns out it was related to a large Kerberos token size due to being in too many groups. Here is a little script to enumerate the information you need to determine the token size:
This is all outlined in Microsoft KB327825 and relates to Microsoft KB2020943.