Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use PsDownload module instead of Invoke-WebRequest #39

Open
JonathanPitre opened this issue Dec 5, 2023 · 5 comments
Open

Use PsDownload module instead of Invoke-WebRequest #39

JonathanPitre opened this issue Dec 5, 2023 · 5 comments

Comments

@JonathanPitre
Copy link
Contributor

We may able to get the last modified date with this module which would allow us to get rid of the Adobe Acrobat FTP code and also add a bunch of other admx files that has no versioning.

Have a look and tell me what you think:
https://github.com/DanGough/PsDownload

The modified date will be updated once download has complete to match the Last-Modified header if found.

@Karl-WE
Copy link

Karl-WE commented Feb 7, 2024

if technically possible an even better attempt in terms of performance would be using Start-BitsTransfer instead of

Invoke-WebRequest and no third party dependencies, too. would this help? @JonathanPitre
cc @msfreaks

about Adobe also consider #37

@JonathanPitre
Copy link
Contributor Author

I would copy the module code into a function instead of calling the module.

@Karl-WE
Copy link

Karl-WE commented Feb 20, 2024

Could you elaborate / file an example?

@JonathanPitre
Copy link
Contributor Author

Sure, I would just copy the code from https://github.com/DanGough/PsDownload/blob/main/PsDownload/Public/Invoke-Download.ps1 and paste it into the functions list on top to avoid loading the module every time. The module is not updated too often anyways.

I recommend you read the PsDownload Readme, it's faster than Invoke-WebRequest and Start-BitsTransfer. It also fixes other known issues.

@Karl-WE
Copy link

Karl-WE commented Feb 21, 2024

Ah I see now. Well if start-bittransfer is technically suitable I would really try to stick with it, it is fast and certainly fast enough for the job. But it is up to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants