Cannot perform New-PSDrive on SYSTEM account
Curious if anyone else is running into or has ran into this problem. I have a powershell script snapin that makes a samba share connection using the New-PSDrive command. In the past, this worked fine and I was able to connect to the drive and pull down the install files that were needed to install my programs. Recently (not sure what changed), the snapin script still runs, but it cannot make a connection to the drive using the SYSTEM account that the FOG client uses. I tested to make sure it wasn’t a share issue by using a few of the local accounts on a computer to run the script. I also used SysInternals to leverage the SYSTEM account to try and run the script that way. When doing that, the script fails at the New-PSDrive step with an error: “A specified logon session does not exist. It may already have been terminated.”
Things I’ve tried/checked:
Script runs under local accounts and connects to the network drive, as both normal user and Admin user.
Snapins that don’t involve mapping a network drive work fine.
I thought it might have been an issue with Windows 10’s new feature update, but it occurred on the latest feature update and the previous one that worked before.
Like i said, i don’t think this is a FOG issue, but just curious if anyone else maps network drives through scripting, and if anyone else has came across this issue.
Here’s an example of what my snapins look like for mapping network drives: