When we looked at modules we used Export-Module at the end of the module file to control which functions were made visible. This becomes a little awkward if we have a large number of functions that we may want to use in differing combinations. The solution is to use a module manifest. This is a […]
Archive for February, 2009
7pm GMT on Thursday February 26th sees Rolf Masuch presenting on using PowerShell as Active Directory Login Script. Details here http://richardsiddaway.spaces.live.com/default.aspx?_c01_BlogPart=blogentry&_c=BlogPart&handle=cns!43CFA46A74CF3E96!2079 Technorati Tags: PowerShell,User Group
Just installed Windows 7 on an old laptop – 0.75GB RAM single core. It works a treat and is reasonably responsive. It is more than enough for Office type applications and Internet. Well impressed as Vista wouldn’t even look at this machine. Looks like I’ve just extended the life time of that machine. Few issues […]
The March meeting will be on Thursday 26th March at 6.30pm Location: Microsoft Offices in Reading (TVP) Memphis room Speakers: Jonathan Medd on the AD cmdlets in Windows Server 2008 R2 Alan Renouf on VMWare’s VI toolkit plus there will be an introduction to Regular Expressions in PowerShell Don’t forget Thursdays Live Meeting Technorati […]
Last time we created a script file with three functions new-password which controls the creation of a new password get-randchar which generates a random character from a given character set add-character which adds one of more characters of a given type to the password using get-randchar Oops I made the mistake of calling it add-characters […]
Don’t forget 7pm GMT on Thursday February 26th sees Rolf Masuch presenting on using PowerShell as Active Directory Login Script. Details here http://richardsiddaway.spaces.live.com/default.aspx?_c01_BlogPart=blogentry&_c=BlogPart&handle=cns!43CFA46A74CF3E96!2079 Technorati Tags: PowerShell,User Group
PowerShell advanced function parameters
Posted by: richardsiddaway | February 21, 2009 | No Comment |One annoying error I have just stumbled over. When using the Parameter keyword don’t put a space after it. If you do this [Parameter (Position=0,HelpMessage="The length of password. Default is random between 8 and 12")] you will get this error Cannot find type for custom attribute ‘Parameter ‘. Please make sure the assembly containing this […]
One thing I’ve noticed with the ISE is that if you have a syntax error such as mismatched brackets or forget a closing “ on a string all of the colour syntax highlighting disappears after the error – the text is all black (or whatever colour you are using). Helps spot the errors. Technorati […]
Jeffrey left a comment on this post http://richardsiddaway.spaces.live.com/blog/cns!43CFA46A74CF3E96!2084.entry regarding discovery of WMI classes. He pointed out that if the line of PowerShell is changed to 001 Get-WMIObject -NameSpace root -Recurse -List *Printer* that you can check all namespaces in one hit. Recurse! where did that come from. Checked the help file for Get-WmiObject and couldn’t see anything about recurse […]
One thing that seems to come up rather frequently on the newsgroups is what WMI class do I need to use to do X. The really confusing thing about WMI is knowing just what is available. I have done far more with WMI since discovering PowerShell than I ever did with VBScript. That’s for 2 […]
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