Wolfman
Wolfman
Explore posts from servers
Mmfad
Created by Wolfman on 5/31/2024 in #questions-and-advice
Looking for critiques on groom suit
I have 3 months before the wedding. So maybe not bringing the sides in more? Would that make the lapels bow ?
8 replies
Mmfad
Created by Wolfman on 5/31/2024 in #questions-and-advice
Looking for critiques on groom suit
I can update this tomorrow with it! Suit is back at home
8 replies
CC#
Created by Wolfman on 2/8/2024 in #help
Unhandled Exception: System.Runtime.InteropServices.COMException:Unknown error (0x8007203b)
My issue with the ldap was just I wasn't putting the correct input. It just needed the IP and not full LDAP address url
26 replies
CC#
Created by Wolfman on 2/8/2024 in #help
Unhandled Exception: System.Runtime.InteropServices.COMException:Unknown error (0x8007203b)
The memory filling up was from the findAll() statement
26 replies
CC#
Created by Wolfman on 2/8/2024 in #help
Unhandled Exception: System.Runtime.InteropServices.COMException:Unknown error (0x8007203b)
Ok I was able to figure it out with Protocols!
26 replies
CC#
Created by Wolfman on 2/8/2024 in #help
Unhandled Exception: System.Runtime.InteropServices.COMException:Unknown error (0x8007203b)
Quick update on this I changed the page size to 100 but am missing around 18000 computers I still need. It also takes up a bunch of RAM but cant see an option to free that up besides cleaning up during processing. I have tried DirectoryServices.Protocols. However I cannot seem to get the LDAP to work through it without username and password.
26 replies
CC#
Created by Wolfman on 2/8/2024 in #help
Unhandled Exception: System.Runtime.InteropServices.COMException:Unknown error (0x8007203b)
using System;
using System.DirectoryServices;
using System.IO;

class Program
{
static void Main()
{
string ldapPath = "";
string csvFile = "AD_Computers.csv";

using (DirectoryEntry entry = new DirectoryEntry(ldapPath))
{
using (DirectorySearcher searcher = new DirectorySearcher(entry))
{
searcher.Filter = ("(objectClass=computer)");
searcher.SizeLimit = 0;
searcher.PageSize = 100;
searcher.PropertiesToLoad.Add("name");
searcher.PropertiesToLoad.Add("serialNumber");

// Open the CSV file
using (StreamWriter writer = new StreamWriter(csvFile))
{
int count = 0;
foreach (SearchResult r in searcher.FindAll())
{
if (r.Properties["name"].Count > 0)
{
string name = r.Properties["name"][0].ToString();
string serialNumber = r.Properties.Contains("serialNumber") ? r.Properties["serialNumber"][0].ToString() : $"2.16.840.1.114416.1.63.UnknownESN({name})";
string shortName = name.Length >= 8 ? name.Substring(name.Length - 8) : name;

count++;
// Write the meter directly to the CSV file
writer.WriteLine($"{serialNumber},{shortName}");
Console.WriteLine(count);
}
}
}
}
}

Console.WriteLine($"Exported items to testexport.csv");
Console.ReadLine();
}
}
using System;
using System.DirectoryServices;
using System.IO;

class Program
{
static void Main()
{
string ldapPath = "";
string csvFile = "AD_Computers.csv";

using (DirectoryEntry entry = new DirectoryEntry(ldapPath))
{
using (DirectorySearcher searcher = new DirectorySearcher(entry))
{
searcher.Filter = ("(objectClass=computer)");
searcher.SizeLimit = 0;
searcher.PageSize = 100;
searcher.PropertiesToLoad.Add("name");
searcher.PropertiesToLoad.Add("serialNumber");

// Open the CSV file
using (StreamWriter writer = new StreamWriter(csvFile))
{
int count = 0;
foreach (SearchResult r in searcher.FindAll())
{
if (r.Properties["name"].Count > 0)
{
string name = r.Properties["name"][0].ToString();
string serialNumber = r.Properties.Contains("serialNumber") ? r.Properties["serialNumber"][0].ToString() : $"2.16.840.1.114416.1.63.UnknownESN({name})";
string shortName = name.Length >= 8 ? name.Substring(name.Length - 8) : name;

count++;
// Write the meter directly to the CSV file
writer.WriteLine($"{serialNumber},{shortName}");
Console.WriteLine(count);
}
}
}
}
}

Console.WriteLine($"Exported items to testexport.csv");
Console.ReadLine();
}
}
26 replies
CC#
Created by Wolfman on 2/8/2024 in #help
Unhandled Exception: System.Runtime.InteropServices.COMException:Unknown error (0x8007203b)
Well this seems like a better warning then 😅 let me see what I can do. Thank you for all the help Mtreit
26 replies
CC#
Created by Wolfman on 2/8/2024 in #help
Unhandled Exception: System.Runtime.InteropServices.COMException:Unknown error (0x8007203b)
Yes
26 replies
CC#
Created by Wolfman on 2/8/2024 in #help
Unhandled Exception: System.Runtime.InteropServices.COMException:Unknown error (0x8007203b)
I never looked inside of it actually... I wonder if I don't use that it may work better I just figured it would be the easier route
26 replies
CC#
Created by Wolfman on 2/8/2024 in #help
Unhandled Exception: System.Runtime.InteropServices.COMException:Unknown error (0x8007203b)
Ok I'll try this and come back.
26 replies
CC#
Created by Wolfman on 2/8/2024 in #help
Unhandled Exception: System.Runtime.InteropServices.COMException:Unknown error (0x8007203b)
Intelligence is beyond us
26 replies
CC#
Created by Wolfman on 2/8/2024 in #help
Unhandled Exception: System.Runtime.InteropServices.COMException:Unknown error (0x8007203b)
I am handling only one OU unfortunately. Let me try the size limit. Maybe a memory issue?
26 replies
CC#
Created by Wolfman on 2/8/2024 in #help
Unhandled Exception: System.Runtime.InteropServices.COMException:Unknown error (0x8007203b)
I am really unsure if this is a LDAP issue where I am getting a timeout. I have searched online and found something from years ago saying it was a weird error. That was only seen this in association with a Kerberos authentication problem.
26 replies