powershell
2092 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.995KViews8likes5CommentsHow 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.447KViews8likes28Comments$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 -DisableNameCheckingSolved445KViews0likes10CommentsStep-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.222KViews3likes21CommentsHow 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!222KViews15likes12CommentsPowerShell 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.213KViews13likes33CommentsConfigure 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.173KViews11likes12CommentsPowerShell 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.166KViews11likes4CommentsCan't import SharePoint online Powershell module
when I use Import-Module Microsoft.Online.SharePoint.PowerShell it says PS C:\Windows\system32> Import-Module Microsoft.Online.SharePoint.PowerShell Import-Module : Could not load type 'Microsoft.SharePoint.Administration.DesignPackageType' from assembly 'Microsoft.SharePoint.Client, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'. At line:1 char:1 + Import-Module Microsoft.Online.SharePoint.PowerShell + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Import-Module], TypeLoadException + FullyQualifiedErrorId : System.TypeLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand I have this binary module installed: Directory: C:\Program Files\WindowsPowerShell\Modules ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Binary 16.0.86... Microsoft.Online.SharePoint.Powe... Binary 16.0.80... Microsoft.Online.SharePoint.Powe... Any clues?165KViews0likes27Comments