Search This Blog

Thursday, February 11, 2021

Azure AD Connect - AD DS Connector Account

If we want to know the specifics of the service account for the Active Directory connector(s). 

Use the following two lines of Windows PowerShell:

Import-Module "C:\Program Files\Microsoft Azure Active Directory Connect\AdSyncConfig\AdSyncConfig.psm1"

Get-ADSyncADConnectorAccount

Network Policy Server (NPS) - Event Logs not appear

Description:

You have setup NPS in your environment and it seems to work properly. However when you check the event viewer at Custom Views\Server Roles\Network Policy and Access Services, you only saw very minimum event.

Resolution:

Run the following at elevated command prompt on the NPS Server

auditpol /set /subcategory:"Network Policy Server" /success:enable /failure:enable


Tuesday, February 9, 2021

PowerShell Script to Find Last Logon Date Information from Computer with Windows 7 Operating System

Description:

You need to get a list of all Windows 7 computer with Last Logon Date information in your domain.

Resolution:

Run the following PowerShell command:

Get-ADComputer -Filter * -Properties OperatingSystem, LastLogonDate | where {$_.OperatingSystem -match "Windows 7 Professional"} | select Name, OperatingSystem, LastLogonDate | sort LastLogonDate –unique | Export-Csv c:\workcomputers.csv

Error when Upgrading Azure AD Connect version

Description:

When you upgrade Azure AD Connect from a previous version, you might encountered the following error: "Upgrade cannot proceed because the Azure Active Directory connector (b891884f-051e-4a83-95af-2544101c9083) is missing.

Error

Resolution:

Make sure the PowerShell Execution Policy is set to unrestricted. You can check by running the following command at PowerShell:

Get-ExecutionPolicy

To change the execution Policy to unrestricted, run the following PowerShell command:

Set-ExecutionPolicy Unrestricted

Type Y when asked.

Re-Run the upgrade process again.

Tuesday, June 27, 2017

PowerShell command - GetWmiObject


> To get the remote computer name from IP Address:
Get-WmiObject Win32_ComputerSystem -ComputerName remotecomputerIPaddress | Select Name
> To get the computer description from a machine remotely:
Get-WmiObject Win32_OperatingSystem -ComputerName remotecomputernameorIPaddress | Select Description
> To get the currently logged on user from a machine remotely:
Get-WmiObject Win32_ComputerSystem -ComputerName remotecomputernameorIPaddress | Select UserName

Search Google