The following commands are already available on this system

In this Azure tutorial, we will see how to fix the error “The following commands are already available on this system” in PowerShell.

The following commands are already available on this system

Recently, I was trying to install the AzureAD module using the below PowerShell cmdlet in my system using PowerShell, I got the error “The following commands are already available on this system

PS C:\WINDOWS\system32> Install-Module -Name AzureAD
The following commands are already available on this system

The exact error message was as below

PackageManagement\Install-Package : The following commands are already available on this system:
‘Add-AzureADApplicationOwner,Add-AzureADDeviceRegisteredOwner,Add-AzureADDeviceRegisteredUser,Ad
d-AzureADDirectoryRoleMember,Add-AzureADGroupMember,Add-AzureADGroupOwner,Add-AzureADMSApplicati
onOwner,Add-AzureADMSLifecyclePolicyGroup,Add-AzureADServicePrincipalOwner,Confirm-AzureADDomain
,Connect-AzureAD,Disconnect-AzureAD,Enable-AzureADDirectoryRole,Get-AzureADApplication,Get-Azure
ADApplicationExtensionProperty,Get-AzureADApplicationKeyCredential,Get-AzureADApplicationLogo,Ge
t-AzureADApplicationOwner,Get-AzureADApplicationPasswordCredential,Get-AzureADApplicationProxyAp
plication,Get-AzureADApplicationProxyApplicationConnectorGroup,Get-AzureADApplicationProxyConnec
tor,Get-AzureADApplicationProxyConnectorGroup,Get-AzureADApplicationProxyConnectorGroupMembers,G
et-AzureADApplicationProxyConnectorMemberOf,Get-AzureADApplicationServiceEndpoint,Get-AzureADCon
tact,Get-AzureADContactDirectReport,Get-AzureADContactManager,Get-AzureADContactMembership,Get-A
zureADContactThumbnailPhoto,Get-AzureADContract,Get-AzureADCurrentSessionInfo,Get-AzureADDeleted
Application,Get-AzureADDevice,Get-AzureADDeviceConfiguration,Get-AzureADDeviceRegisteredOwner,Ge
t-AzureADDeviceRegisteredUser,Get-AzureADDirectoryRole,Get-AzureADDirectoryRoleMember,Get-AzureA
DDirectoryRoleTemplate,Get-AzureADDomain,Get-AzureADDomainNameReference,Get-AzureADDomainService
ConfigurationRecord,Get-AzureADDomainVerificationDnsRecord,Get-AzureADExtensionProperty,Get-Azur
eADGroup,Get-AzureADGroupAppRoleAssignment,Get-AzureADGroupMember,Get-AzureADGroupOwner,Get-Azur
eADMSApplication,Get-AzureADMSApplicationExtensionProperty,Get-AzureADMSApplicationOwner,Get-Azu
reADMSConditionalAccessPolicy,Get-AzureADMSDeletedDirectoryObject,Get-AzureADMSDeletedGroup,Get-
AzureADMSGroup,Get-AzureADMSGroupLifecyclePolicy,Get-AzureADMSIdentityProvider,Get-AzureADMSLife
cyclePolicyGroup,Get-AzureADMSNamedLocationPolicy,Get-AzureADOAuth2PermissionGrant,Get-AzureADOb
jectByObjectId,Get-AzureADServiceAppRoleAssignedTo,Get-AzureADServiceAppRoleAssignment,Get-Azure
ADServicePrincipal,Get-AzureADServicePrincipalCreatedObject,Get-AzureADServicePrincipalKeyCreden
tial,Get-AzureADServicePrincipalMembership,Get-AzureADServicePrincipalOAuth2PermissionGrant,Get-
AzureADServicePrincipalOwnedObject,Get-AzureADServicePrincipalOwner,Get-AzureADServicePrincipalP
asswordCredential,Get-AzureADSubscribedSku,Get-AzureADTenantDetail,Get-AzureADTrustedCertificate
Authority,Get-AzureADUser,Get-AzureADUserAppRoleAssignment,Get-AzureADUserCreatedObject,Get-Azur
eADUserDirectReport,Get-AzureADUserExtension,Get-AzureADUserLicenseDetail,Get-AzureADUserManager
,Get-AzureADUserMembership,Get-AzureADUserOAuth2PermissionGrant,Get-AzureADUserOwnedDevice,Get-A
zureADUserOwnedObject,Get-AzureADUserRegisteredDevice,Get-AzureADUserThumbnailPhoto,Get-CrossClo
udVerificationCode,New-AzureADApplication,New-AzureADApplicationExtensionProperty,New-AzureADApp
licationKeyCredential,New-AzureADApplicationPasswordCredential,New-AzureADApplicationProxyApplic
ation,New-AzureADApplicationProxyConnectorGroup,New-AzureADDevice,New-AzureADDomain,New-AzureADG
roup,New-AzureADGroupAppRoleAssignment,New-AzureADMSApplication,New-AzureADMSApplicationExtensio
nProperty,New-AzureADMSApplicationKey,New-AzureADMSApplicationPassword,New-AzureADMSConditionalA
ccessPolicy,New-AzureADMSGroup,New-AzureADMSGroupLifecyclePolicy,New-AzureADMSIdentityProvider,N
ew-AzureADMSInvitation,New-AzureADMSNamedLocationPolicy,New-AzureADServiceAppRoleAssignment,New-
AzureADServicePrincipal,New-AzureADServicePrincipalKeyCredential,New-AzureADServicePrincipalPass
wordCredential,New-AzureADTrustedCertificateAuthority,New-AzureADUser,New-AzureADUserAppRoleAssi
gnment,Remove-AzureADApplication,Remove-AzureADApplicationExtensionProperty,Remove-AzureADApplic
ationKeyCredential,Remove-AzureADApplicationOwner,Remove-AzureADApplicationPasswordCredential,Re
move-AzureADApplicationProxyApplication,Remove-AzureADApplicationProxyApplicationConnectorGroup,
Remove-AzureADApplicationProxyConnectorGroup,Remove-AzureADContact,Remove-AzureADContactManager,
Remove-AzureADDeletedApplication,Remove-AzureADDevice,Remove-AzureADDeviceRegisteredOwner,Remove
-AzureADDeviceRegisteredUser,Remove-AzureADDirectoryRoleMember,Remove-AzureADDomain,Remove-Azure
ADGroup,Remove-AzureADGroupAppRoleAssignment,Remove-AzureADGroupMember,Remove-AzureADGroupOwner,
Remove-AzureADMSApplication,Remove-AzureADMSApplicationExtensionProperty,Remove-AzureADMSApplica
tionKey,Remove-AzureADMSApplicationOwner,Remove-AzureADMSApplicationPassword,Remove-AzureADMSCon
ditionalAccessPolicy,Remove-AzureADMSDeletedDirectoryObject,Remove-AzureADMSGroup,Remove-AzureAD
MSGroupLifecyclePolicy,Remove-AzureADMSIdentityProvider,Remove-AzureADMSLifecyclePolicyGroup,Rem
ove-AzureADMSNamedLocationPolicy,Remove-AzureADOAuth2PermissionGrant,Remove-AzureADServiceAppRol
eAssignment,Remove-AzureADServicePrincipal,Remove-AzureADServicePrincipalKeyCredential,Remove-Az
ureADServicePrincipalOwner,Remove-AzureADServicePrincipalPasswordCredential,Remove-AzureADTruste
dCertificateAuthority,Remove-AzureADUser,Remove-AzureADUserAppRoleAssignment,Remove-AzureADUserE
xtension,Remove-AzureADUserManager,Reset-AzureADMSLifeCycleGroup,Restore-AzureADDeletedApplicati
on,Restore-AzureADMSDeletedDirectoryObject,Revoke-AzureADSignedInUserAllRefreshToken,Revoke-Azur
eADUserAllRefreshToken,Select-AzureADGroupIdsContactIsMemberOf,Select-AzureADGroupIdsGroupIsMemb
erOf,Select-AzureADGroupIdsServicePrincipalIsMemberOf,Select-AzureADGroupIdsUserIsMemberOf,Set-A
zureADApplication,Set-AzureADApplicationLogo,Set-AzureADApplicationProxyApplication,Set-AzureADA
pplicationProxyApplicationConnectorGroup,Set-AzureADApplicationProxyApplicationCustomDomainCerti
ficate,Set-AzureADApplicationProxyApplicationSingleSignOn,Set-AzureADApplicationProxyConnector,S
et-AzureADApplicationProxyConnectorGroup,Set-AzureADDevice,Set-AzureADDomain,Set-AzureADGroup,Se
t-AzureADMSApplication,Set-AzureADMSApplicationLogo,Set-AzureADMSConditionalAccessPolicy,Set-Azu
reADMSGroup,Set-AzureADMSGroupLifecyclePolicy,Set-AzureADMSIdentityProvider,Set-AzureADMSNamedLo
cationPolicy,Set-AzureADServicePrincipal,Set-AzureADTenantDetail,Set-AzureADTrustedCertificateAu
thority,Set-AzureADUser,Set-AzureADUserExtension,Set-AzureADUserLicense,Set-AzureADUserManager,S
et-AzureADUserPassword,Set-AzureADUserThumbnailPhoto,Update-AzureADSignedInUserPassword’. This
module ‘AzureAD’ may override the existing commands. If you still want to install this module
‘AzureAD’, use -AllowClobber parameter.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21

  • … $null = PackageManagement\Install-Package @PSBoundParameters
  • ~~~~~~~~~~~~
    • CategoryInfo : InvalidOperation: (Microsoft.Power….InstallPackage:InstallPacka
      ge) [Install-Package], Exception
    • FullyQualifiedErrorId : CommandAlreadyAvailable,Validate-ModuleCommandAlreadyAvailable,Mi
      crosoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

Now to fix this issue, Follow the below steps

Step-1: Open the Powershell ISE or Windows PowerShell in Run as Administrator mode

powershell the following commands are already available on this system

Step-2: Now run the below PowerShell cmdlet to install the AzureAD PowerShell module. Basically, you have to use the install cmdlet with the -AllowClobber parameter.

PS C:\WINDOWS\system32> Install-Module -Name AzureAD -AllowClobber
azureadpreview the following commands are already available on this system

Step-3: Now click on the Yes button from the above pop up to start the installation of the AzureAD module. Now you can see below it started installing the AzureAD module.

install-package the following commands are already available on this system

Just wait for few minutes, it will take few minutes to install the AzureAD module.

This is how we can fix the error “The following commands are already available on this system” using PowerShell.

You may also like following the below tutorials

Conclusion

Well, in this Azure tutorial, we discussed how to fix the error “The following commands are already available on this system” or “install-package the following commands are already available on this system” or “PowerShell the following commands are already available on this system” or “AzureAD the following commands are already available on this system” in PowerShell. Which I got while installing the AzureAD module. Hope it helps to fix your issue as well !!!.

Leave a Comment