Sign in
|
Join PowerShell.com!
|
Help
Home
PowerTips
Ask the Experts
Forums
Webcasts
Blogs
eBookV2
Script Library
Twitter Grid
Modules
QuickClick
Scripts
Snippets
Videos
Library
»
Snippet Library
»
Functions
»
Prompt Computer
Prompt Computer
Share
|
Browse Library
Module Library
QuickClick Library
Script Library
Snippet Library
ADSI
Comparison
Conditions and Loops
.Net
Exception Handlers
Files and Folders
Functions
Headers
Includes
Network
Pipeline
PowerShell Internals
Registry
Samples
Script Functions Templates
Security
SQL Server
Templates
User Management
WMI
Video Library
Members Only
Tags
Function
Prompt Advanced
Prompt Computer
Snippet
VM
VMware
View more
Previous
|
Next
|
View all files
|
View Slideshow
Download
posted by
Richard Giles
02-17-2009
Downloads: 305
File size: 625 B
Views: 1,003
Embed
Prompt Computer
<?
xml
version
=
"1.0"
?>
<CodeSnippets xmlns
=
"http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"
>
<CodeSnippet Format
=
"1.0.0"
>
<Header>
<Title>Prompt with computername<
/
Title>
<Shortcut
/
>
<Description>Simple prompt
function
that displays your computername<
/
Description>
<Author>Dr. Tobias Weltner http:
//
www.powershell.de
<
/
Author>
<SnippetTypes>
<SnippetType>Expansion<
/
SnippetType>
<
/
SnippetTypes>
<
/
Header>
<Snippet>
<Code Language
=
"PowerShell"
Kind
=
"2"
><
!
[CDATA[
function
Prompt {
"PS [$env:computername] >"
}]]><
/
Code>
<
/
Snippet>
<
/
CodeSnippet>
<
/
CodeSnippets>
Filed under:
Snippet
,
Prompt Computer
Simple prompt function that displays your computername
Copyright 2012 PowerShell.com. All rights reserved.