Following on from the previous post I was asked if the bit where we set the case on the file names and extension could be done in a select statement. Simple answer is yes Get-ChildItem | where {-not $_.PSIsContainer} | sort Fullname | select @{N="FullName"; E={$($_.Fullname.ToUpper())}}, @{N="Extension"; E={$($_.Extension.ToLower())}}, Length, LastWriteTime | Format-Table -Autosize Calculated fields […]
Archive for December, 2011
Formatting file listings–the other way
Posted by: richardsiddaway | December 30, 2011 | No Comment |A question was left asking about displaying a file listing with the full name in upper case and the extension in lower case. Its one line of PowerShell Get-ChildItem | where {-not $_.PSIsContainer} | sort Fullname | Format-Table @{N="FullName"; E={$($_.Fullname.ToUpper())}}, @{N="Extension"; E={$($_.Extension.ToLower())}}, Length, LastWriteTime -Autosize
If you run Get-WmiObject -Class Win32_ComputerSystem you get a few properties displayed Domain : WORKGROUP Manufacturer : Hewlett-Packard Model : HP G60 Notebook PC Name : RSLAPTOP01 PrimaryOwnerName : Richard TotalPhysicalMemory : 2951139328 Now if you want all properties you need Get-WmiObject -Class Win32_ComputerSystem | fl * or Get-WmiObject -Class Win32_ComputerSystem | select * […]
Just as remoting was viewed as the biggest gain in PowerShell v2 it looks like PowerShell workflows will be one of the biggest features on PowerShell v3. Some examples and explanation are available from http://blogs.msdn.com/b/powershell/archive/2011/12/22/another-holiday-gift-from-the-powershell-team-powershell-3-0-ctp2-getting-started-with-windows-powershell-workflow.aspx Enjoy
Here are the recordings, slides and demo scripts from last weeks two Live Meetings. Introduction to WMI https://skydrive.live.com/?cid=43cfa46a74cf3e96#cid=43CFA46A74CF3E96&id=43CFA46A74CF3E96%212931 WSMAN, WMI and CIM https://skydrive.live.com/?cid=43cfa46a74cf3e96#cid=43CFA46A74CF3E96&id=43CFA46A74CF3E96%212933 Down load and unzip to find all items
You may hear or read that WMI can’t accept wildcards. WRONG WMI accepts wildcards but not the ones you might expect. Consider Get-Process p* This gets all the process that begin with the letter p To do something similar with WMI we need to use the –Filter parameter. We can get a single process […]
As far as I am concerned this is International WMI week. I am delivering a Live Meeting session to the Corpus Christi (Texas) PowerShell group on Tuesday – An Introduction to WMI & PowerShell then on Thursday I am delivering a session to the UK PowerShell group http://msmvps.com/blogs/richardsiddaway/archive/2011/12/04/uk-powershell-group-december-2011.aspx – talking about WMI. WSMAN and the […]
With all the things happening in the last month – including the release of PowerShell v3 CTP 2 – one thing that seems to have been missed is that PowerShell is 5 years old! Yes – its just over 5 years since the release of PowerShell v1 was announced in Barcelona at the IT Forum […]
WMI, WSMAN, CIM and Authentication pt II
Posted by: richardsiddaway | December 10, 2011 | No Comment |Last time we saw that the WMI cmdlets have an Authentication parameter that uses DCOM authentication. It is possible to ignore this Authentication need if the WSMAN or CIM (PS v3 CTP 2) cmdlets are used. If you look at the WSMAN cmdlets then the following cmdlets have an Authentication parameter in PS v2 Test-WSMan […]
Authentication parameters in WMI, WSMAN and the new CIM cmdlets can be confusing. The PowerShell WMI cmdlets have an Authentication parameter that uses DCOM authentication. Using the Authentication parameter with the WMI cmdlets was explained here http://msmvps.com/blogs/richardsiddaway/archive/2011/08/04/authentication-impersonation-and-privileges.aspx This is not present on the WSMAN cmdlets (in PowerShell v2 and v3 CTP 2) and the […]
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