Published Folders are non-functional

Greetings all,

I have followed the instructions on publishing folders in PowerShell Universal, yet it always says 404 file not found. I even tried the exact PowerShell command that is listed as an example and created an htm file in that folder:

New-PSUPublishedFolder -Path C:\temp -RequestPath /docs -DefaultDocument @(“index.htm”)

As a workaround, I am installing OneDrive on the server and will have the users access the output Excel files that way until the feature is working again.

Product: PowerShell Universal
Version: 1.4.6

I don’t think you can browse to the root unless you have a default document ( per the documentation). did you try browsing directly to a file in that path (example I just tested and it works for me. I am on version 2.6.2, your post says you are on 1.4.6?

Default documents allow you to load files when a user specifies the folder and not the document within a folder. This can be handy when a user visits /docs but does not specify /docs/index.html . Instead of returning a 404, you can return the index.html when the user specifies /docs .

If this is not helpful, sorry.

1 Like

Howdy I am on the latest version not sure why it put that early version in the comment. I have found that if it is a normal text document that can be parsed it will display. Any other file, including .xlsx, are not returned. The goal is to have the browser download the file but I don’t see that as possible.

Thank you! Appreciate the help Mike!

I put an xlsx file in the folder and my browser downloaded it. This will probably be a browser setting and how it handles xlsx on your system.
This is in my edge.

For a quick test you can create a simple html file that has a href that you can right click and download link just to make sure the url is working “not sure how to insert code as so i removed the opening tags”

a href=“”>test

Hope this helps,

1 Like

Thanks Mike!

It actually started working on its own…somehow. The files download in Chrome and Opera! Progress is being made!


1 Like