Posts

Showing posts with the label Powershell

PowerShell script to get some AzureAD logins stats

Image
 The information you get in the Azure portal about logins are decent, but some time you need some statistic or insight fast and don't want to use the graphic interface or down load csv/json files. I have created som script and favourite lines and uploaded it to my Github repo

Test-MigrationReadyness.ps1 Script

Image
I have added a OneDrive/SharePoint migration related script to my GitHub This is an add-on to make my script " Test-OneDrivePath.ps1 " only check against specified folders (and its subfolders) instead of all folders in the specified path.

Slides and links to scripts from my NIC 2019 sessions

Image
Another Nordic Infrastructure Conference has come to an end. As always got to talk to lots of interresting people attending and speaking. Got my first bluescreen during a presentation, looks like it was dlidusb2.dll a DisplayLink driver that caused it. Luckily my Surfacebook 2 booted up fast and got me going without to much hassle.

PowerShell script to create a junction point to make it easier to access OneDrive from VDI, Citrix and Remote Desktop Services

Image
A workaround when you are using any kind of Remote Desktop Services, VDI and other terminal services function (or applications) that do not support the OneDrive for business client is accessing the files from the PC you are physical logged on. But browsing to the file path where the files/file links are physical locate might be a bit too much to ask your users for.

Migrating users homefolders or fileshares to OneDrive/Sharepoint with PowerShell

Image
Moving files from on premise fileservers are a task more and more organizations are working with, both home folders to OneDrive and fileshares to sites. Microsoft have created a nice graphical interface for this task "Microsoft SharePoint Migration Tool", you can check it out in my blog post " Migration users homefolders to OneDrive with Microsoft SharePoint Migration Tool " But there are some limitations, and in many cases, it might be simpler to just script the process. Microsoft has also created a guide for that too. The guide are called " Upload on-premises content to SharePoint Online using PowerShell cmdlets "

NICCONF: OneDrive Scripts

Image

Exchange: Find mailboxes without language settings and fix it without messing up the correct once

Had some users that had problem setting up Outlook profile. When they logged on to the web mail interface they where asked about regional settings. After that setting up the profile worked. Doing some investigations we discovered that lots off users did not have the settings.

Ignite Session: THR3026, The Presentation!

Image
Had an awesome Microsoft Ignite, my session was packed with the most excellent people. I recorded my demos, so I promised to make the demos available here on my blog.

Ignite Session: THR3026, THE Script!!!

Without any fuzz, here it is The Script. Short and sweet just like me. Will make a better blogpost with more info so watch this blog ;-)

Ignite Session: THR3026 - Migrating home folders to OneDrive for Business

Image
One of the big benefit of working in a company like Lumagate is the focus on continuous development of knowledge among the employees. Combining this with the amassing culture of sharing is caring mentality, gives us that special edge that is needed to solve challenges. I had been trying to create a script to search for OneDrive limitations in folders to use before migrating or to have as a troubleshooting tools during migration. The Microsoft support and recovery assistant for office 365  can be helpful, but that require to be installed and are a GUI based solution. So running a script is a much more efficient way. I was a bit stuck so I just posted a "help me, please" note in our Teams channel and 1 hour late I had a really promising draft of a script handed to me by my colleague Reidar Johansen .

Are alle necessary updates in place

Image
When you are setting up servers and installing Server software you will often discover that you are missing certain KB updates that are requirements for the software. Often will this be related to that server are patch from a strict security related point of view, so new "features", will not be pushed out by SCCM or other similar tools. Sadly with this strategy important optimization and stability upgrades as well as necessary updates for application installation are missing.

When was Windows started?

Image
How long have the Server of PC been running? Sometimes you need to figure when the OS was started. As always there are different was of getting this information. Some ways are quick and easy when you are sitting with the OS GUI in front of you, but other times you might want to use it in a script or get it from the command line. Here are a selection of methods I use. GUI You can checkout network adapter duration, but you will easier find the "Task Manager - Performance - Up Time"

When was Windows installed?

Image
For different reason, you might want to know when Windows installed. Luckily you can find this information other places then checking out the date on certain system files that was created/modified and stamped at the same time as when you installed Windows. The file date stamp method does not in calculate that files change this information during upgrades etc. during the lifecycle of the installation  In registry, you have a Key to help you with this information. HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\InstallDate

A Safer Way Of Running Unsigned Powershell Scripts

Image
There is no doubt that as a company you should have setup a way of signing all the PowerShell script you are intending to run in your production environment. But as we all known there will be situation where you want to run unsigned code, or maybe you are testing things out before you are ready to sign them.

Microsoft Intune major update

Image
Modern users are a challenge for any organization. With different devise and usage pattern than many organization are prepared for, we are risking the security of our content and stability of our systems.  So, the need for a mobile/modern device management tool (MDM) that can help use remain secure and stable are for many a top priority. The Microsoft EM+s suit contains all the tools that you need in a modern MDM solution.

Windows 10 - Changing network profile from public to private

Image
Sometimes you need to make sure that your network profile are defined as “Private”, for instance when you want to connect to the computer with Remote desktop, or other firewall related configurations. First time you connect to a network you will get a pop up that actually are asking you if you want the network to be used as a “Private” or “Public” network, it just ask in a bit “confusing” way. (Domain profile” are only available for domain joined computers and will be automatic selected if there is a domain controller on the network).

Check if your script are running in administrator context

Image
Doing system changes via a script files will often require that you run it in the context of administrator. Doing this with script I run myself is easy enough, I know that if it fails it is because I forgot to use "Run as administrator" when I started it (or did a poor job creating the script). However when creating scripts that other people will run it will be a good idea to add a check in the script and give feedback to the person running it.

Windows Server 8 Deduplication

Image
The new deduplication in Windows Server 8 looks awesome, and it just might be the "killer app" for many business to start using Windows Server 8.  The feature will make it possible for companies or servers that don't use SAN/NAS with deduplication to save disk space, alot if disk space.

Windows Server 8 Beta, how to get started testing it out

Image
The Windows Server 8 Beta are available for download and testing. Downloading it from here  and installing it are no problem, but what to do when you have installed it might be harder to know. There will always be clear visual differences you might want to check out, but sooner or later you just don't know what to test out or how to acctualy test it out. Or maybe you just want a better structured lab.