Thursday, October 19, 2017

change pwdLastSet to reset user password last set in AD

 what worked for me was to change it to 0 first and then change it to -1

If set to 0 it will force user to change password on next login. (If user doesn’t have flag set to Don’t Expire Password)

If set to -1 the password change date will be set to current date and time.

 

reference:

http://ldapwiki.com/wiki/Pwd-Last-Set%20attribute

Tuesday, October 10, 2017

exchange 2010 remove users emails before specific date

If user has a lot of emails which they need to delete here is a command which can help at the server end:

 

Search-Mailbox -Identity “User Name” -SearchQuery “Received:<$(’12/31/2013′)” -DeleteContent

 

ref: https://social.technet.microsoft.com/Forums/exchange/en-US/6114adb8-7e65-46e0-b54f-704ad15ef723/command-to-delete-all-the-items-from-a-mailbox-till-a-specific-date?forum=exchange2010

Friday, October 6, 2017

exchange 2010 failed to create new GAL

error when trying to create new GAL using:

New-GlobalAddresslist “new GAL” –ConditionalCustomAttribute1 “STAFF” –IncludedRecipients “AllRecipients”

WARNING: One or more global address lists were missing from the Active Directory attribute. This is likely caused by
using legacy Exchange management tools to create global address lists.
Active Directory operation failed on server1.domain.local. This error is not retriable. Additional information: The name ref
erence is invalid.
This may be caused by replication latency between Active Directory domain controllers.
Active directory response: 000020B5: AtrErr: DSID-03152C47, #1:
0: 000020B5: DSID-03152C47, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 907ff (globalAddressList2)
+ CategoryInfo : NotSpecified: (0:Int32) [New-GlobalAddressList], ADConstraintViolationException
+ FullyQualifiedErrorId : 8E376CCD,Microsoft.Exchange.Management.SystemConfigurationTasks.NewGlobalAddressList

 

the most likely problem is corupted entry.

This can be tested using power shell script on AD server:


$ad = [ADSI]"LDAP://rootDSE";
$domain = $ad.rootDomainNamingContext;
$obj = New-Object System.DirectoryServices.DirectoryEntry("LDAP://CN=Microsoft Exchange,CN=Services,CN=Configuration,$domain"); 

$count = 0;
$Gals1= $obj.GlobalAddressList;
foreach($g in $Gals1)
{
   $g= $g.ToString().ToLower(); 
   if($g.Contains("cn=deleted objects"))
   {
      Write-Host $g;
      $count= $count +1;  
   }
}

Write-Host "$Count corrupted GAL entries found in property GlobalAddressList";

$count = 0;
$Gals2= $obj.GlobalAddressList2;
foreach($g in $Gals2)
{  
   $g= $g.ToString().ToLower();
   if($g.Contains("cn=deleted objects"))  
   {
      Write-Host $g;          
      $count= $count +1;  
   }
}
Write-Host "$Count corrupted GAL entries found in property GlobalAddressList2";

you will get output something like this:

cn=default global address list\0adel:cc665233-b490-477a-a972-60fdd6d991ef,cn=deleted objects,cn=configuration,dc=domain,dc=
local
1 corrupted GAL entries found in property GlobalAddressList
0 corrupted GAL entries found in property GlobalAddressList2

If you find corrupted entries (make sure to have full system backup) you will have to remove them using ADSI edit on domain controller.

Using ADSI edit connect to configuration:

configuration\ Services\ Microsoft Exchange (right click / properties)

depending on the listed corruption look for GlobalAddressList or GlobalAddressList2 and click edit.

Remove corrupted entries.

This helped me to fix creating new GAL.

 

reference:

https://social.technet.microsoft.com/Forums/exchange/en-US/52854856-f517-4827-b3d3-3e589a422672/exchange-2010-sp-2-cant-create-second-gal?forum=exchange2010hosters

https://social.msdn.microsoft.com/Forums/en-US/3210af54-d8b4-490f-9f5f-f4fc3209d324/newglobaladdresslist-fails-ad44a06f?forum=os_exchangeprotocols&forum=os_exchangeprotocols

 

https://www.experts-exchange.com/articles/12458/Failed-to-create-New-Global-Address-List-on-Exchange-2010.html

Thursday, October 5, 2017

Compress folder on macOS Sierra and windows 10

 macOS Sierra:

1. Create folder and place all the files you want to compress in it.

2. Right click on the folder and click on Compress.

 

Windows 10:

  1. Create folder and place all the files you want to compress in it.
  2. Right click on the folder and select Send to > Compressed (zipped) folder.

Friday, September 22, 2017

Spotlight not indexing after Sierra upgrade

 Looks like this helped me:

  1. first I removed all selections under System Preferences/ Spotlight/ search results
  2. restart
  3. use terminal:
    sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
    wait 20s
    sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
    sudo mdutil -E /Volumes/*
    you should get a message indicating that indexing is enabled.

 

 

resources:

https://discussions.apple.com/thread/7684120?start=0&tstart=0

https://discussions.apple.com/thread/5004598?start=0&tstart=0

Monday, September 11, 2017

mac OS Sierra remove parental control using terminal

 for some reason I had parental control enabled on network user with local admin rights.

it wasn’t possible to remove them using system preferences.

to remove it I used terminal command:

sudo dscl . -mcxdelete /Users/username
sudo rm -rf /Library/Managed\ Preferences/username

Thursday, August 31, 2017

DeployStudio workflow with auto-join Active Directory

 After creating master image create workflow with these steps:

1:

restore HDD from MacBookAir2017.hfs.dmg disk image.

 

2:

Rename computer:

 

3:

Prompt for computer name during setup

 

4:

auto join computer to MS Active Directory.

 

5:

auto join computer to Open Directory Server.


Monday, August 28, 2017

Exchange 2010 export user mailbox

 using this simple exchange powershell command:

New-MailboxExportRequest -Mailbox username -FilePath “\\server\share\username.pst”

Thursday, August 17, 2017

Disable background updates on MAC

 terminal command:

sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticDownload -boolean FALSE

https://support.apple.com/en-us/HT207251

Wednesday, August 16, 2017

DEP re-enrollment without wipe

 This could help if you need to add already configured apple cumputer (DEP purchased) to Meraki or JAMF MDM management.

sudo rm /var/db/.AppleSetupDone
sudo rm -rf /var/db/ConfigurationProfiles/
sudo rm /Library/Keychains/apsd.keychain

after running these commands restart your computer and the default apple setup assistant will start. (no lost of personal data)

boot to PXE server on DELL Latitude 5480

 It is important to disable safe boot and enable legacy boot.

F2 key is to enter bios

F12 key is for one time boot menu

How to Fix ADSelfService Plus SSL Path Errors (GoDaddy P7B Guide)

If you manage ManageEngine ADSelfService Plus on Windows Server 2022 and rely on GoDaddy for your SSL certificates, you have likely run ...