PowerShell outputs objects but sometimes you need just the values. The –Expandproperty parameter of select-object can pull the values from a property. Compare: £> Get-VM | select Name Name —- Arista SphinxLx01 W12R2DSC W12R2OD01 W12R2SCDC01 W12R2SUS W12R2TGT W12R2Web01 W12R2Web02 with £> Get-VM | select -ExpandProperty Name Arista SphinxLx01 W12R2DSC W12R2OD01 W12R2SCDC01 W12R2SUS W12R2TGT […]
Archive for May, 2015
Finding users that can change their password
Posted by: richardsiddaway | May 31, 2015 Comments Off on Finding users that can change their password |Way back in this post https://richardspowershellblog.wordpress.com/2012/02/10/finding-users-who-cannot-change-password/ I showed how to discover those users who can’t change their passwords. I was recently asked how to find those users that can change their password. Active Directory doesn’t store this information directly but the CannotChangePassowrd attribute is false for those users that can change their password £> […]
IPAM: 2 Reading data
Posted by: richardsiddaway | May 29, 2015 Comments Off on IPAM: 2 Reading data |Once you have your IPAM server configured you can start to read the data its collected. If you are working against a remote IPAM server than you need to create a CIM session to that machine before doing anything else. $cs = New-CimSession -ComputerName W12R2SUS You can discover the domain you’re working against £> […]
Copy files over PS remoting sessions
Posted by: richardsiddaway | May 28, 2015 Comments Off on Copy files over PS remoting sessions |One neat feature of the April 2015 WMF 5.0 preview is that you can copy files over a remoting session. First create a session to a remote machine $cs = New-PSSession -ComputerName W12R2SUS Define the source and destination for the copy. Use –ToSession to determine the remoting session you will use to determine the […]
PowerShell Summit Europe 2015 – – sold out
Posted by: richardsiddaway | May 27, 2015 Comments Off on PowerShell Summit Europe 2015 – – sold out |The PowerShell Summit Europe 2015 is sold out. Please be aware that we don’t maintain a waiting list as the Summit is a benefit of PowerShell Association membership
IPAM: 1 Installation and configuration
Posted by: richardsiddaway | May 21, 2015 Comments Off on IPAM: 1 Installation and configuration |IPAM stands for IP Address Management. It’s a feature in Windows Server 2012 R2 that enables you manage your DHCP and DNS servers as a whole rather than at the individual service or server level. Installation of IPAM follows the standard approach for any Windows feature. Note that you can install IPAM on a […]
PowerShell Summit Europe 2015–nearly sold out
Posted by: richardsiddaway | May 18, 2015 Comments Off on PowerShell Summit Europe 2015–nearly sold out |There are a handful of places left for the PowerShell Summit Europe 2015. If you want to secure a place I recommend that you book very soon as we can’t extend capacity any further.
Playing with the range operator
Posted by: richardsiddaway | May 15, 2015 Comments Off on Playing with the range operator |The range operator allows you to reference a range of numbers 1..10 is equivalent to 1,2,3,4,5,6,7,8,9,10 If you want anything other than numbers you’re stuck as the range operator only works with integers though you can have a decrementing list 10..1 65..74 | foreach {[char]$psitem} would be A – J If […]
PowerShell DSC for Linux
Posted by: richardsiddaway | May 7, 2015 Comments Off on PowerShell DSC for Linux |PowerShell DSC for Linux has moved out of CTP and v1 is available for download from http://www.microsoft.com/en-us/download/details.aspx?id=46919 You will find more details at http://blogs.msdn.com/b/powershell/archive/2015/05/06/powershell-dsc-for-linux-is-now-available.aspx You will need to download OMI version 1.0.8-1 which is available from https://collaboration.opengroup.org/omi/documents.php?action=show&dcat=&gdid=32721 OMI has to be installed on the Linux box before the DSC package A […]
WMF 5.0 April 2015 preview – – software inventory logging
Posted by: richardsiddaway | May 6, 2015 Comments Off on WMF 5.0 April 2015 preview – – software inventory logging |A software inventory module is now included with the April 2015 WMF 5.0 preview £> Get-Command -Module SoftwareInventoryLogging | select Name Name —- Get-SilComputer Get-SilComputerIdentity Get-SilData Get-SilLogging Get-SilSoftware Get-SilUalAccess Get-SilWindowsUpdate Publish-SilData Set-SilLogging Start-SilLogging Stop-SilLogging Windows updates are always a good place to start poking into your systems £> Get-Command Get-SilWindowsUpdate -Syntax Get-SilWindowsUpdate [[-ID] <string[]>] […]
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