-
PowerShell advanced function (cmdlet) – Report all VMs with disconnected NICs in the specified Virtual Machine Manager
This is very simple function to report all virtual machines in the defined System Center Virtual Machine Manager (SCVMM) with disconnected network adapters or with network adapters without specified VLAN. Examples Report Get-RvSCVirtualNetworkAdapter -VMMServer firstVMM, secondVMM, thirdVMM -NoVMNetworkOrNoVLan | Out-GridView Code Function Get-RvSCVirtualNetworkAdapter { <# .SYNOPSIS Get network adapters of virtual machine on defined SCVMM…
-
PowerShell advanced function (cmdlet) to get WWN (PWWN) of all cluster nodes
I wrote a very simple PowerShell script (Advanced Function) that will simplify process to add a new disk to any failover cluster (Hyper-V, SQL) that is connected to SAN via Fibre Channel. If you need WWN (PWWN) of all nodes in the cluster then you need to know only a name of a single node or name…
-
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 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…