Lotus Notes / Domino 10 > ND10: Administration & Userprobleme
Policy per Script auf Client sofort neu laden
Ice-Tee:
Hallo, es gibt ja die Möglichkeit die Policys im privaten Adressbuch mit der versteckten Ansicht $Policy anzuzeigen.
Wenn ein Client beim besten Willen die neuen Policys nicht laden will, welche Möglichkeiten gibt es?
Wenn ich es so machen, passiert nichts:
1. Alle Einträge löschen
2. Gibt es ein kleines Script, was auf dem Zielrechner ausgeführt werden
Auf folgender Seite ist das verwendete Script:
https://www.activelink.de/home/website.nsf/MainFrameset?OpenFrameSet&Frame=MainFrame&Src=%2Fhome%2Fwebsite.nsf%2F0%2F5e40b27c359f9b67c1257c61004f6ec0%3FOpenDocument%26AutoFramed
Hat jemand ein Script was funktioniert?
Oder eine bessere Variante?
Danke
DomAdm:
Hallo,
ist in dem verwendeten Arbeitsumgebungsdokument das Feld "AcceptUpdates" auf 0 oder 1 gesetzt?
Wenn 0 dann auch keine Updates der Policies.
Das Feld wird gesetzt wenn die Arbeitsumgebung im Bearbeitungsmodus ist und kann über
"Aktionen -> Erweitert -> Aktualisieriungsflag setzen" geändert werden.
https://help.hcltechsw.com/notes/11.0.0/err_allow_admins_keep_loc_sets_r.html
DomAdm:
Hab noch was gefunden:
Is there a programmatic way to ensure that a Notes client pulls down a policy? Is there a way to ensure that DCC runs programmatically?
Solution
Yes. If implemented programmatically, this is best done by attaching the code below to a button and sending it in an e-mail to each user.
The code below accomplishes the following:
1. Removes all documents in the hidden $Policies view in the personal Names & Address Book (NAB).
2. Removes the local calendar profile.
3. Sets the AcceptUpdates = 1 in the current Location Document.
NOTE: The code below is a sample script, provided to illustrate one way to approach this issue. It is to be used as is and at your own risk. In order for this example to perform as intended, the script must be laid out exactly as indicated below. Product Support cannot customize this script for specific environments or applications.
LotusScript
Sub Click(Source As Button)
Dim s As New notessession
Dim db As NotesDatabase
Dim currdb As NotesDatabase
Dim calprofdoc As NotesDocument
Dim locationdoc As NotesDocument
Dim policiesview As NotesView
Dim locationview As NotesView
Dim nviewentcoll As NotesViewEntryCollection
'remove calendar profile
Set currdb = s.CurrentDatabase
Set calprofdoc = currdb.GetProfileDocument("CalendarProfile")
Call calprofdoc.Remove(True)
' removes all entries from $Policies view
Set db = s.GetDatabase("","names.nsf")
Set policiesview = db.GetView("$Policies")
Set nviewentcoll = policiesview.AllEntries
Call nviewentcoll.RemoveAll(True)
'update Current location document and set the AcceptUpdates = 2
'grabbing current location document from ini file
Dim location As String
location = s.GetEnvironmentString("Location", True)
location = Strleft (location, ",")
Dim locationname As Variant
Set locationview = db.GetView("Adva_nced\Locations")
Set locationdoc = locationview.GetFirstDocument
While Not (locationdoc Is Nothing)
locationname = locationdoc.GetItemValue("Name")
If Strcompare(location, locationname(0)) = 0 Then
'setting the value to 1
Call locationdoc.ReplaceItemValue("AcceptUpdates","1")
Call locationdoc.Save(True,True)
End If
Set locationdoc = locationview.GetNextDocument(locationdoc)
Wend
End Sub
DomAdm:
Calendar Profile löschen kann Datenverlust bedeuten.
CarstenH:
Kleine Anmerkung zum Script. Sofern das persönliche Adressbuch nicht zufällig Englisch ist sollte man das Script an einer Stelle anpassen sonst läuft man auf einen Fehler weil die Ansicht "Adva_nced\Locations" nicht gefunden wurde.
Ändern von:
--- Code: ---Set locationview = db.GetView("Adva_nced\Locations")
--- Ende Code ---
ist zu ändern in:
--- Code: ---Set locationview = db.GetView("Locations")
--- Ende Code ---
Damit wird der Alias der View angesprochen der in allen Sprachversionen gleich sein sollte.
Carsten
Navigation
[0] Themen-Index
[#] Nächste Seite
Zur normalen Ansicht wechseln