Ошибка 1130 group policy

I have a powershell script I am trying to execute and I have placed it inside a GPO under Computer Configuration\Policies\Windows Settings\Scripts\Startup. 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.com\SysVol\domain.com\Policies \{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 System\Logon, «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.

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>\User\Scripts\Logon 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 \\mgmt\Installs\MicrosoftTeams

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)\Microsoft\Teams"

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).

I have a powershell script I am trying to execute and I have placed it inside a GPO under Computer Configuration\Policies\Windows Settings\Scripts\Startup. 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.com\SysVol\domain.com\Policies \{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 System\Logon, «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.

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

Содержание

  1. Microsoft windows grouppolicy 1130
  2. Microsoft windows grouppolicy 1130
  3. Вопрос
  4. Все ответы
  5. Microsoft windows grouppolicy 1130
  6. Вопрос
  7. Ответы
  8. Все ответы

Microsoft windows grouppolicy 1130

Профиль | Отправить PM | Цитировать

Доброго времени суток уважаемые коллеги!

На новой работе достался в наследство домен с двумя контроллерами, один из них хозяин Windows 2012
Встала необходимость настроить аудит, и тут то собственно и возникла ошибка.
При попытке зайти через управление групповой политикой возникает ошибка — следующего характера:
указанный домен не доступен или к нему невозможно подключится,

если отказаться от данного мастера — то появляется диалог с выбором другого контроллера или изменением Роли текущего
и если отказаться от этого мастера то в оснастке видна групповая политика к которой подключится невозможно.
в Журнале постоянно видны ошибки с кодом 1030:
Ошибка при обработке групповой политики.
Windows пыталась получить новые параметры групповой политики для этого пользователя или компьютера.
На вкладке «Подробности» можно найти код и описание

подскажите как можно восстановить работоспособность GPO?

» width=»100%» style=»BORDER-RIGHT: #719bd9 1px solid; BORDER-LEFT: #719bd9 1px solid; BORDER-BOTTOM: #719bd9 1px solid» cellpadding=»6″ cellspacing=»0″ border=»0″>

Сообщения: 3724
Благодарности: 747

Сообщения: 3724
Благодарности: 747

» width=»100%» style=»BORDER-RIGHT: #719bd9 1px solid; BORDER-LEFT: #719bd9 1px solid; BORDER-BOTTOM: #719bd9 1px solid» cellpadding=»6″ cellspacing=»0″ border=»0″>

Меня настораживает все таки мысль о том что про просмотре GPO в оснастке мастером — пытается искать КД в домене csoft.ru хотя лес у нас org и не находит ни одного КД »

Сообщения: 3724
Благодарности: 747

» width=»100%» style=»BORDER-RIGHT: #719bd9 1px solid; BORDER-LEFT: #719bd9 1px solid; BORDER-BOTTOM: #719bd9 1px solid» cellpadding=»6″ cellspacing=»0″ border=»0″>

192.168.0.2 — должен быть (это адрес приходящий от Провайдерского роутера) »

но выбрав КД выходит ошибка что КД нет в домене csoft.ru »

» width=»100%» style=»BORDER-RIGHT: #719bd9 1px solid; BORDER-LEFT: #719bd9 1px solid; BORDER-BOTTOM: #719bd9 1px solid» cellpadding=»6″ cellspacing=»0″ border=»0″>

Сообщения: 3724
Благодарности: 747

192.168.0.2 это адрес на внешней сетевушке »

Читайте также:  Live linux no gui

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.

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.

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:

Microsoft windows grouppolicy 1130

Вопрос

We have many Win7 and Win10 and all work fine, but two PC with Windows 10 cannot apply software installation GP and startup script GP with these errors:

We try set policy:

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

«Specify startup policy processing wait time» = 90 sec

We try set registry:

reg add HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindowsNetworkProviderHardenedPaths /v «\*SYSVOL» /d «RequireMutualAuthentication=0» /t REG_SZ

reg add HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindowsNetworkProviderHardenedPaths /v «\*NETLOGON» /d «RequireMutualAuthentication=0» /t REG_SZ

We try re-join this PC to domain, but its not help.

How to resolve this issue?

  • Перемещено Carey Frisch MVP 4 апреля 2018 г. 10:18 Relocated

Все ответы

Please try to login the 2 computers with other work well user accounts to check again.
Then please try to leave domain, delete and reinstall network drivers on the 2 computers.

Clean the group policy cache with the following command line.
RD /S /Q «%WinDir%System32GroupPolicyUsers»
RD /S /Q «%WinDir%System32GroupPolicy»

After that, join domain again to check the issue.
If the issue persists, please disable antivirus software and firewall to check again.

Microsoft windows grouppolicy 1130

Вопрос

I’m trying to apply the following computer startup script

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

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

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

Ответы

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

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.

Все ответы

I see that you have created another thread here: http://community.spiceworks.com/topic/988490-gpo-computer-startup-script-fails-to-run-eventid-1130-error-code-267

If the recommendations still do not fix your problem then please update the thread here.

This posting is provided AS IS with no warranties or guarantees , and confers no rights.

>>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

Did we allow remote PowerShell scripts to run the clients? If not, we can try to enable the following policy setting and select proper option to allow PowerShell script to be executed:

Computer Configuration> Administrative Templates> Windows Components>Windows Powershell> Turn on Script Execution

If the issue persists, on the client, we can try to directly navigate to where the script is stored and run the script to see if it can be successfully run.

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).

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

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

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

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

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

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

@echo off

%WINDIR%SysWOW64cmd.exe

cscript script.vbs or pathscript.vbs

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

Обновлено 17.07.2019

PowerShell logoДобрый день! Уважаемые читатели и гости одного из крупнейших IT порталов в России Pyatilistnik.org. В прошлый раз вы меня просили рассказать вам, о рабочих методах исправления черного экрана Windows 10 и я с вами ими поделился. Так как направленность моего ресурса больше рассчитана на системных администраторов и продвинутых пользователей, то я сегодня хочу вновь поговорить про групповые политики и автоматизацию получаемую благодаря им. В данной публикации речь пойдет, о запуске скрипта PowerShell средствами GPO (Групповой политики), мы рассмотрим все варианты доступные администраторам.

Постановка задачи

Когда начинающий системный администратор превращается в матерого админа, он хочет везде все автоматизировать и везде экономить свое время, и это логично люди существа любящие комфорт и лень. Рабочая среда Active Directory позволяет, как все знаете через групповые политики настройку почти всех компонентов в системе, а что не может замещается средствами PowerShell, вот такой симбиоз. В нашу задачу входит научиться запускать при загрузке компьютера или при входе пользователя на компьютер или сервер, наш скрипт PowerShell, который реализует ту или иную задачу, это не важно, пусть например монтирует базы 1С.

Методы запуска скрипта PowerShell через GPO

Существует несколько сценариев позволяющих вам применять к вашим объектам нужные скрипты:

  1. Скрипт применяется в автозагрузке системы, в момент загрузки операционной системы
  2. Скрипт отработает во время входа или выхода пользователя из системы
  3. Ну и запуск скрипта по расписанию, такое то же имеет место быть

Запуск PowerShell скрипта в автозагрузке сервера

Открываем оснастку «Управление групповой политикой» и создаем на нужном уровне вашей иерархии организационных подразделений, новую политику, в моем примере, это будет «Добавление баз 1С». Переходим к ее редактированию.

Открываем оснастку "Управление групповой политикой"

Для того, чтобы при загрузке вашего сервера или компьютера, к нему применялся нужный вам сценарий PowerShell вам необходимо перейти в раздел:

Конфигурация компьютера — Политики — Конфигурация Windows — Сценарий (запуск/завершение) (Computer Configuration — Policies — Windows Settings — Scripts (Startup/Shutdown)

Тут вы увидите два возможных варианта «Автозагрузка» и «Завершение работы»

Запуск powershell через групповую политику

Далее вы открываете пункт «Автозагрузка», переходите на вкладку «Сценарий PowerShell» и нажимаете кнопку «Добавить«. Через окно «добавление сценария» откройте папку «Startup» и скопируйте туда ваш скрипт. Теперь данный файл будет частью папки Sysvol и располагаться в конкретном GPO объекте.

Добавление скрипта powershell в автозагрузку через GPO

Так же хочу отметить, что вы можете задать порядок выполнения PowerShell сценария в соответствующей области, выбрав будет ли он выполнятся после других сценариев или перед.

Варианты запуска сценария powershell в gpo

Еще есть ряд нюансов при использовании выполнения скриптов PowerShell средствами групповой политики:

  1. Во первых по умолчанию в Windows есть 5-ти минутная задержка выполнения скриптом, как ее отключать я рассказывал можете почитать вот тут.
  2. Если у вас в локальной сети присутствуют операционные системы по типу Windows Server 2008 или ниже, то там есть подводные камни в виде выполнения неподписанных скриптов и во вторых в старой версии PowerShell

Хочу отметить, что начиная с Windows Server 2012 R2, Windows 8.1 и выше, все запускаемые сценарии PowerShell через GPO работают в режиме Bypass, что подразумевает игнорирование политики Set-ExecutionPolicy. Но если у вас есть более старые клиенты, то вы можете пойти вот таким путем:

Вы можете явно указать исполняемый файл PowerShell, для этого в политике откройте вкладку «Сценарии», нажмите добавить. В имя сценария введите путь до файла powerShell, это:

%windir%System32WindowsPowerShellv1.0powershell.exe

В параметрах сценария введите вот такие ключи и сетевой путь до скрипта PowerShell.

-Noninteractive -ExecutionPolicy Bypass –Noprofile -file root.pyatilistnik.orgSysVolroot.pyatilistnik.org Policies{2B79FA3E-CB2F-4D15-A446-3DBBF887CD40} MachineScriptsStartupAdd-Base-1C.ps1

PowerShell с помощью GPO

Еще для подстраховки вы можете включить параметр GPO

Конфигурация компьютера — Административные шаблоны — Компоненты Windows — Windows Powershell
(Computer Configuration — Administrative Templates — Windows Components — Windows PowerShell)

Активируем настройку «Включить выполнение сценариев (Turn On Script Execution)», выставим значение «Разрешать все сценарии«.

Включить выполнение сценариев

Небольшой совет, я бы вам рекомендовал включать выполнение всех сценариев исключительно для старых ОС, для этого вы можете сделать отдельную политику и применить ее только к старым операционным системам, через WMI фильтр

Проверяем применение вашей GPO, если все настроили правильно она отработает если нет, то начинается траблшутинг, проверяете фильтры GPO и общий алгоритм поиска проблем.

Запуск PowerShell скрипта для пользователя

Чтобы применить к пользователю ваш скрипт, вам необходимо в объекте групповой политики открыть вот такую ветку:

Конфигурация пользователя — Политики — Конфигурация Windows — Сценарии (Вход/Выход из системы) (User Configuration — Policies — Windows Settings — Scripts

Тут будет два варианта «Вход в систему» и «Выход из системы».

Запуск PowerShell скрипта для пользователя

Настраиваем аналогично, как я показывал выше для компьютера, все одинаково.

PowerShell с помощью GPO-08

Выполнение сценариев PowerShell по расписанию

Тут все просто, если вы хотите средствами групповой политики запускать скрипты PowerShell по расписанию, то вам нужно создать задание в шедуллере. Для этого есть ветки GPO:

Конфигурация пользователя — Настройки — Параметры панели управления — Назначенные задания

Конфигурация компьютера — Настройки — Параметры панели управления — Назначенные задания

запускать скрипты PowerShell по расписанию

Указываем в задании нужное время, имя и сетевой путь до скрипта.

Назначенные задания GPO

Как видите все просто. С вами был Иван Семин, автор и создатель IT портала Pyatilistnik.org.

I create the powershell script to enable volume shadown copy (VSS) in computer/user configuration (GPO). 

1)Execution policy is unrestricted, and the script runs fine when ran manually (run as administration) in Windows 10 .

2)I created a group policy (Computer Configuration/ User Configuration > Windows Settings > Scripts > Startup) Added EnableVSS.ps1 to domain.comSysVoldomain.comPolicies…MachineScriptsStartup.

3)Security Filtering configured to apply to the Domain Computers group.

4)Policy applies fine to computer.

I apply GPO to run below script.

vssadmin resize shadowstorage /for=C: /on=C:  /maxsize=8128MB
vssadmin resize shadowstorage /for=D: /on=D:  /maxsize=8128MB
vssadmin resize shadowstorage /for=E: /on=E:  /maxsize=8128MB
# get static method
$class=[WMICLASS]»rootcimv2:win32_shadowcopy»
# create a new shadow copy
«Creating a new shadow copy»
$class.create(«C:», «ClientAccessible»)
$class.create(«D:», «ClientAccessible»)
$class.create(«E:», «ClientAccessible»)

I get the following error when the policy attempts to apply script:

Group Policy event 1130 Login script failed. GPO Name : EnableVSS GPO FileSystemPath: domain.comSysVoldomain.comPolicies{...}User ScriptName:EnableVSS.ps1

SupportInfo1 0
  SupportInfo2 0
  ErrorCode 267 
  ErrorDescription The directory name is invalid.  

Any help would be appreciated.

Extra info. I'm testing this GPO on a windows 10 machine. This script is applied on a server 2008.

I create the powershell script to enable volume shadown copy (VSS) in computer/user configuration (GPO). 

1)Execution policy is unrestricted, and the script runs fine when ran manually (run as administration) in Windows 10 .

2)I created a group policy (Computer Configuration/ User Configuration > Windows Settings > Scripts > Startup) Added EnableVSS.ps1 to domain.comSysVoldomain.comPolicies…MachineScriptsStartup.

3)Security Filtering configured to apply to the Domain Computers group.

4)Policy applies fine to computer.

I apply GPO to run below script.

vssadmin resize shadowstorage /for=C: /on=C:  /maxsize=8128MB
vssadmin resize shadowstorage /for=D: /on=D:  /maxsize=8128MB
vssadmin resize shadowstorage /for=E: /on=E:  /maxsize=8128MB
# get static method
$class=[WMICLASS]»rootcimv2:win32_shadowcopy»
# create a new shadow copy
«Creating a new shadow copy»
$class.create(«C:», «ClientAccessible»)
$class.create(«D:», «ClientAccessible»)
$class.create(«E:», «ClientAccessible»)

I get the following error when the policy attempts to apply script:

Group Policy event 1130 Login script failed. GPO Name : EnableVSS GPO FileSystemPath: domain.comSysVoldomain.comPolicies{...}User ScriptName:EnableVSS.ps1

SupportInfo1 0
  SupportInfo2 0
  ErrorCode 267 
  ErrorDescription The directory name is invalid.  

Any help would be appreciated.

Extra info. I'm testing this GPO on a windows 10 machine. This script is applied on a server 2008.

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.

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.

Содержание

  1. Microsoft windows grouppolicy 1130
  2. Microsoft windows grouppolicy 1130
  3. Вопрос
  4. Все ответы
  5. Microsoft windows grouppolicy 1130
  6. Вопрос
  7. Ответы
  8. Все ответы

Microsoft windows grouppolicy 1130

Профиль | Отправить PM | Цитировать

Доброго времени суток уважаемые коллеги!

На новой работе достался в наследство домен с двумя контроллерами, один из них хозяин Windows 2012
Встала необходимость настроить аудит, и тут то собственно и возникла ошибка.
При попытке зайти через управление групповой политикой возникает ошибка — следующего характера:
указанный домен не доступен или к нему невозможно подключится,

если отказаться от данного мастера — то появляется диалог с выбором другого контроллера или изменением Роли текущего
и если отказаться от этого мастера то в оснастке видна групповая политика к которой подключится невозможно.
в Журнале постоянно видны ошибки с кодом 1030:
Ошибка при обработке групповой политики.
Windows пыталась получить новые параметры групповой политики для этого пользователя или компьютера.
На вкладке «Подробности» можно найти код и описание

подскажите как можно восстановить работоспособность GPO?

» width=»100%» style=»BORDER-RIGHT: #719bd9 1px solid; BORDER-LEFT: #719bd9 1px solid; BORDER-BOTTOM: #719bd9 1px solid» cellpadding=»6″ cellspacing=»0″ border=»0″>

Сообщения: 3724
Благодарности: 747

Сообщения: 3724
Благодарности: 747

» width=»100%» style=»BORDER-RIGHT: #719bd9 1px solid; BORDER-LEFT: #719bd9 1px solid; BORDER-BOTTOM: #719bd9 1px solid» cellpadding=»6″ cellspacing=»0″ border=»0″>

Меня настораживает все таки мысль о том что про просмотре GPO в оснастке мастером — пытается искать КД в домене csoft.ru хотя лес у нас org и не находит ни одного КД »

Сообщения: 3724
Благодарности: 747

» width=»100%» style=»BORDER-RIGHT: #719bd9 1px solid; BORDER-LEFT: #719bd9 1px solid; BORDER-BOTTOM: #719bd9 1px solid» cellpadding=»6″ cellspacing=»0″ border=»0″>

192.168.0.2 — должен быть (это адрес приходящий от Провайдерского роутера) »

но выбрав КД выходит ошибка что КД нет в домене csoft.ru »

» width=»100%» style=»BORDER-RIGHT: #719bd9 1px solid; BORDER-LEFT: #719bd9 1px solid; BORDER-BOTTOM: #719bd9 1px solid» cellpadding=»6″ cellspacing=»0″ border=»0″>

Сообщения: 3724
Благодарности: 747

192.168.0.2 это адрес на внешней сетевушке »

Читайте также:  Live linux no gui

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.

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.

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:

Microsoft windows grouppolicy 1130

Вопрос

We have many Win7 and Win10 and all work fine, but two PC with Windows 10 cannot apply software installation GP and startup script GP with these errors:

We try set policy:

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

«Specify startup policy processing wait time» = 90 sec

We try set registry:

reg add HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindowsNetworkProviderHardenedPaths /v «*SYSVOL» /d «RequireMutualAuthentication=0» /t REG_SZ

reg add HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindowsNetworkProviderHardenedPaths /v «*NETLOGON» /d «RequireMutualAuthentication=0» /t REG_SZ

We try re-join this PC to domain, but its not help.

How to resolve this issue?

  • Перемещено Carey Frisch MVP 4 апреля 2018 г. 10:18 Relocated

Все ответы

Please try to login the 2 computers with other work well user accounts to check again.
Then please try to leave domain, delete and reinstall network drivers on the 2 computers.

Clean the group policy cache with the following command line.
RD /S /Q «%WinDir%System32GroupPolicyUsers»
RD /S /Q «%WinDir%System32GroupPolicy»

After that, join domain again to check the issue.
If the issue persists, please disable antivirus software and firewall to check again.

Microsoft windows grouppolicy 1130

Вопрос

I’m trying to apply the following computer startup script

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

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

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

Ответы

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

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.

Все ответы

I see that you have created another thread here: http://community.spiceworks.com/topic/988490-gpo-computer-startup-script-fails-to-run-eventid-1130-error-code-267

If the recommendations still do not fix your problem then please update the thread here.

This posting is provided AS IS with no warranties or guarantees , and confers no rights.

>>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

Did we allow remote PowerShell scripts to run the clients? If not, we can try to enable the following policy setting and select proper option to allow PowerShell script to be executed:

Computer Configuration> Administrative Templates> Windows Components>Windows Powershell> Turn on Script Execution

If the issue persists, on the client, we can try to directly navigate to where the script is stored and run the script to see if it can be successfully run.

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).

Содержание

  1. Ошибка сценарий входа 1130
  2. Answered by:
  3. Question
  4. Answers
  5. All replies
  6. Ошибка сценарий входа 1130
  7. Вопрос
  8. Ответы
  9. Все ответы
  10. Group Policy Logon script failing with Event ID 1130 and «Incorrect Function»
  11. Ошибка сценарий входа 1130
  12. Вопрос
  13. Ответы
  14. Все ответы
  15. Ошибка сценарий входа 1130
  16. Вопрос
  17. Все ответы

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I’m trying to apply the following computer startup script

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

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

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

Answers

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

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.

I see that you have created another thread here: http://community.spiceworks.com/topic/988490-gpo-computer-startup-script-fails-to-run-eventid-1130-error-code-267

If the recommendations still do not fix your problem then please update the thread here.

This posting is provided AS IS with no warranties or guarantees , and confers no rights.

>>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

Did we allow remote PowerShell scripts to run the clients? If not, we can try to enable the following policy setting and select proper option to allow PowerShell script to be executed:

Computer Configuration> Administrative Templates> Windows Components>Windows Powershell> Turn on Script Execution

If the issue persists, on the client, we can try to directly navigate to where the script is stored and run the script to see if it can be successfully run.

Источник

Вопрос

I’m trying to apply the following computer startup script

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

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

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

Ответы

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

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.

Все ответы

I see that you have created another thread here: http://community.spiceworks.com/topic/988490-gpo-computer-startup-script-fails-to-run-eventid-1130-error-code-267

If the recommendations still do not fix your problem then please update the thread here.

This posting is provided AS IS with no warranties or guarantees , and confers no rights.

>>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

Did we allow remote PowerShell scripts to run the clients? If not, we can try to enable the following policy setting and select proper option to allow PowerShell script to be executed:

Computer Configuration> Administrative Templates> Windows Components>Windows Powershell> Turn on Script Execution

If the issue persists, on the client, we can try to directly navigate to where the script is stored and run the script to see if it can be successfully run.

Источник

Group Policy Logon script failing with Event ID 1130 and «Incorrect Function»

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 SysVol Policies

UserScriptsLogon folder, and the .exe is stored in our company share directory. I specified «-SourcePath

» for the script in GP; I tried with both the DNS name and the IP address, neither worked.

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

  • local_offer Tagged Items
  • Paul-Cunningham

Источник

Вопрос

I’m trying to apply the following computer startup script

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

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

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

Ответы

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

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.

Все ответы

I see that you have created another thread here: http://community.spiceworks.com/topic/988490-gpo-computer-startup-script-fails-to-run-eventid-1130-error-code-267

If the recommendations still do not fix your problem then please update the thread here.

This posting is provided AS IS with no warranties or guarantees , and confers no rights.

>>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

Did we allow remote PowerShell scripts to run the clients? If not, we can try to enable the following policy setting and select proper option to allow PowerShell script to be executed:

Computer Configuration> Administrative Templates> Windows Components>Windows Powershell> Turn on Script Execution

If the issue persists, on the client, we can try to directly navigate to where the script is stored and run the script to see if it can be successfully run.

Источник

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

Вопрос

We have many Win7 and Win10 and all work fine, but two PC with Windows 10 cannot apply software installation GP and startup script GP with these errors:

We try set policy:

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

«Specify startup policy processing wait time» = 90 sec

We try set registry:

reg add HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindowsNetworkProviderHardenedPaths /v «*SYSVOL» /d «RequireMutualAuthentication=0» /t REG_SZ

reg add HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindowsNetworkProviderHardenedPaths /v «*NETLOGON» /d «RequireMutualAuthentication=0» /t REG_SZ

We try re-join this PC to domain, but its not help.

How to resolve this issue?

  • Перемещено Carey Frisch MVP 4 апреля 2018 г. 10:18 Relocated

Все ответы

Please try to login the 2 computers with other work well user accounts to check again.
Then please try to leave domain, delete and reinstall network drivers on the 2 computers.

Clean the group policy cache with the following command line.
RD /S /Q «%WinDir%System32GroupPolicyUsers»
RD /S /Q «%WinDir%System32GroupPolicy»

After that, join domain again to check the issue.
If the issue persists, please disable antivirus software and firewall to check again.

Источник

Содержание

  1. Ошибка сценарий входа 1130
  2. Answered by:
  3. Question
  4. Answers
  5. All replies
  6. Ошибка сценарий входа 1130
  7. Вопрос
  8. Ответы
  9. Все ответы
  10. Group Policy Logon script failing with Event ID 1130 and «Incorrect Function»
  11. Ошибка сценарий входа 1130
  12. Вопрос
  13. Ответы
  14. Все ответы
  15. Ошибка сценарий входа 1130
  16. Вопрос
  17. Все ответы

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

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I’m trying to apply the following computer startup script

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

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

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

Answers

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

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.

I see that you have created another thread here: http://community.spiceworks.com/topic/988490-gpo-computer-startup-script-fails-to-run-eventid-1130-error-code-267

If the recommendations still do not fix your problem then please update the thread here.

This posting is provided AS IS with no warranties or guarantees , and confers no rights.

>>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

Did we allow remote PowerShell scripts to run the clients? If not, we can try to enable the following policy setting and select proper option to allow PowerShell script to be executed:

Computer Configuration> Administrative Templates> Windows Components>Windows Powershell> Turn on Script Execution

If the issue persists, on the client, we can try to directly navigate to where the script is stored and run the script to see if it can be successfully run.

Источник

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

Вопрос

I’m trying to apply the following computer startup script

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

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

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

Ответы

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

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.

Все ответы

I see that you have created another thread here: http://community.spiceworks.com/topic/988490-gpo-computer-startup-script-fails-to-run-eventid-1130-error-code-267

If the recommendations still do not fix your problem then please update the thread here.

This posting is provided AS IS with no warranties or guarantees , and confers no rights.

>>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

Did we allow remote PowerShell scripts to run the clients? If not, we can try to enable the following policy setting and select proper option to allow PowerShell script to be executed:

Computer Configuration> Administrative Templates> Windows Components>Windows Powershell> Turn on Script Execution

If the issue persists, on the client, we can try to directly navigate to where the script is stored and run the script to see if it can be successfully run.

Источник

Group Policy Logon script failing with Event ID 1130 and «Incorrect Function»

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 SysVol Policies

UserScriptsLogon folder, and the .exe is stored in our company share directory. I specified «-SourcePath

» for the script in GP; I tried with both the DNS name and the IP address, neither worked.

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

  • local_offer Tagged Items
  • Paul-Cunningham

Источник

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

Вопрос

I’m trying to apply the following computer startup script

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

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

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

Ответы

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

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.

Все ответы

I see that you have created another thread here: http://community.spiceworks.com/topic/988490-gpo-computer-startup-script-fails-to-run-eventid-1130-error-code-267

If the recommendations still do not fix your problem then please update the thread here.

This posting is provided AS IS with no warranties or guarantees , and confers no rights.

>>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

Did we allow remote PowerShell scripts to run the clients? If not, we can try to enable the following policy setting and select proper option to allow PowerShell script to be executed:

Computer Configuration> Administrative Templates> Windows Components>Windows Powershell> Turn on Script Execution

If the issue persists, on the client, we can try to directly navigate to where the script is stored and run the script to see if it can be successfully run.

Источник

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

Вопрос

We have many Win7 and Win10 and all work fine, but two PC with Windows 10 cannot apply software installation GP and startup script GP with these errors:

We try set policy:

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

«Specify startup policy processing wait time» = 90 sec

We try set registry:

reg add HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindowsNetworkProviderHardenedPaths /v «*SYSVOL» /d «RequireMutualAuthentication=0» /t REG_SZ

reg add HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindowsNetworkProviderHardenedPaths /v «*NETLOGON» /d «RequireMutualAuthentication=0» /t REG_SZ

We try re-join this PC to domain, but its not help.

How to resolve this issue?

  • Перемещено Carey Frisch MVP 4 апреля 2018 г. 10:18 Relocated

Все ответы

Please try to login the 2 computers with other work well user accounts to check again.
Then please try to leave domain, delete and reinstall network drivers on the 2 computers.

Clean the group policy cache with the following command line.
RD /S /Q «%WinDir%System32GroupPolicyUsers»
RD /S /Q «%WinDir%System32GroupPolicy»

After that, join domain again to check the issue.
If the issue persists, please disable antivirus software and firewall to check again.

Источник

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 в сценарий входа. Кроме того, если вставить содержимое пакетного файла было бы легче диагностировать, что происходит.

  • 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.

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

  • 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).

Понравилась статья? Поделить с друзьями:
  • Ошибка 1133 дэу джентра
  • Ошибка 1147 ниссан тиида
  • Ошибка 1132 форд мондео 4 расшифровка
  • Ошибка 113 форд
  • Ошибка 1148 кайрон дизель что делать