-
Recent Posts
Archives
- January 2020 (4)
- December 2019 (12)
- November 2019 (9)
- October 2019 (12)
- September 2019 (7)
- August 2019 (12)
- July 2019 (12)
- June 2019 (12)
- May 2019 (12)
- April 2019 (12)
- March 2019 (12)
- February 2019 (12)
- January 2019 (12)
- December 2018 (12)
- November 2018 (12)
- October 2018 (15)
- September 2018 (12)
- August 2018 (15)
- July 2018 (11)
- June 2018 (12)
- May 2018 (12)
- April 2018 (12)
- March 2018 (12)
- February 2018 (12)
- January 2018 (12)
- December 2017 (12)
- November 2017 (14)
- October 2017 (12)
- September 2017 (12)
- August 2017 (12)
- July 2017 (12)
- June 2017 (12)
- May 2017 (12)
- April 2017 (12)
- March 2017 (12)
- February 2017 (6)
- January 2017 (14)
- December 2016 (12)
- November 2016 (12)
- October 2016 (12)
- September 2016 (15)
- August 2016 (12)
- July 2016 (17)
- June 2016 (15)
- May 2016 (12)
- April 2016 (14)
- March 2016 (12)
- February 2016 (14)
- January 2016 (17)
- December 2015 (14)
- November 2015 (12)
- October 2015 (20)
- September 2015 (12)
- August 2015 (16)
- July 2015 (22)
- June 2015 (12)
- May 2015 (12)
- April 2015 (12)
- February 2015 (15)
- January 2015 (19)
- December 2014 (14)
- November 2014 (12)
- October 2014 (23)
- September 2014 (20)
- August 2014 (20)
- July 2014 (20)
- June 2014 (24)
- May 2014 (22)
- April 2014 (20)
- March 2014 (21)
- February 2014 (20)
- January 2014 (20)
- December 2013 (20)
- November 2013 (21)
- October 2013 (20)
- September 2013 (38)
- August 2013 (24)
- July 2013 (20)
- June 2013 (21)
- May 2013 (21)
- April 2013 (22)
- March 2013 (7)
- February 2013 (12)
- January 2013 (24)
- December 2012 (19)
- November 2012 (15)
- October 2012 (8)
- September 2012 (19)
- August 2012 (7)
- July 2012 (5)
- June 2012 (19)
- May 2012 (30)
- April 2012 (21)
- March 2012 (65)
- February 2012 (94)
- January 2012 (54)
- December 2011 (17)
- November 2011 (11)
- October 2011 (15)
- September 2011 (39)
- August 2011 (57)
- July 2011 (58)
- June 2011 (65)
- May 2011 (53)
- April 2011 (25)
- March 2011 (12)
- February 2011 (18)
- January 2011 (27)
- December 2010 (2)
- November 2010 (14)
- October 2010 (13)
- September 2010 (1)
- June 2010 (11)
- May 2010 (31)
- April 2010 (29)
- March 2010 (19)
- February 2010 (31)
- January 2010 (28)
- December 2009 (11)
- November 2009 (40)
- October 2009 (2)
- September 2009 (8)
- August 2009 (21)
- July 2009 (21)
- June 2009 (27)
- May 2009 (32)
- April 2009 (24)
- March 2009 (41)
- February 2009 (42)
- January 2009 (34)
- December 2008 (30)
- November 2008 (40)
- October 2008 (42)
- September 2008 (52)
- August 2008 (40)
- July 2008 (35)
- June 2008 (38)
- May 2008 (29)
- April 2008 (32)
- March 2008 (59)
- February 2008 (43)
- January 2008 (47)
- December 2007 (30)
- November 2007 (62)
- October 2007 (54)
- September 2007 (43)
- August 2007 (44)
- July 2007 (55)
- June 2007 (57)
- May 2007 (55)
- April 2007 (43)
- March 2007 (61)
- February 2007 (50)
- January 2007 (21)
- December 2006 (7)
- November 2006 (16)
Categories
- .NET
- Active Directory
- Active Directory administration with PowerShell
- Architecture
- Azure
- Bash
- BITS
- Books
- CDXML
- CIM
- Cloud
- COM
- Containers
- Deep Dive
- Desired State Configuration
- DevOps
- DHCP
- DNS
- DSC
- European Summit
- Events
- Exchange
- File system
- files
- Firewall
- General
- General IT matters
- Hyper-V
- IIS
- IT Community
- IT Security
- Learning Powershell
- Linux
- Math
- Microsoft
- Modules
- Nano server
- Networking
- Office 2010
- Office 2013
- Open Source
- Opinion
- Outlook
- Philosophy
- Powershell
- PowerShell 7
- PowerShell and Active Directory
- PowerShell and CIM
- PowerShell and Exchange 2007
- PowerShell and IIS
- PowerShell and SQL Server
- PowerShell and WMI
- Powershell Basics
- PowerShell User Group
- PowerShell V2
- PowerShell V3
- PowerShell v4
- PowerShell v5
- PowerShell v6
- powershell.org
- PowerShellGet
- PSAM
- Rant
- Registry
- Science Fiction
- Script of the Week
- Scripting
- Scripting Games
- Scritping Games 2014
- Security
- SQL Server
- Storage
- Strings
- Summit
- Technology
- Uncategorized
- Virtualisation
- Walking
- Windows 10
- Windows 7
- Windows 8
- Windows 8 Server
- Windows 8.1
- Windows Server
- Windows Server 1709
- Windows Server 2008
- Windows Server 2008 R2
- Windows Server 2012
- Windows Server 2012 R2
- Windows Server 2016
- Windows Server 2019
- WMFv5
- WPF
- WSH
- WSUS
Meta
Twitter
Tweets by RSiddaway
Monthly Archives: August 2018
PowerShell string contains
How can you check if a PowerShell string contains a character or substring? You might be tempted to try this: PS> $s = ‘abcdefghijk’ PS> $s -contains ‘f’ False But –contains is for working with the contents of arrays. So … Continue reading
Posted in Powershell
1 Comment
PowerShell Day UK Agenda Update
There’s been a Powershell Day UK Agenda Update. Looks like there’ll be three tracks for most of the day. Full agenda and tickets from – https://psday.uk/
Posted in Powershell
Leave a comment
PowerShell v6.1– using PowerShell v5.1 modules
Something new to be aware of in PowerShell v6.1– using PowerShell v5.1 modules . In PowerShell v6.0.4 the default module path is PS> $env:PSModulePath -split ‘;’ C:\Users\Richard\Documents\PowerShell\Modules C:\Program Files\PowerShell\Modules c:\program files\powershell\6.0.4\Modules If you want to use the netadapter cmdlets for … Continue reading
Posted in PowerShell v6
Leave a comment
PowerShell v6.1 release candidate 1
PowerShell v6.1 release candidate 1 is now available from https://github.com/PowerShell/PowerShell/releases The release notes don’t show any major new functionality compared to preview 4 though there are a number of minor updates, changes and bug fixes.
Posted in PowerShell v6
Leave a comment
Deleting folders based on month name
An interesting problem around deleting folders based on month name. You have a folder structure that looks like this C:\Testdata\2011\08-Aug C:\Testdata\2011\09-Sep C:\Testdata\2011\10-Oct C:\Testdata\2011\11-Nov C:\Testdata\2011\12-Dec C:\Testdata\2012\01-Jan C:\Testdata\2012\02-Feb C:\Testdata\2012\03-Mar C:\Testdata\2012\04-Apr C:\Testdata\2012\05-May C:\Testdata\2012\06-Jun C:\Testdata\2012\07-Jul C:\Testdata\2012\08-Aug C:\Testdata\2012\09-Sep C:\Testdata\2012\10-Oct C:\Testdata\2012\11-Nov C:\Testdata\2012\12-Dec C:\Testdata\2013\01-Jan C:\Testdata\2013\02-Feb C:\Testdata\2013\03-Mar C:\Testdata\2013\04-Apr … Continue reading
Posted in Powershell
Leave a comment
File searches with WMI
I saw a question about file searches with WMI. If you just know the file name it’s a very slow process. Painfully slow. If you have an idea about the folder its much quicker. function get-wmifile { [CmdletBinding()] param ( … Continue reading
Posted in PowerShell and CIM, PowerShell and WMI
Leave a comment
Variable type
Usually when you create a variable you implicitly set the type by the value you use. Sometimes though you may want to explicitly set the variable type. if you don’t give the variable a type you can do this: PS> … Continue reading
Posted in Powershell
Leave a comment
Read only and constant variables
When you create a variable you usually want to be able to change its value – the clue is in the term variable. Sometimes though you might want to use a value that doesn’t change – you want read only … Continue reading
Posted in Powershell
Leave a comment
user logon time
Saw an interesting question about user logon time. How can you tell the logged on user and when they logged on $logon = Get-CimInstance -ClassName Win32_LogonSession | sort StartTime -Descending | select -First 1 $user = Get-CimAssociatedInstance -InputObject $logon -ResultClassName … Continue reading
Posted in PowerShell and CIM, PowerShell and WMI
Leave a comment
Splitting on a \
Splitting strings is usually easy – you use the –split operator or the Split() method. Occasionally you may hit a problem – for instance splitting on a \ character. Let me demonstrate with an example. PS> Get-CimInstance -ClassName Win32_ComputerSystem | … Continue reading
Posted in Powershell
Leave a comment