All posts by David Kelly

Powershell Query Services on Remote Computer

Get Services on remote computer and save to file

Loads a list of computes and looks who is in the admin group

* get-localGroupMembers is a function:

Found Here

https://gallery.technet.microsoft.com/scriptcenter/List-local-group-members-c25dbcc4

 

Event log Flitering

Sometimes the standard event log filtering just isn’t enough, you need and more refined search criteria.

I find the best way to do this it Is to select the current event log category that you wish to search then filter current log.

This adds all the search criteria and selection criteria that you need. You can then begin to edit the query using XML tab. You will see something such as the following:

In that list you will see a select statement between the two >< you will see an *. Here is where you enter your select query.

Individual queries are formed by Square parentheses below you will see some examples:

The above example will give a list of events where a group change has been made to domain Admins.

* if you wish to target specific data viewing an event in the event log and check the XML data Will give you the information.

AD Dir Sync

All Credit for this article goes HERE Thanks to Stephanie Kahlam

Hey DirSync  where is my DirSyncConfigShell.psc1?

In previous versions of Dirsync (latest version 1.0.6862.0000) there was a nifty little shell that could be found in

I liked to create a shortcut on my desktop along with the ever so ambiguously named DirSync GUI, miisclient.exe.  When I logged into my server I had quick access to launch DirSync GUI and also quick access to Force a Synchronization if required.

image

image

Today the DirSyncConfigShell.psc1 is no more.  In order to enable the ability to “start” a quick synchronization you will now need to open a PS shell in Admin mode, enter “import-module DirSync” then run “start-onlinecoexistencesync”

image

What DirSync Version am I Running?

If you need to check what version of DirSync you currently have installed, simply run the following PowerShell cmdlet:

(GP “hklm:SOFTWAREMicrosoftWindowsCurrentVersionUninstallMicrosoft Online Directory Sync”).DisplayVersion

How to Change DirSync “synchronization interval”

By default DirSync (Windows Azure Active Directory Sync) will synchronize every 3 hours.  This interval can be changed by editing the Microsoft.Online.DirSync.Scheduler.exe config file found in C:Program FilesWindows Azure Active Directory Sync

  • Open the Microsoft.Online.DirSync.Scheduler.exe config file with notepad
  • Look for the entry <add key=”SyncTimeInterval” value=”3:0:0″ /> which specifies Hours:minutes:seconds  Change the value to an interval you desire IE> “0:10:0” for ten minutes and save the file
  • Open Start –> Run –> Services.msc and restart Windows Azure Active Directory Sync Service

image

This window shows a sync interval of 5 mins after the config file has been edited

DirSync Set Up Credentials

During setup of the Windows Azure Active Directory Sync tool Configuration Wizard you will be asked for two sets of credentials; Azure Office 365 Company Administrator and On-Premises AD domain administrator.

The account specified for Windows Azure is not required to be licensed in Office 365

image

This account should however, be configured with a NON expiring password as DirSync will cease to run if the password changes in Office 365.  The password can be changed at the DirSync GUI should this occur but it is probably easier to set it to NON expiring and avoid service disruption to your Synchronization process.

To set a user to a non expiring password run the following PowerShell command:

set-msoluser -Userprincipalname <userID> -PasswordNeverExpires $true

If you need to change the password in DirSync GUI perform the following:

Open miisclient.exe

image

Click on Management Agents

image

Right click Windows Azure Active Directory Connector and choose properties

image

Click on Conncetivity then update the password

image