Archive for the ‘Scripts’ Category

From time to time I play Minecraft with friends. As a former SCOM geek I have¬†of course configured monitoring for this server ūüôā¬†The server¬†in this blogpost is a Windows server but most of the example works the same for a Minecraft server running on Linux.¬†On the Minecraft server there are two types of resources that […]

Document Azure subscription with PowerShell

Posted: 12th April 2016 by Anders Bengtsson in Azure, Scripts

I would like to share an idea around documentation for Azure subscription, and hopefully get some ideas and feedback about it. What I see at customers is that documenting what resources are deployed to Azure is a challenge. It is also a challenge to easy get an overview of configuration and settings. Fortunately with Azure […]

Add network card to Azure VM

Posted: 5th February 2015 by Anders Bengtsson in Azure, Scripts

This is a script I wrote when Pete and I were preparing our System Center Universe session a couple of Days ago. The scenario is that you have a VM running in Azure with one network card. Now you want to add another network card. It is only possible to add a network card when […]

List all containers in all storage accounts

Posted: 10th January 2015 by Anders Bengtsson in Azure, Scripts

This script list all containers in all storage accounts, in your Azure subscription. It is handy when looking for a container or a blob end point. $accounts = Get-AzureStorageAccount Foreach ($account in $accounts) { $sa = Get-AzureStorageAccount -StorageAccountName $account.storageAccountName $saKey = Get-AzureStorageKey -StorageAccountName $sa.StorageAccountName $ctx = New-AzureStorageContext -StorageAccountName $sa.StorageAccountName -StorageAccountKey $saKey.Primary Get-AzureStorageContainer -Context $ctx }¬† […]

Scaling Azure VM with Azure Automation, with help of Azure SQL

Posted: 8th September 2014 by Anders Bengtsson in Azure, Scripts

I am running a number of virtual machines in Microsoft Azure, some of them just a couple of hours and some I keep running 24/7. Often I don’t need them during the night, but some I still want to keep online to make sure database sync jobs runs. Previous I have been using a couple […]

Copy or rename a SMA runbook

Posted: 10th January 2014 by Anders Bengtsson in Scripts, SMA

You may have notice that in the Windows Azure portal there is no way to copy or rename a SMA runbook. But it is of course possible with a small Powershell script. The script in this blog post will copy a source SMA runbook and store all settings in a new SMA runbook. The script […]

I read on Technet that Microsoft recommend to use service templates in VMM 2012 even for a single server. Instead of using a VM template we should use a service template to deploy a new virtual machine. In Orchestrator there is an activity in the Virtual Machine Manager (VMM) integration pack that can create a […]

Maintenance Mode Report (part II)

Posted: 29th September 2011 by Anders Bengtsson in Scripts, System Center Operations Manager 2007

In the¬†Notification and reporting for maintenance mode post we created a report for every object that is in maintenance mode. I did a update to that script today, instead of showing all objects that are in maintenance mode the report now only show computer objects. You can download the script MMReport.txt (rename to .ps1). As […]

“Hello, is it IT support? My Internet is slow” Have you heard that before? Last week a customer asked me if we could monitor how long it takes to download a file from a client workstation, and present it in a nice performance view in the Operations Manager console. Of course we can, with a […]

Check Last Line Only

Posted: 4th June 2010 by Anders Bengtsson in Scripts, System Center Operations Manager 2007

I wrote a script to check only the last line of a file. The scripts checks the last line every time it run. If you search my blog you will find a number of script to read logfiles. Create a new two state script monitor where you include the script below.¬† In my example script […]