powershell


Get-ADDomainController, Get-ADUser, Get-ADComputer, Get-ADObject: A referral was returned from the server 1

When you are using Active Directory Powershell cmdlets such as Get-ADDomainController, Get-ADUser, Get-ADComputer, Get-ADObject, you may receive the following error message: Such an exception is linked to the difficulty those commands have to work in a multi-domain environment, whether that multi-domain be a single forest with multiple child domains, various […]


Install-Module fails with Source Location https://www.powershellgallery.com/api/v2/package/xxx is not valid

The use of Install-Module and Update-Module has become a routine task for many Powershell administrators these days. Lately if you applied those commands, you may have received warnings and errors even from well-known sources. Messages include: If you look at the resource or the web site, the package stills exists […]


Get-Certificate usage for Web Server

The documentation for the powershell cmdlet Get-Certificate only use generic examples. In this post, let’s see the Get-Certificate usage for Web Server. In our scenario, you have an Enterprise CA whose service is published under the name ‘My Company SubCA I’. You also have duplicated the Web Server template under […]


Enable RDP with Powershell 1

Although the Remote Management is enabled by default starting with Windows Server 2012, the RDP access isn’t. To enable RDP with Powershell, you have two steps to perform: Enable the RDP Access Enable the inbound firewall rules Here’s the code:

The second line allows you to specify if you […]


Ambiguous Fuzzy search in AD

Working in big AD forests and domains can be sometimes challenging, as powershell cmdlets require you perfect identity matches. In an AD of a global corporation,¬†where you have tons of John, Sam, Doe, Smith, Martin, Schmidt , finding that information may be time consuming: is the name given a first […]

AD Users and Computers User Creation