Nuffnang

Wednesday, September 17, 2014

Windows 2012 : Monitoring Work Folders with PowerShell

Monitoring Work Folders with PowerShell

The Work Folders Service on Windows Server 2012 R2 comes with a supporting PowerShell module and cmdlets. (For the full list of Work Folders Cmdlets run gcm –m SyncShare in a Powershell console).
Just like in the examples shown above, where Server Manager was used to monitor and extract the information, the Work Folders cmdlets provide a way to retrieve Work Folders sync shares and users information. This can be either used by administrators for interactive monitoring session or for automation within PowerShell scripts.
Here are a few Powershell examples that provides Work Folders sync shares and users status information.
Get-SyncShare  - The Get-SyncShare cmdlet provides information on sync shares. This includes the file system location, the list of security groups and more.

From these objects, Staging folder and Path can be extracted and checked for availability and overall health.


Get-SyncUserStatus - similar to the users’ property window described above in the server manager section, this cmdlet provides Work Folders users’ information. This includes the user name, the devices that the users are using, last successful connections and more.  Running this cmdlet requires providing the specific user name and sync share.

Here is an example for listing the devices and status that Sally is using with Work Folders:

 In the results shown above, useful user information is shown about the user’s devices, their OS configuration and last successful sync time.

Get-Service - The Sync Share service (named SyncShareSVC ) status can be read by using PowerShell’s generic get-service command

 In the above example we can see that the service is in “Running” state. “Stopped” means that the service is not running.
Events – Powershell also provides an easy way of listing Work Folders events, either the operational or the reporting channels. Here are a few examples:
1) Listing Errors from the operational channel (in this example, the issues are reported on a system where one of the disks hosting the Work Folders directory was intentionally yanked out)

2) List successful events from the Work Folders Reporting channel

No comments:

Post a Comment