powershell
2164 TopicsPowerShell Basics: How to Force AzureAD Connect to Sync
In every organization, the possibility of role changes or change of contact information can occur quite frequently. AzureAD Connect is a great tool that allows administrators to make said updates either on-premises or in cloud and will sync all changes accordingly. It can take up to 30 minutes for Azure Active Directory to update these changes when these changes are applied on the on-premises Active Directory instance and vice-versa via AzureAD Connect. It can also take up to an additional 30 minutes to then sync changes with Office 365. This post will detail steps to force AzureAD Connect to sync on command when required via PowerShell to combat the delay.1MViews8likes5CommentsHow to In-Place Upgrade Windows Server 2008 R2 to Windows Server 2019
As you know the Windows Server 2008 and Windows Server 2008 R2 are out of support on January 14th, 2020. Customer will need to upgrade their Windows Server 2008 and Windows Server 2008 R2 to a newer version of Windows Server or migrate these servers to Microsoft Azure.455KViews8likes28Comments$cred = Get-Credential without asking for prompts in powershell
I am trying to run a script and i wanted to run it silently without asking for credential prompts. Is there a way to get around using "$cred = Get-Credential" without a prompt The script i am trying to use is # Connect to Office 365 # $username = "" $password = ConvertTo-SecureString "mypassword" -AsPlainText -Force #$secureStringPwd = $password | ConvertTo-SecureString -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential -ArgumentList ($user, $password) Import-Module MSOnline $cred = Get-Credential Connect-MSolService -credential $cred $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell-liveid/ -Credential $cred -Authentication Basic -AllowRedirection Import-PSSession $Session -AllowClobber -DisableNameCheckingSolved448KViews0likes10CommentsStep-By-Step: How to Create a Windows 11 VM on Hyper-V via PowerShell
This step-by-step guide outlines how to create a Windows 11 virtual machine (VM) on Hyper-V using PowerShell commands. By following these instructions, IT professionals can save time and effort by automating the process and ensuring that each VM is configured correctly. This method is particularly useful for organizations that need to deploy multiple VMs quickly and efficiently.251KViews3likes21CommentsHow to run a Windows 11 VM on Hyper-V
Happy new year everyone! Last month, before the holidays I wanted to run a Windows 11 VM on Hyper-V to run a few tests on Windows containers in a different environment than my local machine. However, it took me some time to get that VM up and running, simply because I forgot about the new hardware requirements for Windows 11 and that I had to get them configured before I installed the new OS in it. This blog post is my contribution so you don’t have to go through the same!246KViews17likes14CommentsPowerShell Basics: How to Delete Microsoft Teams Cache for All Users
Sometimes there is a need to delete Microsoft Teams cache to quicken the adoption of an in-band policy change or simply troubleshoot an issue. The challenge here is that the cache for Microsoft Teams is in multiple directories. This can be done manually but would result in a slow and tedious process. Again, we turn to PowerShell to automate this process and this time it's a one-liner that addresses this opportunity.214KViews13likes33CommentsConfigure Visual Studio Code to run PowerShell for Windows and PowerShell Core Simultaneously
As a PowerShell fan, I have recently adopted PowerShell Core as my version of choice. This post will detail how I've used the Shell Launcher Visual Studio Code extension to configure my Windows system to run PowerShell Core and PowerShell for Windows simultaneously as required.176KViews11likes12CommentsPowerShell Basics: How to Delete Files Older Than X Days
Currently spring cleaning your home... or trying to find something to do while stuck at home? I've recently taken up the task to clean my NAS and other storage devices of files not touched in over 6 months to clear up storage space. I once again turn to PowerShell to automate the task.174KViews11likes4Commentsdynamic group based on assigned license
Hi, is it possible to create a group with users based on a assigned license? So i want to include all users into this specific group who has e.g. an E3 license assigned, but not an E5. It seems, that the only way is to use the a ServicePlan name, not a SKU name, isn't it? Even better would be a dynamic membership rule based on the SKU, not on a ServicePlan. What i tried to do: 1. Get-MsolAccountSKU to find out the SKU name 2. Created a dynamic group without knowing which syntax to use :D 3. Used this dynamic membership rule as a workaround: (user.assignedPlans -any ((assignedPlan.service -match "NAME") -and (assignedPlan.capabilityStatus -eq "Enabled"))) (I found the ServicePlan names via Get-MsolAccountSku | Where-Object {$_.SkuPartNumber -eq “ENTERPRISEPREMIUM”} | ForEach-Object {$_.ServiceStatus} Thank you ina advance. Patrick :)172KViews1like29Comments