Powershell – List Users Logged Into A Range Of Computers

So this script get a list of users logged into computers. It uses my personal favourite RDS PowerShell module but works on PCs. Note: some firewall rule(s) inbound may be required.

Its something I did one night when pondering how to show an availability sheet for rooms where there is only 1 specialist PC in a room for use by many people (and there are 30 rooms)

So rather than use a calendaring system, just look at  an internet webpage and choose your nearest room that is free.

This may also help admins that find the Get-DesktopVM details missing about users when using Horizon View PowerCLI.

It would be easy to modify this script to use the results of Get-DesktopVM (rather than a security group) to obtain a list of computers to check

It only looks for an active user. any use that has been switched out (disconnected status) is filtered out.




Powershell – Check That SCCM User Environment Is Setup

SCCM is a bit fiddly it has its “own” powershell console that is a tad inconvenient. Also a lot of assumptions are made that the user is all good to go with SCCM cmdlets and that is usually far from the truth.

The following script is does few prerequisite checks to ensure it is all good to go for the novice SCCM Powershell user. The script is self documenting as to what checks I am doing. These check have been learnt the hard way. 🙂 

For the novice:
All SCCM Cmdlets have to run from the $SCCMSiteCodePath Location
Assumption is that the Security group ($SecurityGroupthatHasSSCMRights in the code) does have the correct rights to run the powershell functions against SCCM


Continue reading…