Consider the file information from get-childitem PS> $file = ls servicesv0.6.txt Fullname gives the full path to the file PS> $file.Fullname C:\MyData\SkyDrive\Data\scripts\servicesv0.6.txt if you use DirectoryName you get the full path to the parent directory PS> $file.DirectoryName C:\MyData\SkyDrive\Data\scripts The easiest way to get the folder holding the path is like this […]
Archive for April, 2013
Looking at my first group of entries for Beginners Event 1 I’ve noticed what seems like a fanatical attempt to squash everything onto one line. command; command; command; command is NOT a one liner. The ; marks the end of a line command | command | command | command IS a one liner, even if […]
When my children were at school and going off for a test or exam the last thing I told them was read the question. It seems this needs to be repeated for the Scripting Games. The Beginners Event 1 involved MOVING files from one server to another. I have seen a significant number of answers […]
As a final test I want to see what happened when I ran multiple commands against the remote machine. PS> 1..100 | foreach { Measure-Command -Expression{1..100 | foreach { Get-WmiObject -Class Win32_ComputerSystem -ComputerName W12SUS; Get-WmiObject -Class Win32_OperatingSystem -ComputerName W12SUS; Get-WmiObject -Class Win32_LogicalDisk -ComputerName W12SUS}} } | Measure-Object -Average TotalMilliseconds Count : 100 Average : 6986.797156 […]
Backticks are baaaaaad; don’t do backticks
Posted by: richardsiddaway | April 30, 2013 | No Comment |The voting/judging process has started for event 1 in the 2013 Scripting Games. What I’m going to be doing over the next few weeks is point out some of the things that I’ve noticed when judging. Some will be good things that I think you should adopt; others will be bad things that you should […]
CIM vs WMI cmdlets-remote execution speed
Posted by: richardsiddaway | April 29, 2013 | No Comment |Following on from my previous post we’ll look at how the two types of cmdlets compare for accessing remote machines. I used a similar format to the previous tests but was accessing a remote machine. First off was the WMI cmdlet – using DCOM to access the remote Windows 2012 server PS> 1..100 | foreach […]
AD Management in a Month of Lunches– chapter 9 in MEAP
Posted by: richardsiddaway | April 29, 2013 | No Comment |The MEAP for AD Management in a Month of Lunches has been updated with the release of chapter 9 on managing group policies
CIM cmdlets vs WMI cmdlets–speed of execution
Posted by: richardsiddaway | April 28, 2013 | No Comment |One question that came up at the summit was the comparative speed of execution of the new CIM cmdlets vs the old WMI cmdlets. No of us knew the answer because we’d never tried measuring the speed. I decided to perform some tests. This first test is accessing the local machine. In both cases the […]
I was thinking on the plane back from the PowerShell summit about the CRUD activities. They are a concept we have inherited from the database world: C = Create R = Read U = Update D= Delete Create, Update and Delete correspond directly to the PowerShell verbs – New,Set and Remove respectively. The Read action […]
The 2013 Scripting Games kicked off during the PowerShell summit. Event 1 is open and you can submit entries up until 23:59:59 GMT on 29 April 2013. Voting on the entries starts at at midnight on 30 April. You can enter and you can vote on the entries. This is a community games run by […]
Categories
- .NET
- Active Directory
- 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
- Firewall
- General
- General IT Matters
- Hyper-V
- IIS
- Infrastructure
- 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 .NET
- PowerShell and Active Directory
- PowerShell and CIM
- PowerShell and Exchange 2007
- PowerShell and IIS
- PowerShell and SQL Server
- PowerShell and WMI
- PowerShell Basics
- PowerShell original
- PowerShell Summit
- PowerShell User Group
- PowerShell User Group 2
- PowerShell v2
- PowerShell V3
- PowerShell v4
- PowerShell v5
- PowerShell v6
- PowerShell.org
- PowerShellGet
- PowerShellV2
- PSAM
- Rant
- Registry
- Scripting
- Scripting Games
- Scripting Games 2104
- Security
- SQL Server
- Storage
- Strings
- Summit
- Technology
- Uncategorized
- Virtualization
- Windows 10
- Windows 2012 R2
- 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
- WSUS