posted 17/02/10

Automatic Bios update with PowerShell

By Fredrik Wall

I currently working with clients in an environment

without any system that will update computers

Bios automatically.

So I have started to write a PowerShell script for this.

image

It uses Windows Forms for the output and WMI for

the information gathering.

This script is very similar to Dells VBScript for Bios Upgrades.

That script can be found here.

 

My script will check for current version on the computer and
then check in a file structure for the right bios upgrade version
and If It needs to be upgraded It will run the upgrade file.

My file structure is very simple and It’s located on a file share.

image 

image 

image 

The bios upgrade files for Dell computers can be found

at ftp.dell.com/bios

The script is in a alpha or Beta phase, but If you are interested

in It you can mail me, DM me on Twitter or send me a message at

messenger.

 

Technorati Tags: ,,,

1 Comment
read more
posted 28/01/10

PowerShell + Login Script

By Fredrik Wall

Working with a login script for my lab active directory.
100% PowerShell using .NET classes and WMI.

This is VBScript login scripts with HTA on steroids :)

image 

image 

The GUI part was done in 10-15 min with Primal Forms.

3 Comments
read more
posted 03/01/10

Get-ClientSiteName

By Fredrik Wall

This is another function that I use in
Active Directory scripting.

image

I use it when I want to create computer names
with the syntax SitenameComputertypeNumbers.

image 

The function can be found here.

 

2 Comments
read more
posted 03/01/10

Get-ComputerType

By Fredrik Wall

I’m working on lots of Active Directory functions at the moment.
For a larger Active Directory script.

And one of the functions will get the computer type in clear text.

image

What does this have to do with Active Directory management do
ask your self right now :)

Lots of, do I say!

If you need your computers to be named like sitenamecomputertype0001
then this function will do a lot for you.

image

Just do like this:

 $compType = Get-ComputerType -computerName $computerName
 $compType = $compType.substring(0,1)
And you got an D a M or a W.
 
The function can be found here.
 
1 Comment
read more
posted 29/12/09

Shutdown-Computer

By Fredrik Wall

I have made a function for my friend Anders Bengtsson
that will do a Shutdown, Reboot or Log Off.

The function uses Win32Shutdown in the WMI object Win32_Operatingsystem.

 image

Example:
Shutdown-Computer mysrv01 ‘Log Off’

or

Shutdown-Computer mysrv01 ‘Log Off’ other

The other option will open a credential form and then uses your input for credential.

image

The script can be found here.

 

2 Comments
read more
posted 05/08/09

How to get MAC Addresses from remote computers

By Fredrik Wall

When working with installation systems or other Network systems
you often need your users MAC Address.

You can ask the users to start cmd.exe and then do a ipconfig.exe /all.
If you have 100-5000 users this can be a whole year of work :)

Or you can open up powershell and use this little script:


 
$strComputer = "."

$colItems = get-wmiobject -class "Win32_NetworkAdapterConfiguration" -computername $strComputer |Where{$_.IpEnabled -Match "True"}

foreach ($objItem in $colItems) {

$objItem |select Description,MACAddress

}

Combine this script with a Active Directory script that will show all of your

computers and then Export it to a csv file and you have a good import file!

 

3 Comments
read more
posted 27/02/09

Using win32_operatingsystem (WMI) to get OS information

By Fredrik Wall

I have made a little screencast without sound that shows how easy It is to get information about the Operating System by using WMI.

image

Get more information at:

win32_operatingsystem class information
http://msdn.microsoft.com/en-us/library/aa394239.aspx

Andra (Bloggar.se) skriver om: , , , ,
No Comments
read more
posted 27/02/09

Display the Operating system version (as a function)

By Fredrik Wall

Almost the same as the last post. But this time we have It as a function.

image

Technorati-taggar: ,

Andra (Bloggar.se) skriver om: ,
No Comments
read more