$SourceUser = "user.source"
$TargetUser = "user.target"
Get-ADPrincipalGroupMembership $SourceUser |
Where-Object {$_.Name -ne "Domain Users"} |
ForEach-Object {
Add-ADGroupMember -Identity $_.Name -Members $TargetUser
}
1. Dọn rác
Chạy bằng cmd quyền Administrator
2.Xóa profile không dùng, vào Run / SystemPropertiesAdvanced /User Profiles / Settting
Sub SetOfflineMode()
Dim appOutlook
Dim blnIsOffline
On Error Resume Next
Set appOutlook = CreateObject("Outlook.Application")
If Err.Number = 0 Then
blnIsOffline = appOutlook.Session.Offline
If Not blnIsOffline Then
appOutlook.ActiveExplorer.CommandBars.ExecuteMso ("ToggleOnline")
End If
Else
End If
If Not (appOutlook Is Nothing) Then Set appOutlook = Nothing
End Sub