CommandsAdd Active Directory Module to PowerShell: Import-Module ActiveDirectory Find Help on Powershell Commands: Get-Help * Get-Help <command> -examples Find Locked Accounts: search-adaccount -lockedout Verify if Account is Locked: get-aduser UserName -properties * | select-object lockedout Unlock user account: unlock-adaccount username Export email addresses from All users in a group Get-ADGroup "group name" | Get-ADGroupMember -Recursive | Get-ADUser -Properties * | Select SamAccountName,GivenName,sn,Mail | Export-CSV "C:\email.csv" Get Active Directory user information using Powershell:
Configure Office 365 Attributes on AD using Powershell:
Use PowerShell on Office 365:
Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table –AutoSize > C:\InstalledPrograms.txt Show Group Members using Powershell: get-adgroupmember "Domain Admins" | Select-Object Name, distinguishedName Get Members of an AD Group using PowerShell: Get-ADGroupMember "group_name_in_AD" | Get-ADUser | Select-Object Name, mail | Export-Csv -Path "c:\groupname.csv" -NoTypeInformation Disable SMBv1 from PowerShell: Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 -Force Rebuild TCP/IP Stack: 1. Reset WINSOCK entries to installation defaults: netsh winsock reset catalog. 2. Reset IPv4 TCP/IP stack to installation defaults. netsh int ipv4 reset reset.log Find Remote NetBIOS Computer Name nbtstat -a IP.ADDRESS Show Hidden Adapters in Windows: 1.Click Start, click Run, type cmd.exe, and then press ENTER. 2.Type set devmgr_show_nonpresent_devices=1, and then press ENTER. 3.Type Start DEVMGMT.MSC, and then press ENTER. 4.Click View, and then click Show Hidden Devices. 5.Expand the Network Adapters tree. 6.Right-click the dimmed network adapter, and then click Uninstall. Reset Vcenter "administrator@vcenter.local" password from cli
================================ Please select: 0. exit 1. Test LDAP connectivity 2. Force start replication cycle 3. Reset account password 4. Set log level and mask 5. Set vmdir state ================================ Press 3 to enter the Reset account password option; When prompted for the Account UPN, enter: administrator@vSphere_Domain_Name.local By default, this is: administrator@vSphere.local A new password is generated.
Use the generated password to log in to the administrator@vSphere.local account. |
TECH-NOTES
Selection | File type icon | File name | Description | Size | Revision | Time | User |
---|---|---|---|---|---|---|---|
ċ
|
View |
Nov 19, 2017, 1:17 PM | Alex Roldan Leben | ||||
ċ
|
View |
Nov 19, 2017, 1:17 PM | Alex Roldan Leben | ||||
ċ
|
View |
Nov 19, 2017, 1:17 PM | Alex Roldan Leben | ||||
ċ
|
View |
Nov 19, 2017, 1:17 PM | Alex Roldan Leben | ||||
ċ
|
View |
Nov 19, 2017, 1:17 PM | Alex Roldan Leben | ||||
ċ
|
View |
How to reset Vsphere administrator@vcenter.local password from CLI | Mar 17, 2019, 1:40 PM | Alex Roldan Leben |