Sign in
|
Help
Richard Siddaway's Blog
Of PowerShell and Other Things
This Blog
Home
Contact
Syndication
RSS for Posts
Atom
RSS for Comments
Search
Go
Tags
Access
Active Directory
File Attributes
General
General IT matters
Hidden Files
IT Community
Microsoft
Modules
None
Office 2010
PowerGUI
Powershell
PowerShell and Active Directory
PowerShell and Exchange 2007
PowerShell and SQL Server
PowerShell and WMI
PowerShell User Group
PowerShell V2
Rant
SQL Server
User Group
v2
Windows 7
Windows Server 2008
Community
Home
Blogs
Media
Groups
Email Notifications
Go
Archives
November 2009 (38)
October 2009 (2)
September 2009 (8)
August 2009 (22)
July 2009 (21)
June 2009 (26)
May 2009 (31)
April 2009 (22)
March 2009 (38)
February 2009 (39)
January 2009 (34)
December 2008 (29)
November 2008 (37)
October 2008 (39)
September 2008 (51)
August 2008 (38)
July 2008 (25)
March 2008 (1)
November 2007 (2)
May 2007 (1)
December 2006 (1)
Browse by Tags
All Tags
»
PowerShell V2
»
Powershell
(
RSS
)
Access
format
Modules
Office 2010
Remoting
services
startup
v2
Windows 7
Mon, Nov 30 2009 11:18
Working with Access dates
Following on from the previous post about updating records one data type that will be a little awkward to work with is dates. If you use a US locale or any other that uses a date format of Month/Day/Year you can more or less ignore this because your standard...
Posted by
RichardSiddaway
| with
no comments
Filed under:
Powershell
,
PowerShell V2
,
Office 2010
,
Access
Mon, Nov 30 2009 10:58
Updating Access data
The last of of our data manipulation tasks is to update the data – we have already seen how to create, read and delete. 001 002 003 004 005 006 007 008 009 010 011 012 013 function Set-AccessData { [ CmdletBinding ( SupportsShouldProcess...
Posted by
RichardSiddaway
| with
no comments
Filed under:
Powershell
,
PowerShell V2
,
Office 2010
,
Access
Sun, Nov 29 2009 20:46
Testing Connection to Access database
Many of the functions we have created so far have taken a connection to an Access database as a parameter. At the time we pass in the connection we don’t actually know if the connection is open. Test-AccessConnection can be used to test the connection...
Posted by
RichardSiddaway
| with
no comments
Filed under:
Powershell
,
PowerShell V2
,
Office 2010
,
Access
Sun, Nov 29 2009 11:18
Removing Access Records
So far we have seen how to add data to a table in an access database – now we want to delete some records. This is an action that can cause problems especially if we get the wrong records – ideally we want to a mechanism to check what we are doing...
Posted by
RichardSiddaway
| with
no comments
Filed under:
Powershell
,
PowerShell V2
,
Office 2010
,
Access
Fri, Nov 27 2009 16:33
Add Access Record Pt III – parameter sets
Last time we added the option of inputting the table and values to our function but we needed a way to discriminate between that and using a full SQL statement. We can achieve this by dividing the parameters into parameter sets NOTE – This is a...
Posted by
RichardSiddaway
| with
no comments
Filed under:
Powershell
,
PowerShell V2
,
Office 2010
,
Access
Fri, Nov 27 2009 11:56
Export Access data to csv file
We already have all the functionality we need to achieve this. Import-Module accessfunctions $db = Open-AccessDatabase -name test03.mdb -path c:\test Get-AccessData -sql "select * from test1" -connection $db | Export-Csv -Path c:\test\test1...
Posted by
RichardSiddaway
| with
no comments
Filed under:
Powershell
,
PowerShell V2
,
Office 2010
,
Access
Thu, Nov 26 2009 21:17
Reading Access records
Reading data from an Access database is similar to the functionality we have already seen. 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 function Get-AccessData { param ( [string] $sql , ...
Posted by
RichardSiddaway
|
3 comment(s)
Filed under:
Powershell
,
PowerShell V2
,
Office 2010
,
Access
Thu, Nov 26 2009 20:52
Add Access Record PtII
We have seen how to add a record to an Access table by passing in the whole SQL string. This is OK when we want to add a single record or possibly not fill all fields in a row. 001 002 003 004 005 006 007 008 009 010 011 012 function Add...
Posted by
RichardSiddaway
| with
no comments
Filed under:
Powershell
,
PowerShell V2
,
Office 2010
,
Access
Wed, Nov 25 2009 20:21
Set Background colour of Excel cell
I needed to set the background colour of a cell in an Excel spreadsheet recently. The way to do it is to set the ColorIndex property of the Interior properties of the cell as shown in line 14. The ColorIndex can be set to a number between...
Posted by
RichardSiddaway
| with
no comments
Filed under:
Powershell
,
PowerShell V2
,
Office 2010
Mon, Nov 23 2009 19:56
Add Access record
We’ve seen how to create a database and a table. Now we need to know how to add a record to that table. 001 002 003 004 005 006 007 008 function Add-AccessRecord { param ( [string] $sql , [System...
Posted by
RichardSiddaway
| with
no comments
Filed under:
Powershell
,
PowerShell V2
,
Office 2010
,
Access
Mon, Nov 23 2009 17:32
Adding a Table to an Access database
After reviewing the function I produced in the last post I realised i had made it over complicated. I’m working with Office 2010 and 2007 predominantly so I should have the 2007 format as my default. If I do that and change the switch...
Posted by
RichardSiddaway
| with
no comments
Filed under:
Powershell
,
PowerShell V2
,
Office 2010
,
Access
Sun, Nov 22 2009 19:07
Creating an Access database
I’ve blogged a bit about using SQL Server with PowerShell, and using Word and Excel through PowerShell. I realised that I hadn’t seen much about using Access. Access is part of the Office suite and is present on many desktops. It forms a handy data...
Posted by
RichardSiddaway
| with
no comments
Filed under:
Powershell
,
PowerShell V2
,
Office 2010
,
Access
Wed, Nov 18 2009 19:13
Reminders via WPF
If I am working on my home machine I don’t necessarily have Outlook or any other application that gives me calendaring capability open. There are times when I need a simple reminder to do something. For some reason I always seem to have PowerShell open...
Posted by
RichardSiddaway
| with
no comments
Filed under:
Powershell
,
PowerShell V2
Fri, Nov 13 2009 15:42
Scheduled Tasks
Keeping on the theme of Scheduled Tasks I wanted to dig into the tasks that exist on my system. I did a fresh install of Windows 7 in August and haven’t created any scheduled tasks – so what I see should be close to the system defaults. This...
Posted by
RichardSiddaway
| with
no comments
Filed under:
Powershell
,
PowerShell V2
,
Windows 7
Thu, Nov 12 2009 19:43
Cleaning the Temp folder - Scheduling
When I posted about cleaning the temp folder http://msmvps.com/blogs/richardsiddaway/archive/2009/11/04/cleaning-temp-folder.aspx I said I would look at scheduling the task. I had intended to use the TaskScheduler module in the new PowerShell pack...
Posted by
RichardSiddaway
| with
no comments
Filed under:
Powershell
,
PowerShell V2
Wed, Nov 11 2009 19:52
Extension for temporary files
When I did the post on creating temporary files http://msmvps.com/blogs/richardsiddaway/archive/2009/11/05/creating-temporary-files.aspx I said I’d modify it so the file would be created with a given extension. 001 002 003 004 005 006 007 008 009 010...
Posted by
RichardSiddaway
| with
no comments
Filed under:
Powershell
,
PowerShell V2
,
Modules
Mon, Nov 9 2009 20:04
Getting Change Events
I wasn’t particularly happy with the script for getting change events on the filesystemwatcher we discussed last time. As a quick recap we ended up with this 001 002 003 004 Get-Event -SourceIdentifier "File System Changed"...
Posted by
RichardSiddaway
| with
no comments
Filed under:
Powershell
,
PowerShell V2
Mon, Nov 9 2009 8:15
Watching the file system
We saw how to watch for WMI events http://msmvps.com/blogs/richardsiddaway/archive/2009/11/07/powershell-wmi-events.aspx . In this post we will look at watching the file system. This time we will use the .NET System.IO.FileSystemWatcher object which means...
Posted by
RichardSiddaway
| with
no comments
Filed under:
Powershell
,
PowerShell V2
Sun, Nov 8 2009 11:03
Multiple test files
Back here http://msmvps.com/blogs/richardsiddaway/archive/2009/11/05/creating-temporary-files.aspx or http://richardsiddaway.spaces.live.com/blog/cns!43CFA46A74CF3E96!2595.entry I showed how to create temporary test files. We can simply create multiple...
Posted by
RichardSiddaway
| with
no comments
Filed under:
Powershell
,
PowerShell V2
Mon, Aug 3 2009 21:04
Service Startup History
If we need to look at the startup history of a service we can find the information in the event log 001 002 003 004 005 006 function Get-ServiceStartupHistory { param ( [string] $name ) Get-EventLog -LogName System | where { ( ( $_ . EventId -eq 7035...
Posted by
Richard Siddaway's Blog
Filed under:
Powershell
,
PowerShell V2
,
v2
,
services
,
startup
More Posts
Next page »