posted
29/09/09
By Fredrik Wall
This script will look in the Security EventLog at machinenamefor EventId 680 and display the last 5.
$logs=[System.Diagnostics.EventLog]::GetEventlogs("machinename")
$app = $logs |? {$_.log -eq 'security'}
$myError = $app.entries | ? {$_.eventid -eq '680'}
$myError | Select-Object -Last 5
To look at the whole security log you can do like this:
$logs=[System.Diagnostics.EventLog]::GetEventlogs("machinename")
$app = $logs |? {$_.log -eq 'security'}
$app.entries
Last 10 events from the security log
$logs=[System.Diagnostics.EventLog]::GetEventlogs("machinename")$app = $logs |? {$_.log -eq 'security'}$app.entries | Select-Object –Last 10
posted
17/09/09
By Fredrik Wall
We are currently working on some new tools for
the PKI Toolbox and there are currently 3 new news for the project.
- Own domain name
We got a domain name for the PKI Toolbox project.
http://www.pkitoolbox.com
- Invitation to Microsoft Sweden
Me and DXter have been invited to Microsoft TechNet Sweden
to record an interview and to demonstrate the PKI Toolbox.
So we will release some new tools before that meeting,
6th of October.
The recording will be on TechNet Edge later on.
http://edge.technet.com
- Live presentation
On the 13th of October you can see The PKI Toolbox on
a live presentation by DXter on Dataföreningen Sveriges
meeting about PKI i teori och praktik. A 2 hour presentation
about PKI by DXter.
All announcements can be found here,
www.pkitoolbox.com/+announcements
And the downloads can be found here,
www.pkitoolbox.com/+download
posted
15/09/09
By Fredrik Wall
In my How-To series about PowerShell I will show
how to administrate an IT environment with PowerShell.
We will start at an Administrators machine and then work
us up to an Active Directory.
The first 4 parts are:
- The Beginning
- Links
- Registry
- File handling
I’m not sure If It will be 1, 2, 3a, 3b, 3c, 4a-z etc.
I will start from the beginning and se what you think and then work
from there.
The How-To series will have text, screen dumps, links and maybe some screen casts.
The Part 1 and 2 will come in a couple of days.
And I’m thinking of some sort of PDF book with the parts as chapters in the end…
posted
15/09/09
By Fredrik Wall
This new tool are pretty cool!
Never miss to attach a document after this
Download and Video
More information
posted
14/09/09
By Fredrik Wall
Remote Server Administration Tools for Windows® 7 enables
IT administrators to manage roles and features that are installed
on computers that are running Windows Server® 2008 R2,
Windows Server® 2008, or Windows Server® 2003,
from a remote computer that is running Windows 7.
It can be downloaded from Microsoft Downloads and can be
found here.
You need to have Windows 7 Professional, Enterprise or Ultimate.
You will find a list of the tools and features you can use here.
How to install:
- Download one of the versions, x64 (222MB) or x86 (215MB).
- Run the installation/Windows update file.
- Installation of the features we want
Go to Control panel and Programs.
Then click on Turn Windows features on or off.
Scroll down to Remote Server Administration Tools.
Just click all the features you want and press OK.

- Done
After the installation you will find all new tools under
All Programs –> Administrative Tools
posted
14/09/09
By Fredrik Wall
I was downloading some stuff from Microsoft and
at the same time working in Word when I realized
that the green stuff on the IE button on the new bar
in Windows 7 was a download bar. This is cool!
posted
14/09/09
By Fredrik Wall
Links for Monday afternoon:
posted
11/09/09
By Fredrik Wall
I needed to export e-mail addresses from several
Distribution lists and did only have access to Outlook Web Access.
The only export function I found was to start a new mail in owa.
Mark all contacts in the Distribution list and drag them to the new mail.
Then you get something like:
<mc type="items" fid=""><itm><id>SMTP:me@noaddress.se</id><t>OneOff</t><urlid>SMTP%3ame%40noaddress.se</urlid></itm><itm><id>SMTP:nisse@noaddress.se</id><t>OneOff</t><urlid>SMTP%3anisse%40noaddress.se</urlid></itm></mc>
After a while I did realize that this is some kind of xml.
So I did a small PowerShell script that wash this text.
Before:

After:

The code:
#Generated Form Function
function GenerateForm {
########################################################################
# Code Generated By: SAPIEN Technologies PrimalForms (Community Edition) v1.0.6.0
# Generated On: 2009-09-11 10:25
# Generated By: dalle
########################################################################
#region Import the Assemblies
[reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null
[reflection.assembly]::loadwithpartialname("System.Drawing") | Out-Null
#endregion
#region Generated Form Objects
$form1 = New-Object System.Windows.Forms.Form
$btnExit = New-Object System.Windows.Forms.Button
$btnExport = New-Object System.Windows.Forms.Button
$richTextBox1 = New-Object System.Windows.Forms.RichTextBox
$groupBox1 = New-Object System.Windows.Forms.GroupBox
$InitialFormWindowState = New-Object System.Windows.Forms.FormWindowState
#endregion Generated Form Objects
#----------------------------------------------
#Generated Event Script Blocks
#----------------------------------------------
#Provide Custom Code for events specified in PrimalForms.
$btnExport_OnClick=
{
#TODO: Place custom script here
[xml]$file = $richTextBox1.text
$richTextBox1.text = ""
foreach ($myid in $file.mc.itm)
{ $richTextBox1.text += "`n" + $myid.id -Replace "SMTP:",""
}
}
$handler_form1_Load=
{
#TODO: Place custom script here
}
$btnExit_OnClick=
{
#TODO: Place custom script here
$form1.close()
}
$OnLoadForm_StateCorrection=
{#Correct the initial state of the form to prevent the .Net maximized form issue
$form1.WindowState = $InitialFormWindowState
}
#----------------------------------------------
#region Generated Form Code
$form1.Text = "OWA Distribution List Export"
$form1.Name = "form1"
$form1.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Width = 725
$System_Drawing_Size.Height = 430
$form1.ClientSize = $System_Drawing_Size
$form1.add_Load($handler_form1_Load)
$btnExit.TabIndex = 2
$btnExit.Name = "btnExit"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Width = 75
$System_Drawing_Size.Height = 23
$btnExit.Size = $System_Drawing_Size
$btnExit.UseVisualStyleBackColor = $True
$btnExit.Text = "Exit"
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 638
$System_Drawing_Point.Y = 400
$btnExit.Location = $System_Drawing_Point
$btnExit.DataBindings.DefaultDataSourceUpdateMode = 0
$btnExit.add_Click($btnExit_OnClick)
$form1.Controls.Add($btnExit)
$btnExport.TabIndex = 1
$btnExport.Name = "btnExport"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Width = 75
$System_Drawing_Size.Height = 23
$btnExport.Size = $System_Drawing_Size
$btnExport.UseVisualStyleBackColor = $True
$btnExport.Text = "Export"
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 557
$System_Drawing_Point.Y = 401
$btnExport.Location = $System_Drawing_Point
$btnExport.DataBindings.DefaultDataSourceUpdateMode = 0
$btnExport.add_Click($btnExport_OnClick)
$form1.Controls.Add($btnExport)
$richTextBox1.Name = "richTextBox1"
$richTextBox1.Text = ""
$richTextBox1.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 19
$System_Drawing_Point.Y = 38
$richTextBox1.Location = $System_Drawing_Point
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Width = 688
$System_Drawing_Size.Height = 341
$richTextBox1.Size = $System_Drawing_Size
$richTextBox1.TabIndex = 0
$form1.Controls.Add($richTextBox1)
$groupBox1.Name = "groupBox1"
$groupBox1.Text = "OWA Distribution List Export code"
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Width = 700
$System_Drawing_Size.Height = 381
$groupBox1.Size = $System_Drawing_Size
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 13
$System_Drawing_Point.Y = 13
$groupBox1.Location = $System_Drawing_Point
$groupBox1.TabStop = $False
$groupBox1.TabIndex = 3
$groupBox1.DataBindings.DefaultDataSourceUpdateMode = 0
$form1.Controls.Add($groupBox1)
#endregion Generated Form Code
#Save the initial state of the form
$InitialFormWindowState = $form1.WindowState
#Init the OnLoad event to correct the initial state of the form
$form1.add_Load($OnLoadForm_StateCorrection)
#Show the Form
$form1.ShowDialog()| Out-Null
} #End Function
#Call the Function
GenerateForm
posted
10/09/09
By Fredrik Wall
Microsoft Deployment Toolkit 2010 got released yesterday.
You will find the MDT 2010 site here.
Download it and start to deploy
posted
09/09/09
By Fredrik Wall
I will be at the release party of the new
Swedish IT-Security book “Svenska it-säkerhetshandboken 1.0”
at LabCenter here in Sweden this evening.
Read more about it in Swedish on Facebook,
http://www.facebook.com/group.php?gid=39692628433&ref=ts#/event.php?eid=129508809121
And they will send it live,
http://www.labcenter.se/live
Technorati Tags:
LabCenter