(imported comment written by SystemAdmin)
This BES task/file/xml can be used to distribute the Powershell 2.0 installer onto potential computers.
The overall relevance determines if the end client is the proper version of windows and doesn’t already have powershell 2.0 installed.
NOTE: You’ll need to download and publish the 5 different installer packages within your environment for this to work… They can be downloaded from Microsoft at: http://support.microsoft.com/kb/968929
<?xml version="1.0" encoding="UTF-8"?>
Software Distribution - Deploy: Powershell 2.0
<![CDATA[
This task will deploy: Powershell 2.0.
This task is applicable on:
- Windows XP x86 (5.84 MB)
- Windows 2003 (5.98 MB)
- Windows 2003 x64 (9.82 MB)
- Windows Vista, Windows 2008 and Windows 7 for x86 (32.4 MB)
- Windows Vista, Windows 2008 and Windows 7 for x64 (34.1 MB)
]]>
(if exists value “PowerShellVersion” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine” of registry then not (value “PowerShellVersion” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine” of registry as string = “2.0”) else true) AND ((name of it = “WinXP”) of operating system OR ((name of it = “Win2003” AND x64 of it)) of operating system OR ((name of it = “Win2003” AND x64 of it)) of operating system OR ((name of it = “WinVista” AND product type of it = nt workstation product type AND NOT x64 of it) OR ((name of it = “Win2008” or (name of it = “WinVista” and product type of it != nt workstation product type)) AND NOT x64 of it) OR (name of it = “Win7” AND NOT x64 of it)) of operating system OR ((name of it = “WinVista” AND product type of it = nt workstation product type AND x64 of it) OR ((name of it = “Win2008” or (name of it = “WinVista” and product type of it != nt workstation product type)) AND x64 of it) OR (name of it = “Win7” AND x64 of it) OR name of it = “Win2008R2”) of operating system)
Software Distribution
35005000
Daniel Moran
2010-09-20
Click
here
to initiate the deployment process.
//Windows XP x86
if {(name of it = “WinXP”) of operating system}
download http://
your bigfix server
:52311/Uploads/f570b0ae98ca82ae0291a95ed37f251172ddad2e/WindowsXP-KB968930-x86-ENGexe.tmp
continue if {(size of it = 6131769 AND sha1 of it = “f570b0ae98ca82ae0291a95ed37f251172ddad2e”) of file “WindowsXP-KB968930-x86-ENGexe.tmp” of folder “__Download”}
extract WindowsXP-KB968930-x86-ENGexe.tmp
wait __Download\WindowsXP-KB968930-x86-ENG.exe /quiet /norestart
//Windows 2003
elseif {((name of it = “Win2003” AND x64 of it)) of operating system}
download http://
your bigfix server
:52311/Uploads/2dc6ab1af77c6de43968b7cf9bcdd91ffc5869aa/WindowsServer2003-KB968930-x86-ENGexe.tmp
continue if {(size of it = 6300960 AND sha1 of it = “2dc6ab1af77c6de43968b7cf9bcdd91ffc5869aa”) of file “WindowsServer2003-KB968930-x86-ENGexe.tmp” of folder “__Download”}
extract WindowsServer2003-KB968930-x86-ENGexe.tmp
wait __Download\WindowsServer2003-KB968930-x86-ENG.exe /quiet /norestart
//Windows 2003 x64
elseif {((name of it = “Win2003” AND x64 of it)) of operating system}
download http://
your bigfix server
:52311/Uploads/c8e2e321066129ad98e35cdd9533cf3c369ecc36/WindowsServer2003-KB968930-x64-ENGexe.tmp
continue if {(size of it = 10303885 AND sha1 of it = “c8e2e321066129ad98e35cdd9533cf3c369ecc36”) of file “WindowsServer2003-KB968930-x64-ENGexe.tmp” of folder “__Download”}
extract WindowsServer2003-KB968930-x64-ENGexe.tmp
wait __Download\WindowsServer2003-KB968930-x64-ENG.exe /quiet /norestart
//Windows Vista, Windows 2008 and Windows 7
elseif {((name of it = “WinVista” AND product type of it = nt workstation product type AND NOT x64 of it) OR ((name of it = “Win2008” or (name of it = “WinVista” and product type of it != nt workstation product type)) AND NOT x64 of it) OR (name of it = “Win7” AND NOT x64 of it)) of operating system}
download http://
your bigfix server
:52311/Uploads/df85aac21acb17202b6882e4bc883e10adf0433e/Windows60-KB968930-x86msu.tmp
continue if {(size of it = 33996919 AND sha1 of it = “df85aac21acb17202b6882e4bc883e10adf0433e”) of file “Windows60-KB968930-x86msu.tmp” of folder “__Download”}
extract Windows60-KB968930-x86msu.tmp
wait __Download\Windows6.0-KB968930-x86.msu /quiet /norestart
//Windows Vista x64, Windows 2008 x64, Windows 7 x64, or Windows 2008r2
elseif {((name of it = “WinVista” AND product type of it = nt workstation product type AND x64 of it) OR ((name of it = “Win2008” or (name of it = “WinVista” and product type of it != nt workstation product type)) AND x64 of it) OR (name of it = “Win7” AND x64 of it) OR name of it = “Win2008R2”) of operating system}
download http://
your bigfix server
:52311/Uploads/da3b397e96aafce3ed12729fd6bb3e27da4722c2/Windows60-KB968930-x64msu.tmp
continue if {(size of it = 35844968 AND sha1 of it = “da3b397e96aafce3ed12729fd6bb3e27da4722c2”) of file “Windows60-KB968930-x64msu.tmp” of folder “__Download”}
extract Windows60-KB968930-x64msu.tmp
wait __Download\Windows6.0-KB968930-x64.msu /quiet /norestart
endif
//now configure for remote use
regset "
http://HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell
" “ExecutionPolicy”=“Unrestricted”