Menu

Virtual Geek

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

Blog posts : "Powershell"

PowerShell WPF XAML DataGrid control databinding datacontext example - Part 3

Earlier I wrote two articles regarding PowerShell WPF for DataBinding examples. In this article I will be using DataBinding to use with DataGrid control.

PowerShell WPF XAML simple data binding datacontext example - Part 1
PowerShell WPF XAML control to control data binding datacontext example…

Read more

PowerShell WPF XAML control to control data binding datacontext example - Part 2

This is a part 2 of PowerShell WPF XAML simple data binding datacontext example - Part 1. Here I will configure control to control data binding context in WPF XAML. In this example I am using Slider and TextBox controls to show example. Here if I change Slider it should update its value on TextBox …

Read more

PowerShell WPF XAML simple data binding datacontext example - Part 1

Windows Presentation Foundation (WPF) provides a simple and consistent way for applications to present and interact with data by binding elements to data from different kinds of data sources in the form of .NET objects and XML.

Here in this example I will show how to create simple WPF binding usi…

Read more

Securely Encrypt and Decrypt password with PowerShell GUI tool

This GUI tool is written using PowerShell and it helps encrypt given password and then decrypts that text to Password back. My colleague schedules PowerShell scripts a lot. Generally as best practice they do not use clear text password in their scripts. Instead they wanted to keep it in the encrypte…

Read more

Convert PowerShell ps1 to EXE using native windows tool iexpress

Some times it is essentials to convert your codes to EXE. In my scenario when I try to provide script to end users and if I expect them not to modify the script before running or executing it, I can convert any cmd bat or PS1 script to EXE easily using native windows tool called iExpress.exe, and ex…

Read more

PowerShell GUI get patch updates information with disk space and uptime

This script helps to get last installed patches, updates with dates, Server/System Last boot Uptime and C drive disk space information. This script was asked by one of the my SCCM team to troubleshoot in case if patches/updates installation are failing.

After executing script you can view the inf…

Read more

HOW to Add multiple email addresses to Distribution Groups in Exchange online Office 365

I was working with one of my client on a automation solution with PowerShell for Exchange Online. I wanted to write a PowerShell script to add secondary alias email addresses to Distribution Groups in Exchange online Office 365.

Base of the script is Set-DistributionGroup cmdlet which does all …

Read more

Powershell GUI System Hardware Information

After publishing a project Create an interactive HTML report with PowerShell data, few people gave me feedback, They implemented this and found it very useful that it shows the serial number of server/desktop hardware parts without opening the system and doesn't require downtime, All happens remotel…

Read more

Running Your First PowerShell Scripts With Jenkins and Git

Jenkins is the the top and leading open source automation server, It offers hundreds of plugins to help building (develop), deploying and automating any project. It is a great orchestration tool for automation. In this article I will use it to schedule a simple Job for PowerShell script using Git. 

Read more

Send Email using PowerShell with .net object System.Net.Mail.MailMessage

I have written this article to understand how email can be sent using System.Net.Mail.MailMessage .net object with PowerShell. Below is the complete documentation regarding this object https://learn.microsoft.com/en-us/dotnet/api/system.net.mail.mailmessage?view=net-7.0. Although you can use simp…

Read more

Send system disk space utilization HTML report Email using PowerShell

This script generates system disk drive usage HTML reports using PowerShell. This is very handy for sending weekly or daily reports of servers in html or host it on web server for monitoring. In my case VDI team contacted me for creating a system Disk HTML reports for VDI and sending them to concern…

Read more

Executing PowerShell script from PHP HTML web server

Recently I was reading some Advanced Python coding books, I was especially fascinated by the Flask module. This project is an outcome of the same, If similar can be achieved with PowerShell and HTML, I wrote some code in HTML, PHP and PowerShell and it is working well after testing. Here in this pro…

Read more

Find and use Azure Marketplace VM images with Azure PowerShell

You can use this write up to find Azure Virtual Machine images available on the Azure Marketplace using PowerShell Module Az (Azure) commands. Before proceeding you need to know a few jargon vocabulary related to Azure cloud VM Images. You can use below properties to find VM templates on Azure cloud…

Read more

Building basic simple Web Server using PowerShell

While writing few solutions for html code I wanted to test basic html web pages, which I required to check with web server, here PowerShell can be handy to create simple and basic web server to serve html web page for testing purpose.

Microsoft powershell web server httplistener http listener simple web server basic web server context response port url new-object.png

Download this code basic_webserver_httplistener.ps1 here…

Read more

Powershell Animation ANSI FileInfo color support for ANSI escape sequences | ASCII Art

Microsoft has released a new version of PowerShell 7.2. After installation of latest Microsoft PowerShell I was reading release notes and what's new document on https://docs.microsoft.com/en-us/powershell/scripting/whats-new/what-s-new-in-powershell-72?view=powershell-7.2. While reading, there is a…

Read more

Resolved PowerShell Visual studio code stuck with 'Starting up PowerShell' in status bar

On one of the my colleagues new laptop we were setting up Visual Studio Code environment. After installing Microsoft PowerShell extension on VSCode when executing PowerShell ps1 script, it was getting stuck/freeze/hang with message "Starting up PowerShell" at the bottom-right side, and it was showin…

Read more

Resovled issue with PowerShell - Trust relationship Rejoin computers in domain without restart

While working with The trust relationship between this workstation and the primary domain failed issue on Windows Servers, I used PowerShell cmdlet Test-ComputerSecureChannel and cmd command netdom to resolve the broken AD computer account trust relationship without reboot. Apart from these com…

Read more

PowerShell fix repair The trust relationship between this workstation and the primary domain failed

This is the issue I have always seen with Windows Server Administrator. They face below issue a lot in their day to day activities while logging with their domain account. When they login with local account it was successful. The cause of this issue is simple, whenever computer joins into domain the…

Read more

PowerShell save export data to XML file

I wanted to create XML file using PowerShell and PowerShell offers different ways to create XML file in different formats, with PowerShell you can create and generate different types of XML format. One of the simple way I shown in this article PowerShell Create XML document with XmlWriter .net obj…

Read more

PowerShell Create XML document with XmlWriter .net object

XML stands for eXtensible Markup Language it was designed to store and transport data and to be both human- and machine-readable. I wanted to create a simple readable XML files using PowerShell for few of the projects. There are native cmdlets (Export-CliXML and ConvertTo-XML) available in the Po…

Read more

20 blog posts

Blog Search

Page Views

9711450

Follow me on Blogarama