[Outlook] - [LinkedIn] - Plugin Warning

I could not find an article in English yet. But I'm sure this will hit the net soon.

I just red an article in Dutch, claiming, the LinkedIn-Plugin for Outlook does send email information to LinkedIn as unencrypted data.
It also seems to send the whole contactlist of the user to LinkedIn.

Feel free to read the whole article HERE

You can off course use google translate (or any other) to obtain the information in English.

Posted by Benjamin-Pierre | with no comments
Filed under: , ,

[Windows] Log into a sever/computer as administrator without the password

I don't like 3th party programs. I prefer to stay with the base images (WinXP, Win7, Win8, Win2003, Win2008, Win...)

So for this you only need the official image with the same version of the computer/server you want to log into.

The solution:


Boot from Windows cd/dvd
Chose repair
Go to CMD

cd windows
cd system32
move Utilman.exe Utilman.exe.bak
copy cmd.exe Utilman.exe

reboot


windowskey + u

net user Administrator “put here your new pass”   ---> Administrator is the name of the useraccount, it may be different, just do "net user" it will give you the list of accounts.

(you can now log in with the account and new pass)

reboot

redo all steps to replace cmd with utilman again

Finish


Tested and approved on:

WinXp, Win7, Win8, Win2003, Win2008 and Win2008 R2.

Posted by Benjamin-Pierre | with no comments

[Windows] Get the option "Burn to disk" back on right click

This morning I needed to quickly burn an iso to a DVD.

I'm on Windows 8 release preview... . When I right clicked on my ISO, I did not see any "Burn to disk" option.

I found a solution on Technet,

This will get the 'Windows Disk Image Burner' back in the 'Open with' menu:

Browse to the .iso file you would  like to burn

  1. Right click on it, move the courser to the
    'Open with' Sub Menu box
  2. Click on 'Choose Default Program...'
  3. Click on 'Browse'
  4. In the address bar (The bar at the top of the
    window that shows the current directory 
    [location]) type in: "%SystemRoot%\System32"
  5. ** Alternatively to Step 5** Browse to your local
    'System32' folder
  6. Press the Enter Key (or Return Key)
  7. (The files / folders that you were looking at should
    change to the contents of 'System32'
  8. In the 'File Name:' field, type in "isoburn.exe"
  9. Click 'Open'
  10. **optional** Verify that the checkbox is selected so
    that this becomes the default
  11. Click 'Ok'
And there you have it!! :)

Source : Technet
Author : TeckMaster

 

Posted by Benjamin-Pierre | with no comments

[Lync] Random helpful tip

Hello everyone,

This weeks I had a special issue (and a solution) I wanted to share with you all.

The issue:

An employee was going to have a meeting with clients. Those clients had recently installed Lync in their premises.

Whenever the clients tried to click the meeting link in their calendars their Lync would open but the meeting would not start.
They got different errors. Obviously there is nothing I could do on their firewall to allow them to join.

Even when I had them closing their Lync client, when they would click on the meeting link it would reopen it and have the same issue.

So I had them copying the link in the meeting request and past it in the browser: same problem.

The solution:

I asked them to copy the meeting link, past in in the browser and had them add this on the end of the meeting link: “?sl=” (without the “”)

This little ?sl=  will make sure the client check is bypassed. It will open a meeting window in the browser

The client then could use the option to join the meeting via web browser and it worked like a charm.

PS: Web App users do not have VoIP or Webcam Video Capability. Participants must connect to audio using Dial-in number
But you can share your slides.

Enjoy

Posted by Benjamin-Pierre | with no comments
Filed under:

[VB.net] Citrix XenApp 6.0 - SDK 6.1.2

Hello again,

I have created an application that can read and do a lot of stuff from the application to a farm in Cirtrix XenApp 6.0

 

But being a vb.net programmer and not a C# one, I didn't find what I was looking for on the net... so I wrote it myself.

 

Here you got the basic required funtion to connect a vb.net program to the cirtix XenApp SDK (powershell)

-----------------------------------------------------------------------------------------------------------------------------------

Private Sub GetCitrixInfo()


'Adding the default Runspace to the Form
Dim Runspace As Runspace
Runspace = CitrixRunspaceFactory.DefaultRunspace

'Now we have a runespace we need a pipeline (to send and receive objects from PowerShell)
Dim Pipeline As Pipeline
Pipeline = Runspace.CreatePipeline()

'Creating the command we want to send
'The Name of the Application
Dim GetSessionByApplicationsByName As New GetXASessionByApplicationName

Dim BrowserName As Array
BrowserName = {"*"}

Dim Commando
Commando = GetSessionByApplicationsByName.Command

'Adding the command to the pipeline
Pipeline.Commands.Add(Commando)

'We need to to give a variable which we will use in the Pipe

Dim results As Collection(Of PSObject)
results = Pipeline.Invoke()

'Now our variable will be filled by PowerShell objects, we need to translate them to .NET object

Dim app As PSObject
Dim allowedUsers As Dictionary(Of String, User)

For Each app In results
'app' is an instance of PSObject

Dim xaSession As XASession
xaSession = app.BaseObject


Dim item As New ListViewItem
item.SubItems.Add(xaSession.AccountName)
item.SubItems.Add(xaSession.BrowserName)
item.SubItems.Add(xaSession.ServerName)
item.SubItems.Add(xaSession.SessionId)
item.SubItems.Add(xaSession.ClientName)
SessionListView.Items.Add(item)


Catch ex As Exception
'Debugging

End Try
End If

Next

'Autosize Columns in the Listview
For Each column As ColumnHeader In Me.SessionListView.Columns
column.Width = -2
Next

progressBar.Style = ProgressBarStyle.Blocks

End Sub

----------------------------------------------------------------------------------------------------------------------------------

If you have more question on the subject, just ask ! :)

[Powershell] Find Files, send results to a textfile, only get the files from last year , and "On Error Resume Next"

Our so loved vbs >> or > to a file... is not so difficult to reproduce in Powershell...

 

IE:

# PowerShell script to list the "avi" Files under C:\
$Dir = get-childitem C:\ -recurse -ea SilentlyContinue
# $Dir |get-member
$List = $Dir | where {$_.extension -eq ".avi"} | where {$_.LastWriteTime -ge [DateTime]::today.adddays(-365)}
$List |ft -auto Directory,PSChildName,CreationTime,LastWriteTime  |Out-File C:\TEMP\Script\All_AVI_Files.txt -width 5000

 

Seems simple... is simple... but we learn a few thins here...

1) The "On Error Resume Next" of VBS, has been replaced by : -ea SilentlyContinue 
2) When we need to have two or more where.. just repipe the results ==> | where {....} | where {...} | where {...}
3) You dont like trunkated results... I don't either... so on your ft (format table), put an -auto parameter, and give it also enough width on the end.

    ---> If you only set -auto, the results of the second, third, ... column could end trunkated.
    ---> If you only set -width xxxxx you could end with an line of 3 signs with xxx-3 white spaces... not good...

* use both parameters -auto and -width

 

4) The > has been replaced by Out-File in Powershell
5) The >> has been replaced by Out-File with an aditional parameter: -Append

6) Get only the file modified last year (365 days from now...) : where {$_.LastWriteTime -ge [DateTime]::today.adddays(-365)}

 

So.. whats not to love in PowerShell, it's quicker to built script, more robust, you just need to practice it.

 

[VBS] - Scripting for OCS (AD Parameters)

A few month ago I had to create a script to automate the proccess of enabling and configuring users for OCS in Active Directory.

I used VBScript for this. MOst part is conventional... however, I had to change the meeting policy from default to something else, this part was tricky.

Enough talking: here you can enjoy the part to change the policy:




'************************************POLICY CHANGE***************************************

        strMeetingPolicy="CN={5DC1A974-C49C-477C-A3F7-E54EECEBE3A9},CN=Policies,CN=RTC Service,CN=Microsoft,CN=System,DC=yourdomain,DC=local"      
        strMeetingPolicyDN1="B:8:01000000:"&strMeetingPolicy
        objUser.put "msRTCSIP-UserPolicy", strMeetingPolicyDN1


        '************************************POLICY CHANGE***************************************


==> Go first in AD and check the values under the Policies (Domain ==> System ==> Microsoft ==> RTC Service ==> Policies)


Pro Memory: here are the most common used parameters for OCS configuration:

 ' The msRTCSIP-OptionFlags attribute specifies the different options that are enabled For

                ' the user. It's a bit-mask value of type integer. Each option is represented by a bit.
                ' Valid value types are:
                ' 1: Enabled for public IM connectivity
                ' 2: Reserved
                ' 4: Reserved
                ' 8: Reserved
                ' 16: RCC (Remote Call Control) enabled [telephony]
                ' 64: AllowOrganizeMeetingWithAnonymousParticipants
                ' 128: UCEnabled (enable user for unified communications)
                ' 256: EnabledForEnhancedPresence
                ' 512: RemoteCallControlDualMode
                ' 1024: Enable auto-attendant
                ' Example: 449 = 256 (Enhanced presence) + 128 (UC enabled) + 64 (anonym. participants) + 1 (public IM)
                nOptionFlags = 320


                objUser.put "msRTCSIP-PrimaryUserAddress", strPrimaryUserAddress
                objUser.put "msRTCSIP-FederationEnabled", bFederationEnabled
                objUser.put "msRTCSIP-ArchivingEnabled", nArchivingEnabled
                objUser.put "msRTCSIP-InternetAccessEnabled", bInternetAccessEnabled
                objUser.put "msRTCSIP-Line", strLine
                objUser.put "msRTCSIP-OptionFlags", nOptionFlags
                objUser.put "msRTCSIP-PrimaryHomeServer", strPrimaryHomeServer
                objUser.put "msRTCSIP-UserEnabled", True

                'objUser3.put "msRTCSIP-TargetHomeServer"
                'objUser3.put "msRTCSIP-OriginatorSid"
                'objUser3.put "msRTCSIP-LineServer"
                'objUser3.put "msRTCSIP-UserExtension"

And off course don't forget the: objUser.setinfo at the end

Posted by Benjamin-Pierre | with no comments
Filed under: , , ,

[BATCH] - Get modified date with FOR /F

I had to write a batch script for a client, to automate a proccess.

I was required to check the modification date of a file and compare it to the current date...
This seemed quite easy, but took me some time as the date would not let me to "trim" her...

Now here is the working code I wrote for it


@echo OFF
SETLOCAL EnableDelayedExpansion

set directory="C:\The_Directory_you_whish_to_check"
set file=%%a
set size=%%~Za
set mydate=%date%
set lastmod=%%~Ta



for /f "tokens=* delims=" %%a in ('dir /b "%directory%*.txt"') do (

echo %lastmod% > %directory%Autoreport\temp.txt
set /p var=<%directory%Autoreport\temp.txt
set myvar=!var:~0,10!
echo !myvar!
)

ENDLOCAL


Strange that I had to export the parameter to an textfile and reimport it to make it work.
But I guess, ends good all good

Posted by Benjamin-Pierre | with no comments
Filed under: , ,

[VBS] MOVE EMPTY FOLDERS

It's very annoying to have a lot of empty folders hanging around....


I've written a smal VBS script to check one location (user input) for empty folders.

If it finds empty folders it will move them to C:\EMPTYFOLDERS (you can edit the destination in the code.)


Here is the full code:


On Error Resume Next

   rootfolder = Inputbox("Enter directory/foldername: " & _
                         chr(10) & chr(10) & "(i.e. C:\Program Files or " & _
                         "\\Servername\C$\Folder)" & chr(10) & chr(10), _
                         "Getfoldersize", "C:\Folder")

   Set fso = CreateObject("scripting.filesystemobject")


'Run checkfolder

If (FSO.FolderExists(rootfolder)) Then
   CheckFolder (FSO.getfolder(rootfolder))
End If

Sub CheckFolder(objCurrentFolder)

If (FSO.FolderExists(objCurrentFolder)) Then
    
 For Each objFolder In objCurrentFolder.SubFolders

If (FSO.FolderExists(objFolder)) Then

FolderEmpty(objFolder)



End If
 Next
End If

End Sub


Function FolderEmpty(path)
WScript.Echo(Path)
    ' Check for an empty folder.
    Dim fso, oFolder, oFiles         ' Object variables
    Dim i, flag

    Set fso = CreateObject("Scripting.FileSystemObject")
    Set oFolder = fso.GetFolder(path)   ' Get folder.
    Set colSubfolders = oFolder.Subfolders
    Set oFiles = oFolder.Files          ' Get Files collection.

    flag = True                         ' No files
    For Each i in oFiles                ' A file has been found if
        flag = false                    ' the loop is processed.
        Exit For
    Next

    For Each objSubfolder in colSubfolders        ' No Subfolder
         flag = false                    ' the loop is processed.
            Exit For
    Next

    FolderEmpty = flag                  ' Return result.

If (FolderEmpty = "True" and Path<>"C:\EMPTYFOLDERS") Then
WScript.Echo(FolderEmpty)

fso.MoveFolder oFolder,"C:\EMPTYFOLDERS\"&oFolder.Name

End If

End Function


Enjoy

Posted by Benjamin-Pierre | with no comments
Filed under: ,