Open ft3411 opened 11 months ago
I'm a bit confused on what the ask is in this issue? This has existed in this way since v1.0 release, or there abouts.
Are you asking that we document this to make it more known as an install requirement?
The issue appeared after upgrading to Version 2. There were no errors with version 1 on the same system. I thought that some kind of errorhandling would be great when the module cannot be loaded because the temp path is not accessible.
Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
When using dbatools Version 2 several DLLs are loaded by dbatools.library. This requires access to the TEMP-Path. When trying to load dbatools in a script within a SQL Server Agent Job, there is no user profile loaded and the TEMP-Path points to C:\windows\temp. By default users are not allowed to write to this path. Allowing users write access to C:\WINDOWS\TEMP solves the problem.
It was quite hard to find the cause for this huge error message:
Steps to Reproduce
Please confirm that you are running the most recent version of dbatools
2.1.2
Other details or mentions
No response
What PowerShell host was used when producing this error
Windows PowerShell (powershell.exe)
PowerShell Host Version
PSVersion 5.1.22621.2428
SQL Server Edition and Build number
SQL Server 2019 (15.0.4335.1)
.NET Framework Version
4.7