Sziasztok!
Visszatérve az eredeti problémára ezzel az egy sorral van baj:
set-gplink -name policyname -target $ou
ugye itt rendeljük össze a gpo-t az Organization unittal
A többi az lefut:
New-ADorganizationalunit -name "sirius11" -path "DC=peldasuli, DC=local" -ProtectedFromAccidentalDeletion $false
$PolicyName="vmi11"
New-gpo -name $policyName
$gpo = get-gpo -name $policyname
$rule1="A felhasználók nem módosíthatják a háttérképet!"
$rule2="A felhasználókcsak bizonyos alkalmazásokat futtathatnak"
set-gpregistryvalue -name $policyname -key "HKCU\Control Panel\Desktop" -valuename "wallpaper" -type string -value "C:\hatterkep.jpg"
set-gpregistryvalue -name $policyname -key "HKCU\Software\Microsoft\Windows\Currentversion\Policies\Explorer" -valuename "disallowrun" -type multistring -value "notepad.exe"
$OU ="OU=sirius11 DC=peldasuli,DC=local"
set-gplink -name policyname -target $ou
Ez a hibaüzenet:
Set-GPLink : Ismeretlen hiba (0x80005000)
At C:\8.ps1:13 char:1
+ Set-GPLink -name $policyname -target $OU
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-GPLink], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.
GroupPolicy.Commands.SetGPLinkCommand