header image

Archive for July, 2011

Now this is odd

Posted by: | July 27, 2011 | No Comment |

I have three machines running Windows 7 32 bit an HP laptop running Ultimate an HP netbook running starter edition a Dell duo running Home Premium I have installed the Kindle for PC reader on each of them.  It installed and worked without any problems – – until today. I added two books to the […]

under: Windows 7

Just a thought

Posted by: | July 27, 2011 | 4 Comments |

I’ve working with WMI a lot recently and frequently seen things like this Get-WmiObject -Class Win32_OperatingSystem -ComputerName dc02 Get-WmiObject -Class Win32_ComputerSystem -ComputerName dc02 Get-WmiObject -Class Win32_LogicalDisk -ComputerName dc02 Each of these has to create a connection is $sb = { Get-WmiObject -Class Win32_OperatingSystem Get-WmiObject -Class Win32_ComputerSystem Get-WmiObject -Class Win32_LogicalDisk } Invoke-Command -ScriptBlock $sb -ComputerName dc02 […]

under: PowerShell and WMI, PowerShellV2

AD account Expiry date

Posted by: | July 25, 2011 | No Comment |

In many organisations AD accounts for temporary works are set to expiry when their contract ends.  Its also a good practice to put an expiry date on any one who is leaving – that way you know their account won’t available. Setting the expiry date for all users in an OU is done like this […]

under: PowerShell and Active Directory, Windows Server 2008 R2

GPO cmdlets

Posted by: | July 25, 2011 | No Comment |

One thing new I found out today – if you install the Remote Server Administration Tools (RSAT) on Windows 7 you can use the GPO cmdlets (GroupPolicy module) against a Windows 2003 domain controller. The cmdlets enable all GPO management tasks apart from modifying settings. Useful

under: PowerShell and Active Directory

Final reminder for the user group meeting on Tuesday 26 July Details from: http://msmvps.com/blogs/richardsiddaway/archive/2011/07/20/july-2011-user-group-reminder.aspx

under: PowerShell User Group

Just enough

Posted by: | July 23, 2011 | No Comment |

One thing that never seems to stated is that you don’t need to use the full criteria when searching for something. As an example I wanted to know the COM related services running on a system Get-Service | where {$_.DisplayName -like "*com*"} supplies Status   Name               DisplayName ——   —-               ———– Running  Browser            Computer Browser Stopped  COMSysApp          […]

under: PowerShell Basics

Moving Windows

Posted by: | July 23, 2011 | 1 Comment |

In answer to a forum question I started to look at how you could move the PowerShell window from within PowerShell. Its not straight forward as we have to dig into the Win32 APIs I came up with this code function move-window { param( [int]$newX, [int]$newY ) BEGIN { $signature = @’ [DllImport("user32.dll")] public static […]

under: PowerShell and .NET, PowerShellV2, Windows 7

One of the major errors I see PowerShell newcomers performing is copying script structures and syntax of VBScript into PowerShell. Let me give you an example This piece of VBScript is borrowed from the Windows 2000 scripting guide   strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colSettings […]

under: PowerShell and WMI, PowerShell Basics

Dell duo tablet

Posted by: | July 21, 2011 | No Comment |

Having bought the Dell Duo a few weeks ago I’ve been giving its tires a good kick. The duo is a combination netbook and tablet. It opens and works like a conventional netbook but the screen flips round and so you can close the lid, have the screen on the outside and use it as […]

under: Technology, Windows 7

In this post http://msmvps.com/blogs/richardsiddaway/archive/2011/07/17/can-i-should-i.aspx I stated that PowerShell isn’t necessarily the right answer to every problem. I was left a comment asking if I could expand.  I’ll do that over a series of short posts as I think of examples. One of the first that comes to mind is legacy scripts. VBScript never really caught […]

under: Philosophy, PowerShellV2

« Newer Posts - Older Posts »

Categories