PowerShell for Windows Admins:

September, 2014


September 14, 2014  4:58 AM

Output from jobs

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

I tripped over a little problem the other day that’s worth reporting. I was running something like this: $sb = { $procs = get-service $procs | Export-Csv test.csv -NoTypeInformation } Start-Job -ScriptBlock $sb -Name test I was collecting some data and outputting a CSV. My problem was...

September 12, 2014  10:49 AM

Multiple triggers on a scheduled task

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Setting up a scheduled task can be accomplished like this: $taskname = 'Test Job' Get-ScheduledTask -TaskName $taskname -ErrorAction SilentlyContinue |  Unregister-ScheduledTask -Confirm:$false $trigger = New-ScheduledTaskTrigger -Daily -At 03:00 $actionscript = '-NoExit...


September 10, 2014  2:07 PM

OneNote and XML–finding pages

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
office 2013, Powershell

Pages are towards the bottom of the hierarchy in OneNote – though we still haven’t dived into the content of pages yet. You can find the pages in your notebooks like this: $onenote = New-Object -ComObject OneNote.Application $scope =...


September 9, 2014  1:22 PM

OneNote and XML–finding sections

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
office 2013, Powershell

I recently showed how to find the names of your OneNote notebooks. The next level down is the section. You can find these sections in a notebook like this: $onenote = New-Object -ComObject OneNote.Application $scope = [Microsoft.Office.Interop.OneNote.HierarchyScope]::hsPages [ref]$xml =...


September 8, 2014  1:36 PM

CimInstanceProperties

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, WMI

If you use Get-CimInstance and examine the object returned – you’ll find some meta-data at the end of the object: CimClass                                  : root/cimv2:Win32_OperatingSystem CimInstanceProperties                     :...


September 7, 2014  5:42 AM

Authorising a DHCP server and creating a scope

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
DHCP, Windows 2012

I recently re-built my test lab and now need to authorise the DHCP server. You can test the DHCP server: £> Get-DhcpServerSetting IsDomainJoined            : True IsAuthorized              : False DynamicBootp              :...


September 6, 2014  2:57 AM

LAST CALL for European PowerShell Summit 2014

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Security

This is the last call for attendee registration for the European PowerShell Summit 2014. The Summit is in Amsterdam - 29 September to 1 October 2014. Details from the events page


September 5, 2014  3:03 PM

Finding a file version

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
WMI

Interesting question on the forum – how to find the file version of IE on remote machines? Get-CimInstance -ClassName CIM_DataFile -Filter "Name = 'C:\\Program Files\\Internet Explorer\\iexplore.exe'"  | select -ExpandProperty Version Use the CIM_dataFile class.  Its one of the few CIM_...


September 5, 2014  1:48 AM

WMF 5.0 September 2014 preview now available

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Security

Another preview for WMF 5.0, and PowerShell 5.0, is available for download. Details from: 0 Comments     RSS Feed     Email a friend


September 4, 2014  1:07 PM

OneNote and XML–finding notebooks

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

When OneNote first came out there wasn’t an API for it as you get for Word or Excel. A community module enabled you to work with the XML that formed the OneNote note books but it wasn’t updated after Office 2007 and doesn’t really work with later versions of OneNote. I was looking at the...


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: