Undo-SoftDeletedUnifiedGroup

Soft-deleted Office 365 groups are groups that have been deleted, but can be restored within 30 days of being deleted. All of the group contents can be restored within this ...

Read More

Update-DistributionGroupMember

Use the Update-DistributionGroupMember cmdlet to replace all members of distribution groups and mail-enabled security groups. To add or remove existing group members, use the Add-DistributionGroupMember and Remove-DistributionGroupMember Update-DistributionGroupMember ...

Read More

Script to Add Members in the Azure AD group

Connect-AzureAD Update-DistributionGroupMember -Identity “OffshoreTeam” -Members [email protected] Update-DistributionGroupMember -Identity “Everyone” -Members [email protected]

Read More

Script to create Active Directory User ID using Powershell

Script to create User ID(use this command in AD server) New-ADUser -Name(Read-Host -AsPlainText “Type Name”) -DisplayName(Read-Host -AsPlainText “Type Display Name”)-GivenName(Read-Host -AsPlainText “Type First Name”) -Surname(Read-Host -AsPlainText “Type Last Name”) -Manager(Read-Host ...

Read More

Script to remove Powershell.exe Malware/Virus by list of computers

How to clear powershell.exe Malware by list of computers Create updateCheckServers.txt in the same folder for list of computers $servers = get-content updateCheckServers.txt$ReportFile = “malwareReport”+(Get-Date -Format “yyyyMMdd”)+”.csv”foreach ($server in $servers) {  ...

Read More

Script to delete the file older than 2 days

Script to delete the file older than 2 days Example given below. You change the days whatever you want. forfiles /p “E:\DatabaseBackupExpress” /s /m *.* /D -2 /C “cmd /c ...

Read More

Powershell Script to remove the outlook profile in the name of “outlook”

#Run on system logged in as the user you are trying to delete and recreate the profile for if (test-path “$Env:USERPROFILE\outlookprofiledelete.log”){ } else { if(Test-Path “$Env:USERPROFILE\AppData\Local\Microsoft\Outlook”){ $PathTrue = 1 Remove-Item ...

Read More

Powershell Script to remove the Default outlook Profile in user machines

$outlookApplication = New-Object -ComObject ‘Outlook.Application’ $profileName = $outlookApplication.Application.DefaultProfileName $profileRoot16 = “HKCU:\Software\Microsoft\Office\16.0\Outlook\Profiles” $profileRoot15 = “HKCU:\Software\Microsoft\Office\15.0\Outlook\Profiles” if (Test-Path $profileRoot15){ $outlookProfile15 = Join-Path -Path $profileRoot15 -Childpath $profileName } if (Test-Path $profileRoot16){ $outlookProfile16 = ...

Read More

Powerhell Script to remove the Powershell.exe Malware/Virus

Powershell.exe run with High CPU Usage and Memory Below Script will run and remove the Powershell.exe Malware from the Machine $logFile = “c:\removeMalware.txt”Get-WMIObject -Namespace root\Subscription -Class __EventFilter -filter “Name= ‘SCM ...

Read More

PowerShell – Updating Users Email Addresses In Active Directory

Problem Note: I’m referring to the Email address value that is listed on the user object in Active Directory, this will not effect any Exchange Settings! A colleague asked me today if ...

Read More