AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Download windows powershell9/24/2023 If you're prompted to install the NuGet provider, type Y and press Enter.Run the Install-Module MSOnline command.Open an elevated Windows PowerShell command prompt (run Windows PowerShell as an administrator).If you're not running Windows 10, install the 32-bit version of the Microsoft Online Services Sign-in Assistant: Microsoft Online Services Sign-in Assistant for IT Professionals RTW.įollow these steps to install and import the Microsoft Azure Active Directory Module for Windows PowerShell: Run these cmdlets from Windows PowerShell. PowerShell Core doesn't support the Microsoft Azure Active Directory Module for Windows PowerShell module and cmdlets with Msol in their name. For PowerShell version 7 and later, you must use the Microsoft Graph PowerShell SDK. PowerShell version 7 and later don't support the Microsoft Azure Active Directory Module for Windows PowerShell module and cmdlets with Msol in their name. Connect with the Microsoft Azure Active Directory Module for Windows PowerShellĬmdlets in the Microsoft Azure Active Directory Module for Windows PowerShell have Msol in their name. If you're using multi-factor authentication, follow the instructions to provide additional authentication information, such as a verification code.Īfter you connect, you can use the cmdlets for the Azure Active Directory PowerShell for Graph module. In the Sign into your account dialog box, type your Microsoft 365 work or school account user name and password, and then select OK. Government GCC HighĬonnect-AzureAD -AzureEnvironmentName AzureUSGovernment (It doesn't have to be elevated.) Office 365 cloudĬonnect-AzureAD -AzureEnvironmentName AzureChinaCloudĬonnect-AzureAD -AzureEnvironmentName AzureGerman圜loud To connect to Azure Active Directory (Azure AD) for your Microsoft 365 subscription with an account name and password or with multi-factor authentication, run one of these commands from a Windows PowerShell command prompt. Step 2: Connect to Azure AD for your Microsoft 365 subscription Run this command to import the module: Import-Module AzureAD Yes Yes to All No No to All Suspend Help (default is "N"):Īnswer Yes or Yes to All to continue with the installation. If you trust this repository, change its InstallationPolicy value by running the `Set-PSRepository` cmdlet.Īre you sure you want to install the modules from 'PSGallery'? You are installing the modules from an untrusted repository. The first time you use the PSGallery, you'll see the following message: Untrusted repository Run this command: Install-Module -Name AzureADīy default, the PowerShell Gallery (PSGallery) isn't configured as a trusted repository for PowerShellGet. Open a Windows PowerShell Command Prompt window. But you'll likely need to update the software periodically. These steps are required only one time on your computer. If you have any questions or suggestions, please leave your comment.For information about support for different versions of Windows, see Azure Active Directory PowerShell for Graph module. To verify that the services started correctly type:Īnd that’s it! Opening the folder “D:\NewUpdatesDownloadFolder” you’ll see that the Windows update service already started to populate the folder.Īs always, if you found this article useful, share it with your friends. New-Item -Path C:\Windows\SoftwareDistribution -Value D:\NewUpdatesDownloadFolder -ItemType JunctionĪ new folder with a shortcut icon is now in C:\Windows New-Item D:\NewUpdatesDownloadFolder -ItemType Directory $deletefolder = "rmdir " + $qm + "C:\Windows\SoftwareDistribution" + $qm + " /S /Q" Probably I could use single quotation marks, but I’ll have to leave it for another time. Stopping the Windows update service (wuauserv)Īnd to determine the service status, type Get-Service wuauservĪnd again, to determine the service status, type Get-Service BITSĮxecute the following code, line by line Sorry for the next piece of code not being properly highlighted but the plugin I’m using to highlight code, somehow, doesn’t work properly with double quotation marks. This is where I’ll be creating the new folder to store the updates. To determine what volumes you have and their free space, type Get-VolumeĪs it is possible to see from the image above, I have a volume, which is called “Dados” (Drive D), that has about 372 GB free. If an UAC prompt pops-up, click “Yes”.ĭetermining the new folder location List Volumes Right-click the “ Start Menu” and click on “ Windows Powershell (Admin)“. What we’re trying to achieve here is to save some valuable space on our system drive. Remember that you’ll need to have at least two partitions on your computer or two different hard drives for this process to make sense. In this one, I’m going to do it using Powershell. In a previous article, I’ve shown you how to change the location of the Windows updates download folder, using the GUI.
0 Comments
Read More
Leave a Reply. |