Update Chat; Umbau SMB auf pandorasbox.verag.ost.dmn

This commit is contained in:
ms
2024-12-18 14:13:51 +01:00
parent 92e1cc691b
commit 7c03ab197b
9 changed files with 123 additions and 108 deletions

View File

@@ -20,19 +20,35 @@ Public Class cBenutzer
Function FillWithLoggedOnUser(Optional ByVal dcabfrage As Boolean = False, Optional ByVal LDAPa As String = "") '"LDAP://DC=VERAG,DC=OST,DC=DMN")
Try
userPrincipalName = System.DirectoryServices.AccountManagement.UserPrincipal.Current.UserPrincipalName
Name = System.DirectoryServices.AccountManagement.UserPrincipal.Current.Name
Hostname = Environment.MachineName
Catch
End Try
Domäne = System.DirectoryServices.ActiveDirectory.Domain.GetCurrentDomain.ToString
BenutzeranmeldeName = Environment.UserDomainName & "\" & Environment.UserName
Function FillWithLoggedOnUser(Optional ByVal dcabfrage As Boolean = False, Optional ByVal LDAPa As String = "", Optional ByVal debug As Boolean = False) '"LDAP://DC=VERAG,DC=OST,DC=DMN")
If debug = False Then
Try
userPrincipalName = System.DirectoryServices.AccountManagement.UserPrincipal.Current.UserPrincipalName
Name = System.DirectoryServices.AccountManagement.UserPrincipal.Current.Name
Hostname = Environment.MachineName
Catch
End Try
Domäne = System.DirectoryServices.ActiveDirectory.Domain.GetCurrentDomain.ToString
BenutzeranmeldeName = Environment.UserDomainName & "\" & Environment.UserName
If dcabfrage = True Then
'Class1.DebugText = userPrincipalName & LDAPa
FillFromDC(userPrincipalName, "userPrincipalName", LDAPa)
End If
Else
Try
userPrincipalName = "hoeferm@imex.local"
Domäne = "imex.local"
BenutzeranmeldeName = "imex\hoeferm"
If dcabfrage = True Then
'Class1.DebugText = userPrincipalName & LDAPa
FillFromDC(userPrincipalName, "userPrincipalName", LDAPa)
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
If dcabfrage = True Then
'Class1.DebugText = userPrincipalName & LDAPa
FillFromDC(userPrincipalName, "userPrincipalName", LDAPa)
End If
End Function
@@ -129,11 +145,14 @@ Public Class cBenutzer
Function blablabla(result As DirectoryServices.SearchResult, Prop As String) As String
If result.Properties(Prop).Count = 0 Then
Return ""
Else
Return result.Properties(Prop)(0)
End If
Try
If result.Properties(Prop).Count = 0 Then
Return ""
Else
Return result.Properties(Prop)(0)
End If
Catch
End Try
End Function