Delete Empty Load Balancers with No Virtual Machines

Hi All, Below script will help you to find and delete empty load balancers with no virtual machines from Azure environment.   Find Empty Load Balancers You can find an empty load balancer by checking its BackEndIPConfigurations. Example:- $myLoadBalancer = Get-AzureRmLoadBalancer -ResourceGroupName ‘MyTempResourceGroup’ -Name ‘MyTempLoadBalancer’ if($myLoadBalancer.BackendAddressPools.Backendipconfigurations -eq $null) {     Write-Host “Load Balancer is empty”…

0

Run PowerShell using Local System Account

You will very frequently come into a scenario where you will need to run some commands using local system account. In my case, I was working on a windows service running using local system account. The windows service internally was calling PowerShell scripts. I developed PowerShell scripts independently and they were absolutely working fine(running using…

0

Update tags on Azure Virtual Machines

Hi All, There is an excellent blog available on adding new tags on Azure Virtual Machines. Adding new tags is simple and direct, but updating existing tags requires little more logic. So here is my blog solving this problem. Scenario In below screenshot, I have one virtual machine with existing tag ‘Builder’. I will be…

0

SCCM Application Detection Rule using Registry setting type

Hi All, There are multiple blogs posts available on how to setup a detection rule for sccm application. However, I find it difficult to set registry setting type correctly i.e. what values should go in fields like ‘key’, ‘value’, ‘data type’ etc. So here is my blog post answering such questions. I am sharing one…

0

Keeping PowerShell VisualBasic MessageBox in Focus

  Hi All, I faced issue where I was using Visual Basic MessageBox for showing messages to users, but the popups were getting hidden behind my tool window. I had to explicitly select them, bring them to front and take action on the popup. I also tried using ‘System.Windows.Forms.MessageBox’ but it again resulted in a…

1

Copying data from one SQL server table to another SQL Server table

  Hi Readers, I had a requirement where I had to copy data from one SQL Server located in U.S. (Source Server) to SQL Server located in India (Destination Server). The copy has to be triggered when data is inserted at Source Server table. I encountered various issues starting from Linked server connection, collation issues…

2

SharePoint O365 List – Remove Hyperlink from Title Column

  Hi All, I had a requirement in my project where I had to remove the hyperlink from the Title column and add another hyperlink column with different display name like ‘View Entry’. We will see in this blog on how to achieve this 1. Remove hyperlink from Title column. 2. Add Hyperlink in ‘Multiple…

0

Copying Azure Images across subscriptions

  There have been multiple blogs on this on internet but still I faced problems during assigning values to variable or while checking order of commands. So here comes my blog with sample values and easy to understand and use. Here we will see , how you can copy Images(internally vhd) from one subscription to…

1

Move Azure VM across Cloud Service

  I came across a requirement of moving my azure VMs from one cloud service to another in same subscription. I had Azure VMs having same prefix like ‘MyProjectVM(N)’ where N is from 1..N. So here comes my blog providing such solution. Below is the code to move a VM from one cloud service to…

9

Encode in C# and Decode in PowerShell

  I had a requirement to read some data in C# windows application, store it in database  and then later use it in a PowerShell script. It was also required that some data like ‘Keys’ should not be saved directly in database i.e. should not be visible directly to other database users. One approach is…

1