<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><title>Vatland</title><link>https://www.vatland.no/</link><description>Notes on PowerShell, Exchange, Skype for Business, ESP and more</description>
<item><title>My ‘simple’ keg scale</title><link>https://www.vatland.no/my-simple-keg-scale/</link><guid>https://www.vatland.no/my-simple-keg-scale/</guid><pubDate>Sun, 02 Jun 2024 13:10:39 GMT</pubDate><description>Since Plaato is retiring their Keg scale in 2024/25 I had to find a new solution. Searching the web lead me to GitHub – Callwater/Beerkeg-load-cell. Since I had some ESP and loadcells at my hands it was very quick to setup. Had some wood and a router in my ‘workshop’ so made the base in a short time</description></item>
<item><title>List NordPool electric prices using powershell.</title><link>https://www.vatland.no/list-nordpool-electric-prices-using-powershell/</link><guid>https://www.vatland.no/list-nordpool-electric-prices-using-powershell/</guid><pubDate>Mon, 10 Jan 2022 13:40:19 GMT</pubDate><description>This is a small script using nordpoolgroup api to get todays electric prices for Kr.sand – Norway. This is the same API as their webpage uses. All the urls and parameters can be found using developermode in the browser. This code is only to demonstrate that it can be done. It all started when i firs</description></item>
<item><title>Windows 11 update error 0x80070002</title><link>https://www.vatland.no/windows-11-update-error-0x80070002/</link><guid>https://www.vatland.no/windows-11-update-error-0x80070002/</guid><pubDate>Fri, 03 Dec 2021 14:21:02 GMT</pubDate><description>Have been struggling with this error for some time. I was stuck with some old build in the developer channel. It was the CU updates that failed, almost all others installed ok. Hoping that a new build would manage to install, but no. I decided to finally to a inplace-upgrade to latest build, Downloa</description></item>
<item><title>SIlly powershell TXT Fractal animation</title><link>https://www.vatland.no/silly-powershell-txt-fractal-animation/</link><guid>https://www.vatland.no/silly-powershell-txt-fractal-animation/</guid><pubDate>Sun, 11 Apr 2021 06:55:43 GMT</pubDate><description>Found some c# code drawing a Mandelbrot fractal (I’am so sorry I cant remember where or who) and thought that would be fun to do in powershell. Ended up doing a little animation of the fractal. All done in ASCII. This will not work if you run it in ISE or VS Code terminal. param( [switch]$animate = </description></item>
<item><title>PS 2.x convertfrom-json</title><link>https://www.vatland.no/ps-2-x-convertfrom-json/</link><guid>https://www.vatland.no/ps-2-x-convertfrom-json/</guid><pubDate>Thu, 08 Apr 2021 11:33:33 GMT</pubDate><description>Powershell 2 does not have a convertfrom-json function and I like to use json files for storing configuration. Searching the web gives almost zero results. Converting a multilevel json structure to hashtable would be very complicated. Since my config files are only one level the easiest way of doing</description></item>
<item><title>List users and licenses in Database</title><link>https://www.vatland.no/list-user-and-license-in-database/</link><guid>https://www.vatland.no/list-user-and-license-in-database/</guid><pubDate>Fri, 26 Mar 2021 19:47:54 GMT</pubDate><description>Now that we have a database containing user, tenant and license it would be nice to have a function/command to list this. Took me a while to figure it out but thanks to Bing, I prefer Bing before google. I sync my database on a schedule once a day. This way my data is new. Based on this data you cou</description></item>
<item><title>Import user licenses from CSP using CSP api and graph.</title><link>https://www.vatland.no/import-user-licenses-from-csp-using-csp-api-and-graph/</link><guid>https://www.vatland.no/import-user-licenses-from-csp-using-csp-api-and-graph/</guid><pubDate>Sun, 31 Jan 2021 20:08:58 GMT</pubDate><description>Hi,there.This is also quiet simple. I want to get all users and what licenses they have been assigned. All this should do, is retrieve information using a csp token.After some attempts this is my best one. The “goodlooking” argument will not work when run from ISE.I’am still using the same database.</description></item>
<item><title>Use get-tenantlicsindb after syncing them to our local db.</title><link>https://www.vatland.no/use-get-tenantlicsindb-after-syncing-them-to-our-local-db/</link><guid>https://www.vatland.no/use-get-tenantlicsindb-after-syncing-them-to-our-local-db/</guid><pubDate>Sun, 31 Jan 2021 19:19:28 GMT</pubDate><description>Ok, Now that we have syncronized our customers licenes to a local DB, we have this new commandlet to list them. This is a easy one, no advanced tokens setup to connect to Microsoft endpoint, only local database. function get-tenantlics { &lt;# .SYNOPSIS List tenant licenses from your CSP .DESCRIPTION L</description></item>
<item><title>Add tenant licenses from csp to database.</title><link>https://www.vatland.no/add-tenant-licenses-from-csp-to-database/</link><guid>https://www.vatland.no/add-tenant-licenses-from-csp-to-database/</guid><pubDate>Sun, 17 Jan 2021 21:39:17 GMT</pubDate><description>This is a followup from previus post. In this post I will populate the database with what licenses a tenant has aquired. This will add records of what aquired skus and ‘usage’. For me this is how many license are bought versus how many are assigned. This does not account for senarios other than CSP.</description></item>
<item><title>Get-tenantlistindb (from previous post)</title><link>https://www.vatland.no/get-tenantlistindb-from-previous-post/</link><guid>https://www.vatland.no/get-tenantlistindb-from-previous-post/</guid><pubDate>Fri, 08 Jan 2021 13:20:02 GMT</pubDate><description>Now that we have our tenants listed in a database table, listing them is quite easy. Added a switch that allow you to also list deleted/removed tenants. function get-tenantlistindb { param( [switch]$all ) $SQLInstance = &quot;localhost\SQLExpress&quot; $SQLDatabase = &quot;Microsoft365&quot; $sqlqr = &quot;select * from [Mi</description></item>
<item><title>Log tenants from office 365 to local Db</title><link>https://www.vatland.no/log-tenants-from-office-365-to-local-db/</link><guid>https://www.vatland.no/log-tenants-from-office-365-to-local-db/</guid><pubDate>Sun, 03 Jan 2021 20:43:57 GMT</pubDate><description>Hi, I like to keep control of how many licenses our cutomers use versus how many have been purchased. Here is 1st part my PS script to copy the info from csp to the DB. I will start creating a database and table to keep a list of all the tenants in the csp. You will also need an service principal in</description></item>
<item><title>Powershell 2.0 Json to Hash</title><link>https://www.vatland.no/powershell-2-0-json-to-hash/</link><guid>https://www.vatland.no/powershell-2-0-json-to-hash/</guid><pubDate>Wed, 11 Nov 2020 07:06:38 GMT</pubDate><description>Resonse from webrequests are normally in Json format and converting back and forth is no problem using convertto/from-json. Only this time some computers did run Powershell 2.0 and did not have any “new” .NET framework installed. So I ran to a halt at this Json converting. Since my data did have pre</description></item>
<item><title>Hash tables in powershell</title><link>https://www.vatland.no/hash-tables-in-powershell/</link><guid>https://www.vatland.no/hash-tables-in-powershell/</guid><pubDate>Mon, 23 Mar 2020 11:07:52 GMT</pubDate><description>We all have the need to store data in some kind of arrays. I use hashtables a lot. Preferred use is as a lookup table, I can use ‘contains’ instead of looping through each item or reference an object by name instead of index number. Lookup table for licenses is where I use it the most at the time be</description></item>
<item><title>SecretServer(Thycotic) plugin for powershell SecretsManagement module.</title><link>https://www.vatland.no/secretservertycotic-plugin-for-powershell-secretsmanagement-module/</link><guid>https://www.vatland.no/secretservertycotic-plugin-for-powershell-secretsmanagement-module/</guid><pubDate>Tue, 18 Feb 2020 12:37:36 GMT</pubDate><description>With the new powershell module SecretsManagement it is possible to add plugins. The new module is used to get/add/remove credentials. I created a plugin for secretserver to this module. To get started you will have to install secretsmanagement: Install-Module -Name Microsoft.Powershell.SecretsManage</description></item>
<item><title>Simple Powershell MRU list</title><link>https://www.vatland.no/simple-powershell-mru-list/</link><guid>https://www.vatland.no/simple-powershell-mru-list/</guid><pubDate>Mon, 23 Dec 2019 08:46:07 GMT</pubDate><description>When using using my secret server powershell functions I got tired of constantly searching for secret ID’s. I had to do a new search just because I could not remember the ID’s. So I added some kind of MRU to my get-secretID function. This code block creates to classes mruitem and mrulist. The mrulis</description></item>
<item><title>Get Secretserver secret</title><link>https://www.vatland.no/get-secretserver-secret/</link><guid>https://www.vatland.no/get-secretserver-secret/</guid><pubDate>Thu, 03 Oct 2019 08:55:28 GMT</pubDate><description>Since we are using SecretServer as our credential store it is of great help to be able to get credentials directly from powershell. This is a small function that connects to secretserver webservices and retrieve a secret based on secred ID. The function will connect to the webservice as the signedin</description></item>
<item><title>CSP access to tenants using powershell. Part 4</title><link>https://www.vatland.no/csp-access-to-tenants-using-powershell-part-4/</link><guid>https://www.vatland.no/csp-access-to-tenants-using-powershell-part-4/</guid><pubDate>Tue, 24 Sep 2019 07:25:26 GMT</pubDate><description>This is a small script that connects to partnercenter list all customers tenants and let you select one. When one is selected it connects to azuread and az for that customer. All my credentials are stored in SecretServer . I use a web service request to get those credentials. I will show these modul</description></item>
<item><title>Use powershell to get external IP address</title><link>https://www.vatland.no/use-powershell-to-get-external-ip-address/</link><guid>https://www.vatland.no/use-powershell-to-get-external-ip-address/</guid><pubDate>Mon, 23 Sep 2019 06:22:15 GMT</pubDate><description>How can you get your external IP address from powershell? I use a simple script to query an external public web service. The service I’m using is hosted by ipinfo.io . I have created a small function that is placed in my powershell library. All my modules are loaded by using powershell profiles. Thi</description></item>
<item><title>CSP access to tenants using powershell. Part 3</title><link>https://www.vatland.no/csp-access-to-tenants-using-powershell-part-3/</link><guid>https://www.vatland.no/csp-access-to-tenants-using-powershell-part-3/</guid><pubDate>Mon, 23 Sep 2019 05:35:25 GMT</pubDate><description>In this part 3 of CSP and powershell I will show how you can connect to azureAD of a customer tenant using your CSP app credentials and refreshtoken. This is almost the same procedure as we use to connect to az. We will start with the same variables as in part 2. Remember to keep your credential and</description></item>
<item><title>CSP access to tenants using powershell. Part 2</title><link>https://www.vatland.no/csp-access-to-tenants-using-powershell-part-2/</link><guid>https://www.vatland.no/csp-access-to-tenants-using-powershell-part-2/</guid><pubDate>Fri, 20 Sep 2019 07:01:55 GMT</pubDate><description>In part 1 we created the Azure Enterprise App for Partnercenter and used this information to connect using powershell and connect-partnercenter. Now we will use this to connect to one of our customers tenants. First we will use AZ module and connect-azaccount. We will use the AZ module and the partn</description></item>
</channel></rss>
