Friday 12 July 2019

Get BitLocker status from all AD computers

If you need to check if all your Active Directory joined computers has BitLocker encrypted hard drives, then it's easy way to do it with powershell and manage-bde :

get-adcomputer |%{manage-bde -status c: -computername $}

Thursday 9 May 2019

AzureAD 2.0 - installing on Windows Server 2012R2

In order to install AzureAD 2.0 you need to install WMF5.1 first:

Then, run in powershell:

 And then check and import it:

You can now check new commands available:

You can also check following Microsoft site:

Windows Server 2008, 2012, 2012R2: Install-Module is not recognized

When you want to user Install-Module on Windows Server 2018 or older you can see following error:

This could happened if you for example need to install AzureAD 2.0 powershell.
You then need to go to :
and get the package for your operating system

Follow on screen wizard and restart your server.
After that you should not have problem using install-module cmdlet:

Friday 29 March 2019

Using split in powershell to get remove part of the filename

In order to change filenames in bulk using string you can use split switch to filter out first part of the file name.
For example, when I need to cut of "car" part of the file name, then I can use

get-childitem|%{$newname=$ -split ("car")|select -Last 1;Rename-Item $ -NewName $newname}

Friday 19 October 2018

Cannot install Teams using .msi package

You probably want to install teams using GPO, and you actually Microsoft article about this:

On this website there are msi packages of Teams. Unfortunately, when you want to install Teams using one of them, you encounter a problem, because Teams not starting, even if you can see installed program in the Programs and Features list.

Problem: cannot use .msi package of Teams
Solution: change .msi package by adding ACCEPT_EULA=1 property using Super Orca application.

All you need to do is to add a row ACCEPT_EULA with value of 1.

After that you can save and use changed msi package with the GPO installation package.
NOTE: you need to use user part of GPO, not the computer one, cause "installation" is made in the appdata user folder.

Monday 26 March 2018

HP Event notifier cannot start

You cannot install HP Event Notifier on the Windows Server (2012+)
First, you need to add SNMP Service feature to your server.
Then to be sure it runs correctly, add localhost to allowed senders for SNMP packets:

Next, install HP providers, for example from this link:
Then, run Event Notifier as an administrator:

After configuring, for sending test, run Test WBEM Events as an administrator.

If you encounter an error during sending test or tests are not sent do recipient, restart this service:
and the same with SNMP service

Thursday 15 February 2018

Remote Desktop Services deployment does not exist

When you are on the server and want to list active session using Get-RDUserSession command, you can see an error telling you that your have no RDS installed (even on RDS session broker), like the one below:

Don't be fooled by this - it shows only because you don't have enough privileges. Just run Powershell session as an administrator and bam! You can see desired list.

BTW: My small advice here - if you see PS errors, but you're sure, that cmd-let should work, check it with elevated privileges.