I have the following code in my PSADT to remove a printer that has been added via a print server. As we use PSADT and deploy via SCCM, it uses a system account and as a result the system account cannot see the network printer in order to delete it. I therefore need to amend the following code so that powershell can run this line of code only as the currently logged on user.
You can run SCCM Applications and SCCM Packages in the context of the currently logged on user. For questions related to PSAppDeployToolkit you may ask your question in their forum
Regardless of that - when you post code or error messages please format it as code using the preformatted text button ( </> ).
Simply place your cursor on an empty line, click the button and paste your code.
I dont want the whole package to be run as currently logged on user. I need most of it run by the system account but just need that deletion of printer run as currently logged on user. Any chance you can help me with the PSADT code?
I have posted on the web link you provided however my account has not been activated for some time hence why I have posted on here.