dpa89292 2016-09-07 15:11
浏览 48

too long

I'm an app engineer and I've set up an application dashboard using SQL Server and PHP on IIS to help monitor the app vitals. I also script a lot of processes using PowerShell and I'm trying to get to where I can run a PowerShell Script from my site and have that script loop through several different remote servers to perform tasks. I already built the form in PHP and the form correctly $_POST the environmental variable to the PS script but when it reaches out to the remote server I get the error:

test-path : Access is denied At C:\scripts\functions\scriptUser.ps1:69 char:6 + if(test-path \$server\e$\Path\to\file){ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : PermissionDenied: (\SERVER1...\path\to\file:String) [Test-Path], UnauthorizedAccessException + FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.PowerShell.Commands.TestPathCommand

I've tried setting the Application Pool in IIS to run as NETWORK SERVICE and added the DOMAIN\SERVERNAME$ to an AD group that has admin rights over the remote servers. I've even granted that server rights to the specific file paths.

I've tried setting the Applicaiton Pool to run as a network account that we've built in AD that is in the same AD group that provides admin rights.

If I run the PS1 script to just pass back the information that PHP sends it it works fine so I know the script is being accessed, it just can't access the remote servers.

I'm open to ideas if there is a better way to do this.

Thanks for the help!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 keil的map文件中Image component sizes各项意思
    • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
    • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
    • ¥15 划分vlan后,链路不通了?
    • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
    • ¥15 Vue3 大型图片数据拖动排序
    • ¥15 Centos / PETGEM
    • ¥15 划分vlan后不通了
    • ¥20 用雷电模拟器安装百达屋apk一直闪退
    • ¥15 算能科技20240506咨询(拒绝大模型回答)