Month: December 2014

LinkedIn – Filters – Pulse/Recommended Jobs and more.

I was previously annoyed by Pulse, Recommended jobs. So decided to add a few filters on how to block the different blocks of LinkedIn Updates. Now you can choose which you want to see on your dashboard.

Pulse (Works per 11-Dec-2015)

linkedin.com##LI[class="feed-update pulse-recommend-article-rollup  has-snippets"]
linkedin.com##LI[class="feed-update linkedin:pulseContentPool  has-snippets"]

Recommended Jobs (Works per 06-Mar-2015)
Now consists of two different classes.

linkedin.com##LI[class="feed-update company-recommend-job-digest  has-snippets"]
linkedin.com##LI[class="feed-update company-recommend-job  has-snippets"]

Recommended People you know (Works per 06-Mar-2015)

linkedin.com##LI[class="feed-update people-connect-recommend  has-snippets"]

People in your network have new connections (Works per 06-Mar-2015)

linkedin.com##LI[class="feed-update people-connect-recommend  has-snippets"]

Promotional advertisement (Works per 06-Mar-2015)

linkedin.com##LI[class="feed-update"]
linkedin.com##LI[class="feed-update company-share-article is-sponsored has-snippets"]

How you rank (Works per 06-Aug-2015)

linkedin.com##LI[class="feed-update premium-how-you-rank  has-snippets"]

People like you are watching (Works per 10-June-2016

linkedin.com##LI[class="feed-update member-like-share  has-snippets"]
linkedin.com##LI[class="feed-update lyndaCourse-singleton  has-snippets"]

Ads (Works per 29-Sep-2016)

linkedin.com##[class="f17x700 ad-hdr iframe-ad ns has-ad-label"]
linkedin.com##[class="ad-hdr-2b"]
linkedin.com##[class="ad-hdr"]
linkedin.com##[class="ad"]

New GUI (Works per 16-Feb-2017)

linkedin.com##[class="feed-s-update mh0 Elevation-2dp relative feed-s-update--is-sponsored feed-s-update--share share-update image feed-s-update--is-sponsored-image ember-view"]
linkedin.com##[class="feed-s-update mh0 Elevation-2dp relative feed-s-update--is-sponsored feed-s-update--share share-update article ember-view"]
linkedin.com##[class="feed-s-update mh0 Elevation-2dp relative lynda-update feed-s-update--lynda lynda-update ember-view"]

* Updated 12-Jan-2017 with additional filters.
* Updated 28-Oct-2016 with additional filters.
* Updated 29-Sep-2016 with additional filters.
* Updated 11-Dec-2015 with additional filters.
* Updated 10-June-2015 with additional filters.

Advertisements

AD User information from member server using Powershell

So I needed to get the userprincipal name from the domain, just to make sure that it was matching what I was expecting. No Powershell modules, no tools to aid besides Read access on the domain from the Domain Users membership. So how to pull that off?
A lot of long lined scripts, except for one. I took that and edited a few things from it and was able to get exactly what I needed, within a few simple lines. Also reusing the comment from Mattias R. Jessen in one of my previous posts.

$Username = 'jesper.arnecke'

#This search will target the domain from Root level. For refines on specific OU's, use the references.
$Search = New-Object DirectoryServices.DirectorySearcher
#Page size in order to return more than 1000 objects per query.
$Search.PageSize = 1000
#Filter definition
$Search.filter = "(&(objectCategory=person)(SAMAccountname=$Username))"
#Defines the search scope depth. Available choices are "Base", "OneLevel" and "Subtree"(Default value), 
$objSearcher.SearchScope = "Subtree"

Foreach($result in $Search.Findall()){
$user = $result.GetDirectoryEntry()
$user.userprincipalname
}

References:
http://www.kli.dk/2008/09/17/166
https://jesperarnecke.wordpress.com/2013/05/14/get-a-domain-controller-from-any-domain-member/comment-page-1/#comment-23
https://technet.microsoft.com/en-us/library/ff730967.aspx

Updated
16-September-2015: Added more comments, properties and comments. Added additional reference.

Eat the cookie! – ADFS – Powershell

So tired of getting problems with ADFS cookies, so decided to find an easier way than IE to clear my local cookies using a script. This script works on Windows 8.1. I would expect it to work on 8.0 but not on lower versions, as the location of the IE cookies is different.

# Location of IE Cookies
$Path = $env:USERPROFILE + "\AppData\Local\Microsoft\Windows\INetCookies\Low"
$Text = <domain name of cookie>
$PathArray = @()

# Cookies are stored as .txt files.
Get-ChildItem $Path -Filter "*.txt" | Where-Object { $_.Attributes -ne "Directory"} |
      ForEach-Object {
         If (Get-Content $_.FullName | Select-String -Pattern $Text) {
            $PathArray += $_.FullName
         }
      }
$Unique=$PathArray | ForEach-Object {$_} | Get-Unique
$Unique | Remove-Item