Active Directory Login Report - powershell

To make a long story short, we have some staff punctuality issues where we'd like to setup some type of report / monitor that would send supervisors login time stamps during morning hours mostly. I don't know if this is possible through event logs or what not by scripting some type of report, however at this point I'm looking for solutions. Any suggestions?

LastlogonTimestamp is not synced in anything near real time. so that will not work for daily reporting.
i would collect the security logon events with the relevant Event ID's and work from there with the reporting.
an alternative is to scavenge the LastLogon property from user objects. But that is non-replicated attribute so you would need to read that for a user from all DC's or where it exists.

Related

Log off multiple users and then log them back in at a specific time in powershell

So we have a system that seems to keep producing errors around a specific time each day. We are in the process of working with the vendor to resolve the issue, but for the time being I am looking for a solution that might be a work around. I know that you can logoff a user with Powershell, but I would like to try and login a user. Is there a way to login a user with an encrypted password? Also, I would like to run this script at a specific time each day.

How can I trigger a contact workflow on a specific date in Bitrix24?

I would like to trigger a workflow resetting a sum on all contacts every 1st January of the year. The workflow is implemented. It could be triggered on the specific date or even everyday, because the date is verified in the workflow before resetting.
How can i run it on every contact?
Hello and welcome to Stackoverflow, the answer to your question is as the following:
You need to create a Rest API outbound webhook in your Bitrix account with "CRM" & "Business Process" permissions.
You will write down a PHP code that will be executed on the exact date/time of you choice
The PHP script will do 2 process:
Will retrieve all the contacts that you have on your Bitrix account and store them into a string value.
It will run that Business process and pass the list of all the found contacts, and inside your Business process you're going to set it up in a way that it will run the required actions on every contact from eh contacts IDs passed by the first step.
The PHP script can be hosted in a webhosting or even on your local machine since it's once a year.
This is only the concept of the solution, I can't share the script code because I don't have it at the moments, please contact me if you faces problems.

Remove all ratings from a SharePoint 2010 document library

I have a SharePoint 2010 document library in which I have enabled ratings. During testing, several people rated a number of documents, and now I'd like to reset all the documents back to zero. However, I cannot find a way to reset the ratings.
Things I've tried:
Disable ratings and re-enable: The ratings are still there.
Disable ratings, wait 24 hours, and re-enable ratings: The ratings are still there.
Using PowerShell and the SocialRatingManager, attempt to reset the rating (http://www.sharemuch.com/2011/03/22/resetting-sharepoint-2010-social-rating-using-powershell/): The script runs, but nothing changes.
Using the script above, modified to try to do a Delete() method on the rating result: "Attempted to perform an unauthorized operation", even though I am running the SharePoint Powershell as Administrator, logged in as a site admin.
It seems like the last option should be the one to work, but I can't seem to get access to delete someone else's social ratings. Any input would be appreciated.
Social tag manager errors/not workings are usually related to rights, here is a very good guide how to resolve the issues
http://www.sharepointpals.com/post/Programmatically-Manage-List-Items-Rating-with-Social-Rating-Manager-in-SharePoint-2013

Using GA Data Export API to Get All UA's

I am using the GA Data Export API to interact with Google Analytics and I'm making a lot of progress, I am using this URL Endpoint initially to pull all the profiles under an account:
https://www.google.com/analytics/feeds/accounts/default
This URL retrieves each GA ID (profile) and each UA. One thing I've realized is one account can contain multiple UAs and when this happens, this request pulls all profiles. We have a client who has about 115 profiles under like 10 different UAs, and the request takes about 30 seconds for the initial request (and then I believe it must be cached, because it speeds up considerably after this, but then the next day the same thing occurs).
Is there a way to get a list of UA's without pulling the profiles? This way I can query the UA specifically for the profiles instead of pulling each one.
Any advice on this would be really helpful!
Thanks
UPDATE: Here's some documentation on the specific call I am using right now:
http://code.google.com/apis/analytics/docs/gdata/gdataReferenceAccountFeed.html
UPDATE 1: I have found some interesting information in the docs
Once your application has verified
that the user has Analytics access,
its next step is to find out which
Analytics accounts the user has access
to. Remember, users can have access to
many different accounts, and within
them, many different profiles. For
this reason, your application cannot
access any report information without
first requesting the list of accounts
available to the user. The resulting
accounts feed returns that list, but
most importantly, the list also
contains the account profiles that the
user can view.
So this means that you have to use the default accounts call to get these back? Surely, somebody has had this issue before?
So apparently, you can query the account if you know the UA-ID, however there is no way to get back a list of only UA IDs.
One way you can do it is have the user enter their own UA ID instead of having them choose one; not as user-friendly as it could be but better than making the user wait 30 seconds!

Best way to notify users of an account that needs to be updated?

I am using Microsoft CRM 4.0. I currently have many accounts that need to be updated by the sales person assigned to the account. What would be the best way to notify the user of the update? Also, It would be nice if there was also a way to notify me back that the task had been completed. I was thinking the best way would be through a workflow but It does not allow me to select multiple accounts at once to notify the user, of which ones need the update. I also have mobile access with CRM.
You're on the right track. You could use a combination of workflows to accomplish this. I don't know what exactly it is they need to update but you could create a bit flag called new_isrecordupdated and then create workflows that wait until the fields needing to be updated are changed. When they are you can set that flag to true. Then have another workflow sleep for X days and verify that the field is false, if so send out an email to the user.
If you need them to complete tasks, then the workflow will need to sit on the tasks if they're regarding an account. On a status change of completed, update the flag to false.
Again, I'm not sure what you're looking for them to update so I can't say with 100% certainty that this is what you need.
Depending on how many accounts you are talking about, you may want a scheduled console application to find all of the outstanding accounts that still require attention. It could then create a single email for each sales person each day with links to each of the accounts that still required attention.
You could also have a single daily report letting you know which accounts had been updated and which were still needed updating.
These could be done with a scheduled application or an SSRS Report.
In addition it would be helpful to add a view for your sales reps that showed them the complete list of accounts that they needed to update. You would also want a similar view sorted by the assigned owner.
This way you have notification, but not abusive notification if a lot of these are happening and you have a way for both you and your salesmen see anything outstanding with a simple glance at a view.
You would probably need to have a boolean to set an account as needing an update, and then you could use a plug-in to reset that flag whenever the owner updated it along with setting a last updated date. This would give you the fields to flag an account as needing to be updated and the date would allow you to see which accounts had been updated by their owners.