Ошибка сценарий входа 1130

I have a powershell script I am trying to execute and I have placed it inside a GPO under Computer ConfigurationPoliciesWindows SettingsScriptsStartup. I receive and Event 1130 Error in the System log on the target PC with the a listing of the network share the script is contained, \domain.comSysVoldomain.comPolicies {GUID}Machine. I have made certain that the machine, authenticated users, domain computers all have at least read and execute permissions. Although, when I go to run the script directly from the path above after logon, I get Access is denied.

I have a powershell script I am trying to execute and I have placed it inside a GPO under Computer ConfigurationPoliciesWindows SettingsScriptsStartup. I receive and Event 1130 Error in the System log on the target PC with the a listing of the network
share the script is contained, \domain.comSysVoldomain.comPolicies {GUID}Machine. I have made certain that the machine, authenticated users, domain computers all have at least read and execute permissions. Although, when I go to run the script directly
from the path above after logon, I get Access is denied.

Other settings I have tried to get this script to run:

Under System/Group Policy, «Configure Environment preference extension policy processing»= Enabled with «Allow processing across slow network connection» also enabled as well as «Process even if group policy objects have not changed»
is enabled.

«Configure Network Options preference extension policy processing» is «Enabled»

«Configure Logon Script Delay» = Enabled and set to 0

Under SystemLogon, «Always wait for the network at computer startup and logon» = Enabled

Under Windows Components/Windows Powershell, «Turn on Script Execution» with Execution Policy set to «Allow local scripts and remote signed scripts».

How do I correct the error so as to allow logon.

I have a powershell script I am trying to execute and I have placed it inside a GPO under Computer ConfigurationPoliciesWindows SettingsScriptsStartup. I receive and Event 1130 Error in the System log on the target PC with the a listing of the network
share the script is contained, \domain.comSysVoldomain.comPolicies {GUID}Machine. I have made certain that the machine, authenticated users, domain computers all have at least read and execute permissions. Although, when I go to run the script directly
from the path above after logon, I get Access is denied.

Other settings I have tried to get this script to run:

Under System/Group Policy, «Configure Environment preference extension policy processing»= Enabled with «Allow processing across slow network connection» also enabled as well as «Process even if group policy objects have not changed»
is enabled.

«Configure Network Options preference extension policy processing» is «Enabled»

«Configure Logon Script Delay» = Enabled and set to 0

Under SystemLogon, «Always wait for the network at computer startup and logon» = Enabled

Under Windows Components/Windows Powershell, «Turn on Script Execution» with Execution Policy set to «Allow local scripts and remote signed scripts».

How do I correct the error so as to allow logon.

  • Remove From My Forums
  • Вопрос

  • Hello All, 

    I’m trying to apply the following computer startup script

    I’ve set up the following powershell script to disable NetBIOS

    $adapters=(gwmi win32_networkadapterconfiguration)
    Foreach ($adapter in $adapters){
      Write-Host $adapter
      $adapter.settcpipnetbios(2)
      }

    The script works fine locally. I added a schedule task under the SYSTEM account and it ran with no problems. It only fails in the computer startup via GPO
    This is the error I’m receiving via event viewer

     EventData 
    
      SupportInfo1 900986720 
      SupportInfo2 90 
      ErrorCode 267 
      ErrorDescription The directory name is invalid.  
      ScriptType 0 
      GPODisplayName Computer Starup Script - Disable NetBIOS over TCP/IP 
      GPOFileSystemPath \HERPSysVolDERPPolicies{GUID}Machine 
      GPOScriptCommandString Disable_NetBIOS_over_TCPIP.ps1 
    

    Any help would be appreciated.
    extra info. I’m testing this GPO on a windows 8.1 machine. This script works fine on a server 2008, server 2012, and server 2012 R2

Ответы

  • Hi Stephen,

    Based on the description, where is the startup script stored?  Please double make sure that the computer account in question has enough permissions to access the script.

    Regarding Event ID 1130, the following article can be referred to for more information.

    Event ID 1130 — Group Policy Scripts Processing

    https://technet.microsoft.com/en-us/library/dd392581(v=ws.10).aspx

    Best regards,

    Frank Shen


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Помечено в качестве ответа

      13 июля 2015 г. 2:20

I have a powershell script I am trying to execute and I have placed it inside a GPO under Computer ConfigurationPoliciesWindows SettingsScriptsStartup. I receive and Event 1130 Error in the System log on the target PC with the a listing of the network
share the script is contained, domain.comSysVoldomain.comPolicies {GUID}Machine. I have made certain that the machine, authenticated users, domain computers all have at least read and execute permissions. Although, when I go to run the script directly
from the path above after logon, I get Access is denied.

Other settings I have tried to get this script to run:

Under System/Group Policy, «Configure Environment preference extension policy processing»= Enabled with «Allow processing across slow network connection» also enabled as well as «Process even if group policy objects have not changed»
is enabled.

«Configure Network Options preference extension policy processing» is «Enabled»

«Configure Logon Script Delay» = Enabled and set to 0

Under SystemLogon, «Always wait for the network at computer startup and logon» = Enabled

Under Windows Components/Windows Powershell, «Turn on Script Execution» with Execution Policy set to «Allow local scripts and remote signed scripts».

How do I correct the error so as to allow logon.

I have a powershell script I am trying to execute and I have placed it inside a GPO under Computer ConfigurationPoliciesWindows SettingsScriptsStartup. I receive and Event 1130 Error in the System log on the target PC with the a listing of the network
share the script is contained, domain.comSysVoldomain.comPolicies {GUID}Machine. I have made certain that the machine, authenticated users, domain computers all have at least read and execute permissions. Although, when I go to run the script directly
from the path above after logon, I get Access is denied.

Other settings I have tried to get this script to run:

Under System/Group Policy, «Configure Environment preference extension policy processing»= Enabled with «Allow processing across slow network connection» also enabled as well as «Process even if group policy objects have not changed»
is enabled.

«Configure Network Options preference extension policy processing» is «Enabled»

«Configure Logon Script Delay» = Enabled and set to 0

Under SystemLogon, «Always wait for the network at computer startup and logon» = Enabled

Under Windows Components/Windows Powershell, «Turn on Script Execution» with Execution Policy set to «Allow local scripts and remote signed scripts».

How do I correct the error so as to allow logon.

  • Remove From My Forums
  • Вопрос

  • Hello All, 

    I’m trying to apply the following computer startup script

    I’ve set up the following powershell script to disable NetBIOS

    $adapters=(gwmi win32_networkadapterconfiguration)
    Foreach ($adapter in $adapters){
      Write-Host $adapter
      $adapter.settcpipnetbios(2)
      }

    The script works fine locally. I added a schedule task under the SYSTEM account and it ran with no problems. It only fails in the computer startup via GPO
    This is the error I’m receiving via event viewer

     EventData 
    
      SupportInfo1 900986720 
      SupportInfo2 90 
      ErrorCode 267 
      ErrorDescription The directory name is invalid.  
      ScriptType 0 
      GPODisplayName Computer Starup Script - Disable NetBIOS over TCP/IP 
      GPOFileSystemPath HERPSysVolDERPPolicies{GUID}Machine 
      GPOScriptCommandString Disable_NetBIOS_over_TCPIP.ps1 
    

    Any help would be appreciated.
    extra info. I’m testing this GPO on a windows 8.1 machine. This script works fine on a server 2008, server 2012, and server 2012 R2

Ответы

  • Hi Stephen,

    Based on the description, where is the startup script stored?  Please double make sure that the computer account in question has enough permissions to access the script.

    Regarding Event ID 1130, the following article can be referred to for more information.

    Event ID 1130 — Group Policy Scripts Processing

    https://technet.microsoft.com/en-us/library/dd392581(v=ws.10).aspx

    Best regards,

    Frank Shen


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Помечено в качестве ответа

      13 июля 2015 г. 2:20

Hello Spiceheads.

Our organization is currently working on rolling out Teams org-wide to replace Skype for Business, and part of that process involves me setting up a Group Policy to install Teams remotely to everyone’s computers.  I was originally going to simply deploy the .msi file for the Teams machine-wide installer, but then after some research, I discovered that only installs Teams for users signing into a PC for the first time, which wouldn’t help me at all right now, since I need it installed for everyone on their existing machine.  So, I did some more digging and found a handy PowerShell script that runs the regular .exe installer from a specified network share, after checking if Teams is already installed.

So, I placed the .exe installer in a network share that’s open to all authenticated users, added the powershell script as a Logon (user) script to a GPO linked to a test OU (with a test user and computer in it), and then ran logged off the computer and logged back in as the test user.  It didn’t install Teams, so I checked Event Viewer and found an error.  «Logon script failed», with an Event ID of 1130 and ErrorDescription of «Incorrect Function»  I’ve been doing some Googling and found several other posts, including on Spiceworks, that reported similar issues, but none helped me fix my issue.  I already double-checked the file permissions on the script and the .exe, so that’s not the problem.  I was also able to run the PowerShell script manually and it worked just fine, it’s just won’t run automatically via GP.  I did check the Execution Policy for PowerShell, and it says it’s Unrestricted, so that shouldn’t be the issue either.

The script is stored in the default <domain>SysVol<domain>Policies<policy>UserScriptsLogon folder, and the .exe is stored in our company share directory. I specified «-SourcePath <path>» for the script in GP; I tried with both the DNS name and the IP address, neither worked. 

Script: https://gallery.technet.microsoft.com/scriptcenter/Install-Teams-Desktop-b1ffd424 Opens a new window

Script author’s blog post with instructions: 

https://practical365.com/collaboration/teams/deploying-microsoft-teams-desktop-client/ Opens a new window

Script code: 

Powershell

<#
.SYNOPSIS
Install-MicrosoftTeams.ps1 - Microsoft Teams Desktop Client Deployment Script

.DESCRIPTION 
This PowerShell script will silently install the Microsoft Teams desktop client.

The Teams client installer can be downloaded from Microsoft:
https://teams.microsoft.com/downloads

.PARAMETER SourcePath
Specifies the source path for the Microsoft Teams installer.


.EXAMPLE
.Install-MicrosoftTeams.ps1 -Source mgmtInstallsMicrosoftTeams

Installs the Microsoft Teams client from the Installs share on the server MGMT.

.NOTES
Written by: Paul Cunningham

Find me on:

* My Blog:	http://paulcunningham.me
* Twitter:	https://twitter.com/paulcunningham
* LinkedIn:	http://au.linkedin.com/in/cunninghamp
* Github:	https://github.com/cunninghamp

For more Office 365 tips, tricks and news
check out Practical 365.

* Website:	http://practical365.com
* Twitter:	http://twitter.com/practical365

Change Log
V1.00, 15/03/2017 - Initial version
#>

#requires -version 4


[CmdletBinding()]
param (

	[Parameter(Mandatory=$true)]
	[string]$SourcePath

)


function DoInstall {

    $Installer = "$($SourcePath)Teams_windows_x64.exe"

    If (!(Test-Path $Installer)) {
        throw "Unable to locate Microsoft Teams client installer at $($installer)"
    }

    Write-Host "Attempting to install Microsoft Teams client"

    try {
        $process = Start-Process -FilePath "$Installer" -ArgumentList "-s" -Wait -PassThru -ErrorAction STOP

        if ($process.ExitCode -eq 0)
        {
            Write-Host -ForegroundColor Green "Microsoft Teams setup started without error."
        }
        else
        {
            Write-Warning "Installer exit code  $($process.ExitCode)."
        }
    }
    catch {
        Write-Warning $_.Exception.Message
    }

}

#Check if Office is already installed, as indicated by presence of registry key
$installpath = "$($env:LOCALAPPDATA)MicrosoftTeams"

if (-not(Test-Path "$($installpath)Update.exe")) {
    DoInstall
}
else {
    if (Test-Path "$($installpath).dead") {
        Write-Host "Teams was previously installed but has been uninstalled. Will reinstall."
        DoInstall
    }
}

It also looks like the script author is a Spicehead, so I tagged him as well (maybe? I think it’s the same person).

Event ID 1130 — Group Policy Scripts Processing

Updated: September 21, 2007

Applies To: Windows Server 2008

During Group Policy processing, the Scripts client-side extension is responsible for launching not only computer startup and shutdown scripts but also user logon and logoff scripts.

Event Details

Product: Windows Operating System
ID: 1130
Source: Microsoft-Windows-GroupPolicy
Version: 6.0
Symbolic Name: gpEvent_SCRIPT_FAILURE
Message: %5 failed. %tGPO Name : %6%tGPO File System Path : %7%tScript Name: %8

Resolve
Correct a scripts extension failure

Possible resolutions include:

  • Logon and logoff scripts: Ensure the user has the proper file permissions to read and run the script. Users must have the Read and Execute NTFS permission. If the script is located on a network share, the user must also have Read share permissions.
  • Startup and shutdown scripts: Ensure the computer account has the proper file permissions to read and run the script. Computers must have the Read and Execute NTFS permission. If the script is located on a network share, the computer must also have Read share permissions.
  • Verify the user or computer can start the script from %SystemRoot%system32 folder.

Verify

Group Policy applies during computer startup and user logon. Afterward, Group Policy applies every 90 to 120 minutes. Events appearing in the event log may not reflect the most current state of Group Policy. Therefore, you should always refresh Group Policy to determine if Group Policy is working correctly.

To refresh Group Policy on a specific computer:

  1. Open the Start menu. Click All Programs and then click Accessories.
  2. Click Command Prompt.
  3. In the command prompt window, type gpupdate and then press ENTER.
  4. When the gpupdate command completes, open the Event Viewer.

Group Policy is working correctly if the last Group Policy event to appear in the System event log has one of the following event IDs:

  • 1500
  • 1501
  • 1502
  • 1503

Related Management Information

Group Policy Scripts Processing

Group Policy Infrastructure

прежде всего убедитесь, что политика применяется runnin rsop из командной строки на компьютере.

во-вторых, убедитесь, что скрипт доступен из общей папки, которую политика будет читать из нее.

Не говоря уже о некоторых политиках, требующих перезагрузки даже после gpupdate / force . Если он находится в разделе Конфигурация пользователя и применяется в подразделении компьютеров, убедитесь, что для режима обработки замыкания на себя установлено значение объединено.

Что Я подозреваю, что есть проблема с пакетный файл вызова файла vbs я бы рекомендовал следующее:

запустить командную строку и попробовать назвать файл вручную один раз из-за повышенного cmd и в другой раз от нормального ЦМД, и это действительно зависит от методов, которые вы пытаетесь вызвать VBS файл с Либо это cscript или WScript сейчас, не говоря уже о том, что некоторые из этих пакетных файлов лучше быть настроен в качестве входа скрипты в настройках пользователя, а не компьютер (который я предпочитать.)

теперь попробуйте отредактировать пакетный файл, вызывающий скрипт, следующим образом:

@echo off

%WINDIR%SysWOW64cmd.exe

cscript script.vbs or pathscript.vbs

Я думаю, что лучше хранить сценарий в общей папке Sysvol. Или можно просто добавить сценарий vbs в сценарий входа. Кроме того, если вставить содержимое пакетного файла было бы легче диагностировать, что происходит.

Event ID 1130 — Group Policy Scripts Processing

Updated: September 21, 2007

Applies To: Windows Server 2008

During Group Policy processing, the Scripts client-side extension is responsible for launching not only computer startup and shutdown scripts but also user logon and logoff scripts.

Event Details

Product: Windows Operating System
ID: 1130
Source: Microsoft-Windows-GroupPolicy
Version: 6.0
Symbolic Name: gpEvent_SCRIPT_FAILURE
Message: %5 failed. %tGPO Name : %6%tGPO File System Path : %7%tScript Name: %8

Resolve
Correct a scripts extension failure

Possible resolutions include:

  • Logon and logoff scripts: Ensure the user has the proper file permissions to read and run the script. Users must have the Read and Execute NTFS permission. If the script is located on a network share, the user must also have Read share permissions.
  • Startup and shutdown scripts: Ensure the computer account has the proper file permissions to read and run the script. Computers must have the Read and Execute NTFS permission. If the script is located on a network share, the computer must also have Read share permissions.
  • Verify the user or computer can start the script from %SystemRoot%system32 folder.

Verify

Group Policy applies during computer startup and user logon. Afterward, Group Policy applies every 90 to 120 minutes. Events appearing in the event log may not reflect the most current state of Group Policy. Therefore, you should always refresh Group Policy to determine if Group Policy is working correctly.

To refresh Group Policy on a specific computer:

  1. Open the Start menu. Click All Programs and then click Accessories.
  2. Click Command Prompt.
  3. In the command prompt window, type gpupdate and then press ENTER.
  4. When the gpupdate command completes, open the Event Viewer.

Group Policy is working correctly if the last Group Policy event to appear in the System event log has one of the following event IDs:

  • 1500
  • 1501
  • 1502
  • 1503

Related Management Information

Group Policy Scripts Processing

Group Policy Infrastructure

прежде всего убедитесь, что политика применяется runnin rsop из командной строки на компьютере.

во-вторых, убедитесь, что скрипт доступен из общей папки, которую политика будет читать из нее.

Не говоря уже о некоторых политиках, требующих перезагрузки даже после gpupdate / force . Если он находится в разделе Конфигурация пользователя и применяется в подразделении компьютеров, убедитесь, что для режима обработки замыкания на себя установлено значение объединено.

Что Я подозреваю, что есть проблема с пакетный файл вызова файла vbs я бы рекомендовал следующее:

запустить командную строку и попробовать назвать файл вручную один раз из-за повышенного cmd и в другой раз от нормального ЦМД, и это действительно зависит от методов, которые вы пытаетесь вызвать VBS файл с Либо это cscript или WScript сейчас, не говоря уже о том, что некоторые из этих пакетных файлов лучше быть настроен в качестве входа скрипты в настройках пользователя, а не компьютер (который я предпочитать.)

теперь попробуйте отредактировать пакетный файл, вызывающий скрипт, следующим образом:

@echo off

%WINDIR%SysWOW64cmd.exe

cscript script.vbs or pathscript.vbs

Я думаю, что лучше хранить сценарий в общей папке Sysvol. Или можно просто добавить сценарий vbs в сценарий входа. Кроме того, если вставить содержимое пакетного файла было бы легче диагностировать, что происходит.

Понравилась статья? Поделить с друзьями:
  • Ошибка при выполнении сценария python qgis
  • Ошибка при выполнении сервера сценариев windows параметр задан неверно
  • Ошибка лучшего сценария
  • Ошибка инициализации сервера сценариев windows
  • Ошибка выполнения сценария при обновлении 1с