Weblog.BassQ.nl

Tag: Powershell

PowerShell 2.0 Is Available For Download (XP and Windows 2003 Also!)

by BassQ on Nov.09, 2009, under Microsoft, Windows 7, Windows Server, Windows XP

Following quickly on the heels of the Windows 7 and Windows Server 2008 R2 launches (they have PowerShell 2.0 built in), Microsoft has released version 2.0 for all flavors of Windows since XP:

Windows Management Framework, which includes Windows PowerShell 2.0, WinRM 2.0, and BITS 4.0, was officially released to the world this morning. By providing a consistent management interface across the various flavors of Windows, we are making our platform that much more attractive to deploy. IT Professionals can now easily manage their Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2 machines through PowerShell remoting – that’s a huge win!

PowerShell v2 has finally been released for ‘legacy’ OSes (Windows XP, Windows Server 2003, Windows Vista and Windows Server 2008)! I’m saying legacy OSes because the latest OSes are Windows 7 and Windows Server 2008 R2. You could also say the out-of-band releases have been released. This happened somewhere in the end of October 2009.

If you are having a hard time finding those, that’s because it is in included in the Windows Management Framework.

The Windows Management Framework includes:

  • Windows Remote Management (WinRM) v2.0
  • Windows PowerShell v2.0
  • Background Intelligent Transfer Service (BITS) v4.0

Read more about it here.

Windows Management Framework Core (WinRM 2.0 and Windows PowerShell 2.0)

Windows Management Framework BITS (BITS 4.0)

Comments Off :, , , more...

Windows Server Update Services 3.0 SP2 released!

by BassQ on Aug.28, 2009, under Microsoft, Windows 7, Windows Server, Windows XP

Windows Server Update Services 3.0 Service Pack 2 (WSUS 3.0 SP2) delivers updates to corporate environments from Microsoft Update. This release adds new features and fixes issues found since the release of the product.

WSUS 3.0 SP2 delivers important customer-requested management, stability, and performance improvements. Some of the features and improvements include the following:

  • Integration with Windows Server 2008 R2.
  • Support for the BranchCache feature in Windows Server 2008 R2.
  • Support for Windows 7 and Windows Server 2008 R2 clients.
  • Compliance Report
  • Windows Update Agent (WUA) offers a collection of performance enhancements, user experience improvements, and bug fixes software updates.

WSUS 3.0 SP2 can be installed alone, or as an upgrade of WSUS 3.0 SP1.
This package installs both the WSUS 3.0 SP2 Server, WSUS 3.0 SP2 Administration Console components and WUA client for down-level operating system. You must install the server components on a computer that is running on Windows Server 2003 SP2 or later versions. You may install the Administration Console on a remote computer that is running one of the supported operating systems, see below the Supported Operating Systems section.
WSUS 3.0 SP2 Server Installation on Windows Small Business Server 2003
If you are installing the WSUS 3.0 SP2 product on Windows Small Business Server 2003, follow the instructions in Installing Windows Server Update Services 3.0 on Windows Small Business Server 2003.

Download Here: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=a206ae20-2695-436c-9578-3403a7d46e40#tm

Comments Off :, , , , , more...

Great Microsoft Virtualization Free E-Book

by BassQ on Aug.21, 2009, under Microsoft, Windows 7, Windows Server, Windows XP

understanding-microsoft-virtualization-solutionsToday I have another great ebook to share with you. If you are interested in Microsoft virtualization solutions, then book “Understanding Microsoft Virtualization solutions” will be great resource for you. It is available as a free pdf download, and it covers Windows Server 2008 Hyper-V, System Center Virtual Machine Manager 2008, Microsoft Application Virtualization 4.5, Microsoft Enterprise Desktop Virtualization, and Microsoft Virtual Desktop Infrastructure. It’s been written by Mitch Tulloch with the Microsoft Virtualization team, it’s been published by Microsoft Press, it has 431 pages and it is available as FREE DOWNLOAD.

Download “Understanding Microsoft Virtualization solutions – from the Desktop to the Datacenter” free pdf ebook

Original article: Microsoft Press – Microsoft Virtualization Solutions Free E-Book by Brian Johnson

Comments Off :, , , , , , more...

RSAT for Windows 7 RTM is available for download

by BassQ on Aug.14, 2009, under Microsoft, Windows 7, Windows Server

The Remote Server Administration Tools (RSAT) for Windows 7 RTM have been released to microsoft.com. These include the Hyper-V tools for remote management of Windows Server 2008 R2 and Microsoft Hyper-V Server 2008 R2.

Once you install the update, you can enable one or more of the following tools from the Control Panel under Programs, Turn Windows features on or off.

Download Here : http://www.microsoft.com/downloads/details.aspx?FamilyID=7d2f6ad7-656b-4313-a005-4e344e43997d&displaylang=en

Comments Off :, , , , more...


PowerGUI 1.7

by BassQ on Mar.06, 2009, under Weblog


The key new scenario which we wanted to support was creating custom PowerGUI-based consoles : branding them, locking them down, distributing to administrators (e.g. helpdesk), and then having automatically updated whenever you make changes to the central configuration.

The main pieces of this scenario were:

1.  Lockdown mode: this allows you to disable and/or hide any functionality in the PowerGUI admin console. Simply open the file quest.powergui.Lockdown.xml in PowerGUI profile folder (%appdata%\Quest Software\PowerGUI ). You can just replace all true with false (in that case users won’t even be able to click an action or change order of columns), or be more granular.

2.  Central configuration update: Redirections.xml from PowerGUI profile folder lets you make PowerGUI pull its configuration and/or lockdown information from another location (e.g. file share). PowerGUI also checks for the configuration version, which lets you force the UI update whenever you change anything in your custom console.

3.  Ability to change the welcome page to something more meaningful for your organization.

And then there are multiple smaller changes:

4.  Multiline comments for PowerShell v2 (<# #> ).

5.  Icons in the grid and dynamic nodes.

6.  Multiple bugfixes based on reports we got from our community forum s. We’ll hopefully follow-up on all of them next week.
Download PowerGUI here: http://powergui.org/downloads.jspa

Comments Off :, more...

Powershell and Active Directory

by BassQ on Feb.02, 2009, under Weblog

PowerShell After some research and reading various websites about how to control Active Directory with Powershell, I finally found what I needed. A lot of articles about this topic immediately start using all kinds of cmdlets developed by several parties, especially the one by Quest. But I wanted to do this stuff without needing any extra libraries/cmdlets. The script shown in this article does a search in the Active Directory for a user object given the SAM account name. It then shows some of the attributes of that user. The third part of the script changes some of the attributes and writes the changes back to Active Directory. And finally it moves the object to a new Organisational Unit (OU). All this with native Powershell.

Summary of techniques applied in the Powershell script:

  • search Active Directory objects
  • show Active Directory object attributes
  • update Active Directory object attributes
  • move an Active Directory object to a specified Organisational Unit (OU)
  • set the ‘user must change password at next logon’ flag
  • set a password on a Active Directory user object
  • vclear the ‘disabled user account’ flag

  • set the terminal services profile path (Changing the Terminal Server profile path requires the powershell script to run on a server because the call requires some DLLs that are only installed on servers)

Disclaimer: The powershell scripts shown in this article have only been tested on Windows Server 2008 and Windows Vista.

function searchUserSam($userID)
{
$root = [ADSI]”
$searcher = new-object System.DirectoryServices.DirectorySearcher($root)
$searcher.filter = "(&(objectClass=user)(sAMAccountName= $userID))"
$object = $searcher.findall()
if ($object.count -eq 0) {
return 0
} else {
return $object[0]
}
}

$Name = $args[0]
$objUser = searchUserSam $Name
([string]($objUser.Properties.adspath))
$userObject = [ADSI]([string]($objUser.Properties.adspath))

#show the current user values
"name:"+$userObject.name
"samaccountname:"+$userObject.samaccountname
"extensionattribute8:"+$userObject.extensionattribute8
"userPrincipalName:"+$userObject.userprincipalname
"cn:"+$userObject.cn
"useraccountcontrol:"+$userObject.useraccountcontrol
"profilePath:"+$userObject.profilepath
"scriptPath:"+$userObject.scriptpath
# This terminal server specific InvokeGet method only works on Server 2008, not on Vista!
"terminalservicesprofilepath:"+$userObject.PSBase.InvokeGet(‘terminalservicesprofilepath’)

# set userPrincipalName to X account and add the ‘@foo.bar’ extension
$userObject.userprincipalname = ($userID + "@foor.bar")

# clear the ‘disabled user account’ flag
$userObject.psbase.InvokeSet(‘accountdisabled’,$true)

# set the profile path
$userObject.profilepath = "\\"+$domainFQDN+"\data\"+$environment+"\Users\"+$UserID+"\Profiles\Desktop"

# set the terminal services profile path
$userObject.PSBase.InvokeSet(‘terminalservicesprofilepath’, "\\"+$domainFQDN+"\data\"+$environment+"\Users\"+$UserID+"\Profiles\%FarmName%")

# set the login script
$userObject.scriptPath = "Login.cmd"

# set a new password for the account
$userObject.psbase.Invoke("SetPassword", "Whatever1")

# set the ‘user must change password at next logon’ flag
$userObject.pwdLastSet = 0

# write all updates to the user object in Active Directory
$userObject.setinfo()

# Move the user object to the ‘Standard Users’ OU
$userObject.PSBase.MoveTo("LDAP://OU=Business Users,OU=Production,DC=foo,DC=bar")

Comments Off : more...

Terminal Server & Citrix CMD Line Utilities

by BassQ on Dec.25, 2008, under Weblog

Terminal Services CMD Line Utilities:

Command Function
change logon Temporarily disable logons to a terminal server.
change port Changes COM port mappings for MS-DOS program compatibility.
change user Changes the .ini file mapping for the current user.
cprofile Removes user-specific file associations from a user’s profile.
flattemp Enables or disables flat temporary directories.
logoff Ends a clients session.
msg Sends a message to one or more clients.
mstsc Runs Remote Desktop Connection.
query process Displays information about processes.
query session Displays information about Terminal Services sessions.
query termserver Lists Terminal Services servers on the network.
query user Displays information about users logged on to the system.
register Registers a program so that it has special execution characteristics.
reset session Allows you to reset (delete) a session from the terminal server.
shadow Allows you to monitor or remotely control an active session of another user.
tscon Connects to another existing Terminal Services session.
tsdiscon Disconnects a client from a Terminal Services session.
tskill Terminates a process.
tsprof Copies user configuration and changes profile path.
tsshutdn Shuts down a Terminal Services server.

Citrix CMD Line Utilities:

Command Function
acrcfg Configure autoreconnect settings
altaddr Specify server alternate IP address
app Run application execution shell
apputil Add servers to Configured Servers list for published applications (FR3 Only)
auditlog Generate server logon/logoff reports
change client Change ICA Client device mapping
chfarm Change the server farm membership of the server
clicense Maintain MetaFrame XP licenses
cltprint Set the number of ICA Client printer pipes
ctxxmlss Change the XML Service port number
driveremap Remap the server’s drive letters
dscheck Validate the server farm’s data store’s integrity
dsmaint Configure the server farm’s data store
icaport Configure TCP/IP port number
imaport Change IMA ports
migratetomsde Migrate the server farm’s data store from a Microsoft Access database to an MSDE database (FR3)
mlicense Add multiple MetaFrame licenses to the server farm’s data store
query View information about server farms, processes, servers, ICA sessions, and users
tskill Ends a process.
twconfig Configure ICA display settings
querydc Use this utility to determine the data collector for a given zone
queryds Command-line utility is provided to query the current information on the local zone data collector.
queryhr Use this utility to display information about member servers in the farm.
qprinter
msghook Execute msghook only if information is requested by a Citrix Technical Support
Comments Off :, , , more...

Windows PowerShell – excellent screencast

by BassQ on Sep.08, 2008, under Weblog

Jeff Alexander is perfecting the art of screencasting and his latest adventure with Windows PowerShell is certainly well worth watching. He stole my intro but it’s all good matey. I think in return he needs to tell us where he snagged that cool spinning globe on his desktop.

So what is PowerShell you ask?

I would imagine a lot of you have at least heard of PowerShell. If you aren’t a developer you’ve probably steered clear of it simply because it looks like complex code. Fear not, it isn’t that complex. Here’s the description from microsoft.com:

Microsoft Windows PowerShell command line shell and scripting language helps IT professionals achieve greater control and productivity. Using a new admin-focused scripting language, more than 130 standard command line tools, and consistent syntax and utilities, Windows PowerShell allows IT professionals to more easily control system administration and accelerate automation. Windows PowerShell is easy to adopt, learn, and use, because it works with your existing IT infrastructure and existing script investments, and because it runs on Windows XP, Windows Vista, and Windows Server 2003. Windows PowerShell is now included as part of Windows Server 2008. Exchange Server 2007, System Center Operations Manager 2007, System Center Data Protection Manager V2, and System Center Virtual Machine Manager also leverage Windows PowerShell to improve administrator control, efficiency, and productivity.

Here’s the 20 minute screencast video Jeff created. Jeff demonstrates some really cool tools so stick with him through the entire video. Double click the small window below while playing and it will go full screen. If you want to download the video and watch it offline, right mouse click this link and SAVE AS to your local disk.

For more information on PowerShell, see the website at http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx.

See the TechNet Script Center at http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx.

Get PowerShell version 2 (CTP) @ http://www.microsoft.com/downloads/details.aspx?FamilyId=7C8051C2-9BFC-4C81-859D-0864979FA403&displaylang=en.

Original Post Here:
http://blogs.technet.com/keithcombs/archive/2008/07/22/windows-powershell-excellent-screencast-now-available.aspx

Comments Off : more...

PowerGUI 1.5.1 RTMs

by BassQ on Aug.06, 2008, under Weblog

Thay have just posted the newest release of PowerGUI – version 1.5.1 – to the web. As you might guess, it got better, with most of the bugs thay got reported on the community forums fixed , and most feature requests implemented. ;)

A more complete version of what’s new can be found on our version history page .

Both components got:

  • VMware Infrastructure Client integration
  • Support for roaming profiles, as well as Citrix/TS deployments
  • Easier UI localization switch right from the GUI
  • STA mode support

The highlights for the IDE include:

  • Online search for PowerShell scripts
  • Support for multiple runspaces
  • Intellisense now supporting NoteProperties, env:, and function drive
  • Support for signed scripts

Admin console got a lot of improvements for making your powerpacks easier to create and use:

  • Ability to select which parameters get prompted
  • Support for $host.ui.prompt and $host.ui.promptforchoice so you can easily create dialog boxes of your own
  • Updated default PowerPacks
  • Column selection now associated with data type and thus consistent and working for dynamic nodes

Again, the what’s new page has some details and we are out there at the forums waiting for your feedback.

Go ahead and download the latest build ! (Or wait another week or so till we turn the automated upgrade)

Comments Off : more...

Scripts for working with Powershell

by BassQ on Jul.14, 2008, under Weblog

Try the Script Center Script Repository;

The Script Repository categorizes sample scripts designed to run on Windows 2000, Windows XP, and Windows Server 2003.

Most of the scripts on this this page were written using VBScript.
New to scripting at all? Take a look at the Getting Started page to learn more about how these scripts work and how to write your own scripts.

Active Directory
Applications
Compute Cluster Server
Configuration Manager
Data Protection Manager 2007
Desktop Management
Group Policy
Hardware
Internet Information Server (IIS)
Logs
Messaging and Communication
Microsoft Office
Networking
Operating System
Operations Manager
Other Directory Services
Printing
Scripting Techniques
Security
Service Packs and Hot Fixes
Services for Unix
Shadow Copy
SMS 2003
SQL Server
Storage
Terminal Server
Virtual Server
Windows Update

Comments Off : more...

PowerShell Scriptomatic

by BassQ on Jun.04, 2008, under Weblog

Ed Wilson has created a Scriptomatic PowerShell Version, which you can download here.

This Scriptomatic writes Windows PowerShell scripts that harness the power of WMI (Windows Instrumentation Management) for use in system management and administration.

image

It really has some nice features, like output options. Check it out!

Comments Off : more...

Sysinternals tools are now available via a Live service

by BassQ on Jun.04, 2008, under Weblog

Source: Doug Finke and Marc van Orsouw

The Sysinternals tools are now accessible using a direct UNC link ( \\live.sysinternals.com\Tools\ ), so if your in need of a Sysinternals tool and you have an internet connection you can just type :

CD  \\live.sysinternals.com\Tools\

And all the tools are at your disposal :

image

If you added a new function to my $profile just like Doug.

function sysinternals {CD  \\live.sysinternals.com\Tools\}

How cool is this? You can just run Procmon on every machine with an internet connection without having to install the program!! Great for troubleshooting…

Comments Off : more...

Free PowerShell+

by BassQ on Dec.26, 2007, under Weblog

I already blogged about PowerShell+ But now PowerShell+ is free for non-commercial use effective now, and it will continue to be free, no ties attached. Just grab your copy at http://www.powershell.com/downloads/psp1.zip and join the fun!

Comments Off : more...


Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!