PowerShell for Windows Admins:

Powershell


June 29, 2016  10:57 AM

Cleaning up entries on Remote Desktop Connection

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell, Registry settings

I use RDP between my main laptop and the machine on which my lab resides. When I rebuild the lab the entries in the Remote Desktop Connection for the old machine still remain. There isn’t a direct way to remove those entries. But you can remove them from the registry. First view the...

June 29, 2016  8:36 AM

Boolean in Where-Object filter

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

I was testing some code yesterday and realised there was a quirk in the way the original where syntax (with {}) worked and the way the newer syntax worked. To demonstrate this I created a set of objects $i = 0 $tests = while ($i -lt 25){ New-Object -TypeName PSObject -Property @{ Index =...


June 28, 2016  10:35 AM

Still asking for topics

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Earlier in the month I posted a request for topics on powershell.org https://powershell.org/request-for-topics/ This is a request for YOU to tell us what topics you would like to see at...


June 27, 2016  12:57 PM

PowerShell Summit & Conference videos 2016

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

If you didn’t get to any of these conferences this year the videos are now available. PowerShell and DevOps Summit 0 Comments     RSS Feed     Email a friend


June 25, 2016  9:17 AM

Parallel processing

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

One of the great features PowerShell brings is the ability to remotely administer your servers. Most people begin remote administration by processing the servers sequentially. Eventually, this process breaks down because you have too many servers and/or the processes you are running against each...


June 12, 2016  4:22 AM

Months

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

It would be nice to be able to do this: PS>  Get-Date -Day 25 -Month December -Year 2016 Get-Date : Cannot bind parameter 'Month'. Cannot convert value "December" to type "System.Int32". Error: "Input string was not in a correct format." At line:1 char:25 + Get-Date -Day 25 -Month...


June 11, 2016  4:28 AM

WMI classes and Storage cmdlets

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, Powershell, WMI

There is a hierarchy of objects to work through when dealing with disks First you have the physical disk PS>  Get-CimInstance -ClassName Win32_DiskDrive | fl Partitions : 5 DeviceID   : \\.\PHYSICALDRIVE0 Model      : HFS256G3AMNB-2200A Size       :...


June 10, 2016  6:59 AM

WMI Filters

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, Powershell, WMI

A common mistake with WMI/CIM filters is: PS>  Get-WmiObject -Class Win32_LogicalDisk -Filter "DeviceId=C:" Get-WmiObject : Invalid query "select * from Win32_LogicalDisk where DeviceId=C:" At line:1 char:1 + Get-WmiObject -Class Win32_LogicalDisk -Filter "DeviceId=C:" +...


June 8, 2016  5:13 AM

32 or 64 and/or Administrator

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

When you run the PowerShell console (or ISE) the default icon runs a 32 or 64 bit version that matches your OS. On a 64 bit machine you have the option of running in 32bit (icons have a (x86) suffix on the title. How can you tell whether you’re running in 32 or 64 bit mode? One way is shown...


June 7, 2016  4:03 AM

Local Administrators

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Finding the local administrators on a system is a not infrequent action.  There are a number of ways to do this. The oldest method is to use the ADSI WinNT provider $group =[ADSI]"WinNT://$($env:COMPUTERNAME)/Administrators, group" $members = @($group.psbase.Invoke("Members")) $members |...


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: