How fast does an admin script have to be? My opinion has always been that if its significantly faster than me doing the same task by hand then that’s more than fast enough. Is my time better spent developing new functionality compared to shaving a few % off the execution time of my scripts? If […]
Archive for June, 2013
When creating functions that accept a computer name as a parameter you will often see this syntax param ( [string]$computername = ‘localhost’ ) This is designed to give a default value in the event of a value not being passed. That’s a good idea if there is a sensible, safe, value you can use […]
The CIM cmdlets in PowerShell v3 enable you to refresh the data in the object. Try this: $p = Get-CimInstance -ClassName Win32_PerfFormattedData_PerfOS_Processor $p | Get-CimInstance | select percentprocessortime $p will remain unchanged. Another use for this is monitoring processes – you could check on CPU utilisation
Jeffrey Snover and Jason Helmick will be presenting by webcast 18 July 9am – 5pm (PDT) on “Getting started with PowerShell” Details from http://powershell.org/wp/2013/06/27/a-special-presentation-on-getting-started-with-powershell/ A follow up day of presentations will occur in August delving further into scripting, automation and building tools
Do you know how to discover which properties on a WMI class, and therefore a WMI instance, can be modified? Get-CimClass from the PowerShell 3.0 CIM cmdlets is the answer: $class = Get-CimClass -ClassName win32_volume $class.CimClassProperties The last command returns all of the properties in this format Name : Description Value : CimType […]
In this post http://richardspowershellblog.wordpress.com/2013/06/23/opinionautomate-or-suffer/ I talked about the need for admins to learn to automate. A couple of comments brought up the need for tools to create our automation scripts. I remember the 4th generation languages of the late 1980s & 1990s. The promised that you wouldn’t have to code – just drag & drop […]
The PowerShell 4.0 preview is now available. It comes as part of WMF 4.0 Windows Management Framework 4.0 Preview includes updates to Windows PowerShell, Windows PowerShell ISE, Windows PowerShell Web Services (Management OData IIS Extension), Windows Remote Management (WinRM), Windows Management Infrastructure (WMI), the Server Manager WMI provider, and a new feature for 4.0, […]
A question came up on the forum regarding dropping a database & I realised it was something I hadn’t done before. SMO provides a set of classes for managing SQL Server. You get SMO when you install the SQL Server management tools Import the module to load SMO assemblies import-module sqlps get the server object […]
I’ve RDPing into a number of servers from different systems recently and the way the screen resolution changes to match your monitor size is annoying. If I use the shortcut to the session I get whatever sizes were set in the last session so often logon, curse when the size isn’t convenient and logoff and […]
The Windows Server 2012 R2 preview is available on MSDN subscriber downloads. It has PowerShell v4!!!!
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