Friday, August 28, 2020

Rant: Another reason to hate tech support (obvious issue but lost communication)

 I was just on tech support chat. I just got connected to chat which opened with that our internal wiki was down. My work laptop suddenly crashed, so lost communication. Laptop continues to have issues and no longer can connect.

Now on my personal laptop to connect to help desk, and I see that the ticket was immediately closed because he asked how my day was and I didn't respond. Even though the top of the conversation clearly shows my issue, he did not even bother to open the link I provided which gives the error immediately (everyone within my department is getting the error).

All he had to do was open the link and troubleshoot the issue.

Tuesday, August 25, 2020

Code: Display Net Use default results with C#

 Win32_NetworkConnection


Summary

This was the WMI OS CIM class needed to get the results from a simple Windows command prompt "net use" command. 



Thoughts

This was somehow amazingly hard to find on google. For whatever reason, the only command I can find were for Win32_OperatingSystem or Win32_Share.

There is plenty of information on all the elements but just could not find a connection between net use and Win32_NetworkConnection


My Sample Code

                string serverName = @"\\serverName";
                string WMIClassName = "Win32_NetworkConnection";

                List<string> shares = new List<string>();

                ConnectionOptions connectionOptions = new ConnectionOptions();

                ManagementScope scope = new ManagementScope(serverName,
                                                            connectionOptions);
                scope.Connect();

                ManagementObjectSearcher worker = new ManagementObjectSearcher(scope,
                                   new ObjectQuery($"select Name from {WMIClassName}"));

                foreach (ManagementObject share in worker.Get())
                {
                    shares.Add(share["Name"].ToString());
                }


References

Friday, August 14, 2020

A person cannot choose to be a leader, because being a leader is an effect

If there is one thing I have learned in my life time, that thing is that people are easily fooled into thinking the end justifies the means. On top of that, the thought is so over-exaggerated in shows and movies that it makes many people believe that they are beyond falling victim to such ideas.

One of those things you hear a lot is about how to be a leader. A leader must be this, or that, or do these these things, or has done those things, etc. And then there's a whole industry on books countering those properties of a leader. For those who strive to be a leader, this can be so confusing... and perhaps that is the whole idea so that others can reap in the money by publishing non-sense.

TO BE A LEADER is just the incorrect mentality because becoming a leader is an effect not the cause. You become a leader when someone chooses to follow you. You cannot make someone follow you, therefore, you cannot choose to be a leader.

This may seem like I am slicing and dicing the technical definitions, but I believe this is the mental block to our lack of good leadership in our current era. Everyone is too focused on being the leader rather than being followed.

Because of this, select people have been able to take advantage of this by claiming themselves as fake leaders. Technically they are leaders, but the reason I label as fake is because the means they gain followers are through very superficial means like money, lies, greed, deceptions, etc.

Thursday, August 6, 2020

Code: A potentially dangerous Request.Form value was detected from the client

Some notes on how to resolve this error message, as I keep need this reference:


Page
validateRequest="false"


Site
<httpRuntime requestValidationMode="2.0" /> to web.config