I have created a constrained endpoint on an admin tools server that can only run certain modules, scripts, and proxy function. One script in particular installs a shared network printer to the print server and adds a cname record in dns utilizing Add-Printer and Add-DnsServerRecsourceRecordCNAME pointing to the and . If I run the script on a localhost with a elevated powershell, the scripts run correctly. However, if I attempt to run the script as the constrained endpoint using Enter-PsSession using the configuration file, the scripts fails to connect to the dns server or print server.
Can this be done using Enter-PsSession? or is there an alternative method to connect to a dns and print server.
Thank you in advance for your help.