-
PowerShell advanced function (cmdlet) to get Windows Firewall rules according specified protocols and ports
I wrote a very simple helper function (you can use it as cmdlet in own module) to simplify work with Get-NetFirewallRule cmdlet. Examples Get FW rules from remote server based on multiple protocols and ports Get-RvNetFirewallRule -Protocol TCP, UDP -LocalPort @(135..138) -CimSession MyRemoteServer | Format-Table Get disabled rule from the local server based on specified protocol…
-
PowerShell Workflow to enable or disable IP protocols (IPv4 or IPv6) on network adapters of remote servers
I wrote a very simple PowerShell workflow to solve an issue on one particular environment. The problem was that system administrators thought that it is a good idea to disable IPv6 protocol on all NICs on all servers. Disabling IPv6 protocol is a very bad practice. This will not disable IPv6. Microsoft does not tests…
-
PowerShell advanced function (cmdlet) to import CSV, convert values into correct types and split all serialized arrays and collections
There are situations where you need to import data from CSV but some properties (columns in CSV) should be in different type (bool, DateTime, int) and some properties are arrays and lists (collections) with another delimiter than delimiter that was used for CSV. The problem is that CSV is a flat file. Information are not hierarchical…
-
PowerShell advanced function (cmdlet) to export CSV and serialize (join) all arrays and collections in input object
There are situations where you need to export object into CSV but the object has for example array or list (collection) of strings in one property and another array of complex objects in second property. In console view you can see {FirstObject, SecondObject} but after export will you get only full name of the object…
-
PowerShell advanced function (cmdlet) to get configuration, health, state and backlogs report for DFS-R
I decided to write Windows PowerShell Cmdlet (Advanced Function) to get report of configuration, status and health of Distributed File System Replication (DFS-R) in large enterprise environment (of course it is possible to use it for small deployment). I created this script because there are no native tools for such report and I did not…