With the SCCM 2007 R2 release Microsoft delivers a VBScript to import and manage App-V applications. Because the limitations I wrote the import part in Powershell. The following script is only to import an App-V application and does not create a Collection or Advertisement.
To import an App-V application the following parameters are required.
$App = The App-V sequence name based on the directory name.
$Site = SCCM Site
$smsShare = The share of the SCCM server to copy the application to.
$AppShare = The share where the application is located.
$SCCMServer = SCCM Server Name.
Param($App, $Build, $Site, $smsShare, $AppShare, $SCCMServer)
The following function is to add the icon in SCCM.
Function Icon-Handeling
{
param($Icon)
$Obj = New-Object -ComObject ADODB.Stream
$Obj.Open()
$Obj.Type = 1
$Obj.LoadFromFile("$Icon")
Set-Variable -Name IconData -Value $Obj.Read() -Scope 2
}
Continue reading →