Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

Stuffs from real IT system ADMINISTRATORS world and my LAB

Powershell WPF Charts dashboard demo

I was preparing for some dashboards using Powershell WPF GUI and was looking for some charts and graph to show on my GUI, I tried utilizing data visualization charts but I was looking for more cooler ways to show them and was looking for interactive ones which can complement my dashboards. To achieve this I have created html files using chart.js and bootstrap html codes and used WPF webbrowser …

Read more

Installing VMware.Powercli latest version and Error Invalid server certificate Set-PowerCLIConfiguration

Way long back, After writing my my article VMWARE VSPHERE POWERCLI INSTALLATION AND CONFIGURATION STEP BY STEP, I decided today to upgrade my vSphere PowerCLI to newer version 10 in the office, I am choosing little bit different installation method instead of using exe installer, PowerCLI can be downloaded from Microsoft Powershell PSGallary instead from VMware.com site. Before installation that …

Read more

Using PowerCLI to Increase VMDK (Virtual disk) in VMware Virtual Machine

Below oneliner commands I recently used to configure multiple VMware Virtual Machines Hard disk, Task was to grow/extend VMDK virtual disk on more than hundreds of the virtual machine. Below is the main techniques and gist of the article and scripts. These one-liner commands also include the commands to get the disk related inventory so I can gather in the excel file, If I need bulk operations. He…

Read more

Part 3: Powershell wpf MahApps.Metro theme step by step

Part 1: Basic Powershell WPF Themes guide step by step
Part 2: Powershell WPF Themes guide step by step
Part 3: Powershell wpf MahApps.Metro theme step by step

As shown in my previous articles using sample xaml as style and themes, here I am using community popular MahApps.Metro wpf theme, This is a royal theme and looks very very cool. Implementation is bit different from the previous step …

Read more

Part 2: Powershell WPF Themes guide step by step

Part 1: Basic Powershell WPF Themes guide step by step
Part 2: Powershell WPF Themes guide step by step
Part 3: Powershell wpf MahApps.Metro theme step by step

Theme 2

I found few nice themes online for my Powershell WPF gui scripts, I was looking for simple and nice themes to implement, although there is already available theme called MahApp.Metro is very popular among community. But I w…

Read more

Powershell WPF custom Image based ProgressBar

In this article I am showing some different ProgressBars for WPF GUI, This progressbar can show your chunk of silhouette image loading instead progress nicely. Below is the demo for my new progressbars, It can be used as an animated text or image. Images should be silhouette, A silhouette is the image of a person, animal, object or scene represented as a solid shape of a single color, usually blac…

Read more

Esxi update individual component firmware on HP hardware: disk degraded not authenticated

Server hardware goes faulty is common in any organization, I was doing healthcheck on all vCenter, few of my ESXi servers were showing alerts on faulty storage controller battery and HDD storage issue, they were running on HP hardware, after checking ILO pages, hardware health status was in yellow or red degraded state, Drives were showing in not authenticated state. After discussion with HP suppo…

Read more

Solved: Esxi server cannot joined into active directory domain

I assigned one task to my junior colleagues to configure authentication services on vmware esxi servers (Join esxi server into domain), They reported to me that they are not able to join few esxi servers in the domain and giving error. They followed correct instructions as shown below from my earlier articles, but still were being ending up in the error.

POWERCLI AND VSPHERE WEB CLIENT: JO…

Read more

New Vembu release 3.9.1 - Standard Edition and features

Vembu has publicized recently the latest publication of their leading offering, i.e. Vembu BDR Suite v3.9.1 which contains a Standard Edition intended keeping Small businesses in thoughts. Vembu BDR Suite has been filling all these demands since a long time now. It is a complete solution, intended to guard critical data crossways hybrid IT environments like Physical, Virtual, and Cloud (SaaS appli…

Read more

Powershell WPF Themes guide step by step

Part 1: Basic Powershell WPF Themes guide step by step
Part 2: Powershell WPF Themes guide step by step
Part 3: Powershell wpf MahApps.Metro theme step by step

I have wrote many powershell GUI scripts but never thought using any themes on WPF GUI forms, As it is not required for internal organization use and it can be used without any different skin, but as I started sharing my GUI scripts o…

Read more

View older posts »

Page Views

1284853

Not sure about query, but will be including the subdomains.

briliant script. Thank youj

Hello and thanks for this Script! Is there anyway you can put in code so that it will include subdomains?

thanks much!

Hi,

@Mike: Thanks for that solution! It helped me a lot.

As cyberbastion mentioned source / destination and source port / destination port can contain multiple values. I modified your script to address that. The complete modified script can be found below. I used semicolon to separate these multiple values because I export the whole report to CSV.

$report = @()

foreach ($nsg in Get-AzureRmNetworkSecurityGroup){

foreach($rule in $nsg.SecurityRules){

$info = "" | select-object nsg, rule, description, protocol, SourcePortRange, DestinationPortRange, SourceApplicationSecurityGroups, DestinationApplicationSecurityGroups, SourceAddressPrefix, DestinationAddressPrefix, Access, Priority, Direction
$info.nsg = $nsg.Name
$info.rule = $rule.name
$info.Description = $rule.Description
$info.Protocol = $rule.Protocol

foreach ($sport in $rule.SourcePortRange) {

if ($sport -ne $rule.SourcePortRange[0]) {

$sport=";" + $sport

}

$info.SourcePortRange += $sport

}

foreach ($dport in $rule.DestinationPortRange) {

if ($dport -ne $rule.DestinationPortRange[0]) {

$dport=";" + $dport

}

$info.DestinationPortRange += $dport

}

foreach ($sprefix in $rule.SourceAddressPrefix) {

if ($sprefix -ne $rule.SourceAddressPrefix[0]) {

$sprefix=";" + $sprefix

}

$info.SourceAddressPrefix += $sprefix

}

foreach ($dprefix in $rule.DestinationAddressPrefix) {

if ($dprefix -ne $rule.DestinationAddressPrefix[0]) {

$dprefix=";" + $dprefix

}

$info.DestinationAddressPrefix += $dprefix

}

$info.SourceApplicationSecurityGroups = $rule.SourceApplicationSecurityGroups[0]
$info.DestinationApplicationSecurityGroups = $rule.DestinationApplicationSecurityGroups[0]
$info.Access = $rule.Access
$info.Priority = $rule.Priority
$info.Direction = $rule.Direction

$report += $info
}
}

$report

Quick question now that we have created items in their own thread, how can I do an invoke-command or start-process to open a folder or .exe. When I run this now I never see this since it's on a background thread.

Follow me on Blogarama