Skip to content

Commit

Permalink
Add CmdletBinding behaviour to support -Verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
tathamoddie committed Jan 19, 2016
1 parent 5201e78 commit b8ca6a2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion New-Machine.ps1
Original file line number Diff line number Diff line change
@@ -1,4 1,7 @@
$ErrorActionPreference = 'Stop';
[CmdletBinding()]
param ()

$ErrorActionPreference = 'Stop';

$IsAdmin = (New-Object System.Security.Principal.WindowsPrincipal([System.Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)
if (-not $IsAdmin) {
Expand Down

0 comments on commit b8ca6a2

Please sign in to comment.