Creating a new users home directory and corresponding DFS namespace target. The script can also force all domain controllers to fully sync up in case you have multiple sites. Sync is enabled by default, however it can be disabled. This powershell script does require WinRM to be enabled for sync to work. You need to … [Read more…]
I find I need to save C# DataTables to CSV files often and as such use the following code:
These two functions below have saved me a lot of time, you simply create a class with variables inside it and then pass said class to the two functions below:
I have created nine extractors to get all the Sophos variables I needed to use.
I setup Graylog to collect all the windows event logs including file event logs on the file servers at work. I noticed that the winlogbeat_event_data_AccessList field was not what the event did rather a %%#### code. I decided to build a pipeline to format the winlogbeat_event_data_AccessList field into a new field I designated as AccessList.
PowerShell has a module to assist with this, you can find out all the specifics at https://docs.microsoft.com/en-us/sql/powershell/download-sql-server-ps-module. I was asked to pull data and export it to a CSV to save time, which is easy to do with Task Scheduler and PowerShell.
The more I use power shell the more I realize you can do just about anything you could do with visual studio and C#. I haven’t found a comprehensive source for all the little differences between C# and powershell but the following are some things to take note of:
I found an issue with Sophos where I was unable to ping from my local network to a public IPv6 address even with the firewall rules in place to allow ICMPv6. The issue is when you enable NAT it enables for both IPv4 and IPv6. You need to create a NAT rule that ensures NAT … [Read more…]