Uw beste bron van informatie en nieuws ongeveer BIOS, hardware en bestuurders op Internet

De ARTIKELEN van het uitzicht BOVENKANT 50 De VIDEO'S van het uitzicht SOFT van het uitzicht De HULP van het uitzicht

PowerShell

U momenteel doorbladert de artikelen van De Compatibele Software van het Uitzicht van MS-Windows de aanpassing van de categorie PowerShell.

Vensters PowerShell: Screencast op JAM

Dit is mijn eerste screencast (ooit!), en ik hoop om meer op PowerShell, en om het even wat te doen met betrekking tot PowerShell. In dit eerste screencast, ga ik een manifestatie van JAM doen: De JAM (de Toegang van de Baan & het Systeem van het Beheer) is een commercieel softwareproduct dat baan plannend voor Vensters, OpenVMS, UNIX en systemen Linux verstrekt. Vanaf een paar maanden geleden, verleent het nu volledige steun PowerShell

Het idee van het doen van een screencast kwam aan me een paar maanden achter, Jeffrey Snover blogged over JAM op het team van PowerShell van Vensters blog. Hij vermeldde dat hij één of ander soort videomanifestatie van zou willen zien hoe de JAM werkte. Aangezien niets beschikbaar was, besliste ik een screencast op het te doen, en hier is het in het formaat van de Flits: BLOKKEERT screencast.

Als er zijn bracht om het even wat met PowerShell in het bijzonder met elkaar in verband dat u een screencast zou willen zien, verlaat hier een commentaar of post iets in het scripting forum, en ik zal het aan mijn lijst van dingen toevoegen die ik zou willen om in de toekomst behandelen.

Ik hoop u van het geniet!

...
Klik blijven lezend „Vensters PowerShell: Screencast op JAM "

geschreven door marco.sh aw 29 oktober, 2007 met geen commentaren.
Lees meer artikelen verder PowerShell.

Het introduceren van Marco Shaw

Ik denk de Vensters PowerShell één van de grootste dingen die is onlangs moeten vrijgegeven te zijn (ja, ben ik a poshoholic).

In TechEd 2007 laatste Juni in Orlando, spraken heel wat mensen over PowerShell. Ben Pearce werkte een lijst van uit hoogste 5 vragen hij werd gevraagd terwijl het doen van manifestaties. Ik zal het tot u verlaten om de vragen te controleren, die vrij gedetailleerde antwoorden hebben. Ik ga beginnen op TLA over Vensters PowerShell blogging, en hoe het *your* wereld a kan maken luier betere plaats. Ik hoop dat, langs de manier, ik u kan helpen de MACHT van PowerShell begrijpen en waarderen, en u helpen uw milieu automatiseren of zelfs enkel met uw regelmatig dagelijks materiaal helpen. Op elk ogenblik, gelieve te posten in het scripting forum, als u om het even welke vragen of commentaren op PowerShell hebt. U kunt uw eigen manuscripten in andere talen zelfs posten, en vragen „hoe ik dit in PowerShell?“ doe. Ik zal u helpen de antwoorden vinden…

Ik wil u zo opgewekt zijn aangezien ik over deze nieuwe technologie ben.

Exchange 2007 was basically *built on* PowerShell, and as of Windows Server 2008 beta 3, it can

...
Click to continue reading "Introducing Marco Shaw"

Written by marco.shaw on August 30th, 2007 with no comments.
Read more articles on PowerShell.

Web Site Monitoring with PowerShell

The following example opens a URL every 5 minutes, tests the content, and measures the time it took to download the HTML for the page. Notice that all the HTML is dumped into a big fat string. The string is then searched for specific text that is known to be in the requested page. Note that this script runs forever and can be stopped with a Ctrl-C.

Example PowerShell script:

$webClient = new-object System.Net.WebClient
$webClient.Headers.Add("user-agent", "PowerShell Script")

while (1 -eq 1) {
$output = ""

$startTime = get-date
$output = $webClient.DownloadString("http://www.sysinternals.com/")
$endTime = get-date

if ($output -like "*Mark Russinovich*") {

"Success`t`t" + $startTime.DateTime + "`t`t" + ($endTime - $startTime).TotalSeconds + " seconds"
} else {
"Fail`t`t" + $startTime.DateTime + "`t`t" + ($endTime - $startTime).TotalSeconds + " seconds"
}

sleep(300)

}

Don't have PowerShell? Get it here!

News Source: blogs.technet.com

Written by Odd-Magne Kristoffersen on August 23rd, 2007 with no comments.
Read more articles on PowerShell.

Reboot a computer remotely with WMI and PowerShell

One of the trickiest things to do when working with computes remotely is reboot them. We also have to make sure that the computers don't have any bios issues that can cause them to not restart. Many times we can't even get logged on if their Terminal Services access is shut off. With this trick you can reboot a server with ease, even one that doesn't have PowerShell installed.

To do this first we get on a computer that does have PowerShell. At the PowerShell prompt, try:

PS C:\> $your_server = gwmi win32_operatingsystem -computer yourservername

If you follow best practices and do not run under a domain admin account, (or an account that is local admin on all your servers) Then you should see an error like this:

Now we want to be able to shutdown a computer, but we need to make sure we're using an account with permissions to reboot the computer in question.

You can use the runas CMD command to launch a PowerShell with the necessary credential.

PS C:\>runas /env /user:administrator@domain.local "powershell.exe"

Then you will be able to link the other computer to your variable, and fire off the simple reboot method.

PS C:\>$your_server = gwmi win32_operatingsystem -computer yourservername

...
Click to continue reading "Reboot a computer remotely with WMI and PowerShell"

Written by daniel.nerenberg on May 18th, 2007 with no comments.
Read more articles on PowerShell.

Create an AD user in PowerShell

PowerShell allows you to read, write and update Active Directory Objects. In conjunction with PowerShell's many other advanced features this provides a great environment to manage your AD, and to automate tasks.

To Create a user object:

First we need to set a variable to hold the domain object, and link the instance to the domain.

PS C:\> $domain = [ADSI] "LDAP://main:389/dc=domain,dc=local"

This will allow you to interact with AD from using this $domain variable.

You can list the root of your domain by typing:

PS C:\> $domain.psbase.Get_children()

This will list the root containers in your active directory by Distinguished Name.

To get more information about a specific branch in the directory we can associate that branch to a new variable.

$usersOU = [ADSI] "LDAP://CN=Users,DC=domain,DC=local"

and then again using the "psbase.Get_children()"

$usersOU.psbase.Get_children()

This will list all the AD objects (users and computers) in the OU.

Lets finish off by creating a user.

PS C:\> $newUser = $usersOU.Create("user","cn=MyNewUser")
PS C:\> $newUser.put("title", "PowerShell Test Account")
PS C:\> $newUser.put("employeeID", 123)
PS C:\> $newUser.put("description", "Test User Account for LazyAdmin Demo")
PS C:\> $newUser.SetInfo()

Now If you enter this into your command prompt you may get an access denied error:

This is

...
Click to continue reading "Create an AD user in PowerShell"

Written by daniel.nerenberg on May 14th, 2007 with no comments.
Read more articles on PowerShell.

PowerShell DIY commands (using functions)

As you might have guessed I'm a lazy admin :) Now being a lazy admin doesn't mean I sit around pondering whether captain Kirk is better than Captain Picard, and all the while, hope somebody is taking care of what I'm supposed to be doing. It means I work smarter not harder. Yes I know 2 clichés in the same paragraph. And everyone knows Picard is totally the best Captain.

So the point of all this is PowerShell has this awesome feature for creating functions. What is a function? Well for those who don't have a programming/developers background, a function is a chunk of code that performs an easily reusable set of instructions.

To draw an analogy, a car has many parts. Each part performs a specific function. If we were to lump every function of every part of a car into one giant part it would be much harder to design. It would also be harder to fix, and much more expensive to replace.

When programmers code applications they use the same idea. If they write up some code that does one thing very well. For instance format a string of text; they will often put this generic code

...
Click to continue reading "PowerShell DIY commands (using functions)"

Written by daniel.nerenberg on May 9th, 2007 with no comments.
Read more articles on PowerShell.