PowerShell Remove Users from Ad Group CSV

Write-Host “Removing users from an AD group.” Import-Csv “Path\to\file\users.csv” | ForEach-Object { $user = $_.email $aduserinfo = Get-ADUser -Filter “EmailAddress -eq ‘$user’” Remove-ADGroupMember -Identity “GroupName” -Members $aduserinfo -Confirm:$false Write-Host “User $user successfully removed from the AD group” }

Office 365 Sending Email from Alias Or Proxy Address Using PowerShell

Since July 2021, Microsoft enabled sending email from Alis or ProxyAddress you can simply enable this future by PowerShell or Using Admin Interface: Using Admin Interface: You can simply go to https://admin.exchange.microsoft.com/#/settings and then click on Mailflow-> Turn On Sending from Alias PowerShell: connect to exchange online then run this cmdlet: Set-OrganizationConfig -SendFromAliasEnabled $true

office 365 delete messages Search for and delete email messages – Microsoft 365

– Open Windows PowerShell as Admin – Connect to Security & Compliance Center PowerShell $credentials = get-credential; Connect-ExchangeOnline -Credential $credentials $SccSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $credentials -Authentication “Basic” -AllowRedirection; Import-PSSession $SccSession Or Go to https://docs.microsoft.com/en-us/powershell/exchange/connect-to-scc-powershell?view=exchange-ps for more information – Soft-delete messages New-ComplianceSearchAction -SearchName “NameOfTheSearch” -Purge -PurgeType SoftDelete – Hard-delete messages New-ComplianceSearchAction -SearchName…

Changing LDAP Query size limit more than 1000

In PHP, you may get this warning (Warning: ldap_search(): Partial search results returned: Sizelimit exceeded in) when more than 1000 objects returned in single search, you can change using following guide: Open Command Prompt on a domain controller (You must use admin credentials) Type NTDSUTIL and press ENTER. In the ntdsutil: prompt, type ldap policies…

Run Multiple Viber on Windows

Create Local Account on Windows, and login with that account. Now Download and install viber. Sync the viber with your Phone (So that the viber on your PC can be opened). Once the viber Opened, you can now Sign-out from that account. Go back to your Main Account (the one that you want to run…

CentOS 7 Virtual Host Not Working

1- Enable Options +SymLinksIfOwnerMatch 2- See my Virtual Host example Add below code at beginning of the virtual host section: <VirtualHost *:80> ServerName fail </VirtualHost> Add below code to the end of the virtual host section: <VirtualHost *:80> ServerAlias * </VirtualHost>