- Remove From My Forums
-
Question
-
Hi All,
I did gpresult on windows server 2003 32-bit SP2 on branch site and found report on startup scripts part: This script has not yet been executed.
Environment:
— Windows Server 2003 as domain member on branch site with link 128 kbps.
— All Domain Controllers are Windows Server 2003 SP2 32-Bit with Forest and Domain Functional Level: Windows Server 2003.
— OU for containing branch servers computer object created and this GPO linked to this OU
Using the same group policy setting, vbscript, and computer object OU placement on development environment (virtualized), this startup script on GPO run smoothly.
Then, how is the step-by-step guide to troubleshoot this kind of problem?
Thanks a lot for your help.
Below is screenshot of GPO report from GPMC:
Security Filtering
The settings in this GPO can only apply to the following groups, users, and computers:
Name NT AUTHORITYAuthenticated Users WMI Filtering
WMI Filter Name None Description Not applicable Delegation
These groups and users have the specified permission for this GPO
Name Allowed Permissions Inherited NT AUTHORITYAuthenticated Users Read (from Security Filtering) No NT AUTHORITYENTERPRISE DOMAIN CONTROLLERS Read No NT AUTHORITYSYSTEM Edit settings, delete, modify security No FORNETDomain Admins Edit settings, delete, modify security No FORNETEnterprise Admins Edit settings, delete, modify security No Computer Configuration (Enabled)
Windows Settings
Scripts
Startup
Name Parameters RstPwd.vbs Administrative Templates
System/Group Policy
Policy Setting Enabled Connection speed (Kbps): 0 Enter 0 to disable slow link detection. Policy Setting Enabled Do not apply during periodic background processing Disabled Process even if the Group Policy objects have not changed Enabled Policy Setting Enabled Allow processing across a slow network connection Enabled Do not apply during periodic background processing Disabled Process even if the Group Policy objects have not changed Enabled Policy Setting Enabled Allow processing across a slow network connection Enabled Do not apply during periodic background processing Disabled Process even if the Group Policy objects have not changed Enabled System/Logon
System/Scripts
User Configuration (Disabled)
- Remove From My Forums
-
Question
-
Hi All,
I did gpresult on windows server 2003 32-bit SP2 on branch site and found report on startup scripts part: This script has not yet been executed.
Environment:
— Windows Server 2003 as domain member on branch site with link 128 kbps.
— All Domain Controllers are Windows Server 2003 SP2 32-Bit with Forest and Domain Functional Level: Windows Server 2003.
— OU for containing branch servers computer object created and this GPO linked to this OU
Using the same group policy setting, vbscript, and computer object OU placement on development environment (virtualized), this startup script on GPO run smoothly.
Then, how is the step-by-step guide to troubleshoot this kind of problem?
Thanks a lot for your help.
Below is screenshot of GPO report from GPMC:
Security Filtering
The settings in this GPO can only apply to the following groups, users, and computers:
Name NT AUTHORITYAuthenticated Users WMI Filtering
WMI Filter Name None Description Not applicable Delegation
These groups and users have the specified permission for this GPO
Name Allowed Permissions Inherited NT AUTHORITYAuthenticated Users Read (from Security Filtering) No NT AUTHORITYENTERPRISE DOMAIN CONTROLLERS Read No NT AUTHORITYSYSTEM Edit settings, delete, modify security No FORNETDomain Admins Edit settings, delete, modify security No FORNETEnterprise Admins Edit settings, delete, modify security No Computer Configuration (Enabled)
Windows Settings
Scripts
Startup
Name Parameters RstPwd.vbs Administrative Templates
System/Group Policy
Policy Setting Enabled Connection speed (Kbps): 0 Enter 0 to disable slow link detection. Policy Setting Enabled Do not apply during periodic background processing Disabled Process even if the Group Policy objects have not changed Enabled Policy Setting Enabled Allow processing across a slow network connection Enabled Do not apply during periodic background processing Disabled Process even if the Group Policy objects have not changed Enabled Policy Setting Enabled Allow processing across a slow network connection Enabled Do not apply during periodic background processing Disabled Process even if the Group Policy objects have not changed Enabled System/Logon
System/Scripts
User Configuration (Disabled)
- Remove From My Forums
-
Question
-
Hello,
My objective is to run a Powershell Script as a startup script in a GPO and set the SACL on a file for auditing purposes. The server is a Server 2008 R2 SP1 server. After I reboot the server and determine the GPO applied successfully to the server,
it seems like the script never runs cause in my Group Policy GPResult it says ‘This script has not yet been executed’ and this status stays like this. The script is in the Startup scripts folder in the GPO in Sysvol and it runs fine outside of the
GPO. Do I need any special permissions here? What else am I missing? The script I attempt to run follows:$ACL = new-object System.Security.AccessControl.DirectorySecurity
$AccessRule = new-object System.Security.AccessControl.FileSystemAuditRule(«everyone»,»Modify»,»ContainerInherit,
ObjectInherit», «None»,»success»)
$ACL.SetAuditRule($AccessRule)
$ACL | Set-Acl «C:NewFolder.txt»
set-content c:ps.log $errorThanks in advance for the help.
MTV99
Answers
-
no, not a requirement at all, just saying what i’ve had luck with.
we dont have a 2k8 domain so my GPOs dont say powershell specifically, so i’ve found it safer (less configuration issues) if i use a bat file, and it doesnt really bother me to do it that way.
maybe the GPO forum can provide some more places to look for errors. I suspect if you are using the GPO powershell tab to run the script there must be some way to diagnose it.
maybe look on the server hosting the script file and put an audit on it to make sure the host is at least touching the script file?
i’d try the batch file just to see if it has something to do with how GPO’s handle Powershell scripts. thats a new one to me so i dont know what it does to execute PS scripts from the GPO. it certainly doesnt just call it i imagine
-
Marked as answer by
Saturday, March 19, 2011 10:50 PM
-
Marked as answer by
-
The Group Policy editor on Windows Server 2008 R2 has a new «PowerShell Scripts» tab when you view Startup scripts. If you select this tab, then click «Add» to add a startup script, then «Browse» to view the files in the Startup folder, you can select
your *.ps1 file. I tried this and the PowerShell script ran fine during Startup (on computers with PowerShell). See this link for details:http://social.technet.microsoft.com/Forums/en-US/winserverGP/thread/a1a86fd9-70a2-4cb9-8d15-c25a53c28b75
Richard Mueller — MVP Directory Services
-
Marked as answer by
mtv99
Monday, March 21, 2011 1:26 PM
-
Marked as answer by
- Remove From My Forums
-
Question
-
Hello,
My objective is to run a Powershell Script as a startup script in a GPO and set the SACL on a file for auditing purposes. The server is a Server 2008 R2 SP1 server. After I reboot the server and determine the GPO applied successfully to the server,
it seems like the script never runs cause in my Group Policy GPResult it says ‘This script has not yet been executed’ and this status stays like this. The script is in the Startup scripts folder in the GPO in Sysvol and it runs fine outside of the
GPO. Do I need any special permissions here? What else am I missing? The script I attempt to run follows:$ACL = new-object System.Security.AccessControl.DirectorySecurity
$AccessRule = new-object System.Security.AccessControl.FileSystemAuditRule(«everyone»,»Modify»,»ContainerInherit,
ObjectInherit», «None»,»success»)
$ACL.SetAuditRule($AccessRule)
$ACL | Set-Acl «C:NewFolder.txt»
set-content c:ps.log $errorThanks in advance for the help.
MTV99
Answers
-
no, not a requirement at all, just saying what i’ve had luck with.
we dont have a 2k8 domain so my GPOs dont say powershell specifically, so i’ve found it safer (less configuration issues) if i use a bat file, and it doesnt really bother me to do it that way.
maybe the GPO forum can provide some more places to look for errors. I suspect if you are using the GPO powershell tab to run the script there must be some way to diagnose it.
maybe look on the server hosting the script file and put an audit on it to make sure the host is at least touching the script file?
i’d try the batch file just to see if it has something to do with how GPO’s handle Powershell scripts. thats a new one to me so i dont know what it does to execute PS scripts from the GPO. it certainly doesnt just call it i imagine
-
Marked as answer by
Saturday, March 19, 2011 10:50 PM
-
Marked as answer by
-
The Group Policy editor on Windows Server 2008 R2 has a new «PowerShell Scripts» tab when you view Startup scripts. If you select this tab, then click «Add» to add a startup script, then «Browse» to view the files in the Startup folder, you can select
your *.ps1 file. I tried this and the PowerShell script ran fine during Startup (on computers with PowerShell). See this link for details:http://social.technet.microsoft.com/Forums/en-US/winserverGP/thread/a1a86fd9-70a2-4cb9-8d15-c25a53c28b75
Richard Mueller — MVP Directory Services
-
Marked as answer by
mtv99
Monday, March 21, 2011 1:26 PM
-
Marked as answer by
- Remove From My Forums
-
Вопрос
-
Здравствуйте. Я создал групповую политику, на выполнение powershell скрипта для резервного копирования при выключении компьютера. При запуске вручную все отрабатывает нормально, но при выключении ничего не происходит.
Скрипт подписан сертификатом, который добавлен в доверенные. На контроллере домена windows 2008 r2 standart, на клиентских — windows 7. Powershell обновлен до 3 версии.
Создал тестовый скрипт на создание папки, он отработал нормально, соответственно проблема в скрипте.
#connect network disk $net = New-Object -ComObject WScript.Network $user = "**" $pwd = "**" $drive = "m:" $path = "\192.168.1.60backup$env:COMPUTERNAME" $net.mapnetworkdrive($drive, $path, "true", $user, $pwd) #check 7zip if (-not (test-path "C:\Program Files7-Zip7z.exe")) {throw "$env:ProgramFiles7-Zip7z.exe needed"} set-alias sz "$env:ProgramFiles7-Zip7z.exe" # function create-7zip([String] $aDirectory, [String] $aZipfile){ [string]$pathToZipExe = "C:Program Files7-zip7z.exe"; [Array]$arguments = "a", "-tzip", "$aZipfile", "$aDirectory"; & $pathToZipExe $arguments; } $data = Get-Date -Format d create-7zip "D:Проект" "D:tempпроектproject_$data.zip" copy-item -path D:tempпроектproject_$data.zip -destination M:проект
Из-за чего он может не выполняться?
-
Изменено
21 февраля 2013 г. 15:33
-
Изменен тип
Maksim MarinovMicrosoft contingent staff, Moderator
18 марта 2013 г. 11:54
Тема не активна -
Изменен тип
Vasily GusevModerator
23 мая 2013 г. 14:25
-
Изменено
Ответы
-
Похоже дело было в том, что имя файла скрипта было с пробелом
-
Помечено в качестве ответа
Vasily GusevModerator
23 мая 2013 г. 14:25
-
Помечено в качестве ответа
0 / 0 / 0 Регистрация: 21.04.2014 Сообщений: 3 |
|
1 |
|
Через групповые политики не подключаются сетевые диски21.04.2014, 13:34. Показов 3825. Ответов 3
Доброго времени суток!
__________________
0 |
Заблокирован |
|
21.04.2014, 13:53 |
2 |
Нафига это делать через скрипт вообще???
0 |
0 / 0 / 0 Регистрация: 21.04.2014 Сообщений: 3 |
|
21.04.2014, 13:56 [ТС] |
3 |
имеется ввиду то, что можно через политики сопоставить диски? Дисков много, поэтому скриптом проще. Или что то другое?
0 |
0 / 0 / 0 Регистрация: 21.04.2014 Сообщений: 3 |
|
23.04.2014, 05:47 [ТС] |
4 |
ни у кого нет никаких мыслей по этому поводу?
0 |