Posts Tagged ‘deploy’

Download from

Intune : 

RapportSetup-Full_x64.exe /s /p NOICONS=true NOBROWSER=true ACCEPTLICENSE=TRUE

GPO Powershell Computer Startup Script : 

If(!(Test-Path -path "C:\Program Files (x86)\Trusteer\Rapport\Console.ico"))

 cd "\\local\to\installer\GroupPolicy\Trustee"
.\RapportSetup-Full_x64.exe /s /p NOICONS=true NOBROWSER=true ACCEPTLICENSE=TRUE

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Script 1

#Get Active Directory information for current user

$UserName = $env:username

$Filter = “(&(objectCategory=User)(samAccountName=$UserName))”

$Searcher = New-Object System.DirectoryServices.DirectorySearcher

$Searcher.Filter = $Filter

$ADUserPath = $Searcher.FindOne()

$ADUser = $ADUserPath.GetDirectoryEntry()

$ADDisplayName = $

$ADTitle = $ADUser.title

$ADOffice = $ADUser.physicalDeliveryOfficeName

$script:ADMobileNumber = $

$ADTelePhoneNumber = $ADUser.telephoneNumber

$ADExtension1 = $ADUser.extensionAttribute1

$ADExtension2 = $ADUser.extensionAttribute2

$ADExtension3 = $ADUser.extensionAttribute3


#Additional Variables

$AppData=(Get-Item env:appdata).value

$SigPath = ‘\Microsoft\Signatures’

$LocalSignaturePath = $AppData+$SigPath

$SignatureName = '%signaturename%'

$DomainName = '%domainname%'

$fulladdetails = $ADDisplayName+$ADExtension1+$ADTitle+$ADOffice+$script:ADMobileNumber+$ADTelePhoneNumber


#Check if signature directory exists and, if not, update it

If (Test-Path $LocalSignaturePath)



{New-Item $LocalSignaturePath -type directory}


Write-host $fulladdetails


#Check if  Signature has changed

If ("$fulladdetails" -eq "$SigChkDetails")

{ Exit }


{  }


#Delete old signature files

Remove-Item "$LocalSignaturePath\$ADDisplayName.htm" -Recurse -Force


#Copy over signature template

$SigSource = “\\path\to\signature\source"

$filename = "\\path\to\signature\template.htm"

$filename2 = "\\path\to\logo.jpg"


Copy-Item $filename $LocalSignaturePath -Recurse -Force

Copy-Item $filename2 $LocalSignaturePath -Recurse -Force

#Modify Signature and Insert Variables

(Get-Content $LocalSignaturePath\template.htm) -replace 'FullName', $ADDisplayName | Set-Content $LocalSignaturePath\template.htm

(Get-Content $LocalSignaturePath\template.htm) -replace 'PositionTitle', $ADTitle | Set-Content $LocalSignaturePath\template.htm

(Get-Content $LocalSignaturePath\template.htm) -replace 'PhoneNumber', $ADTelePhoneNumber | Set-Content $LocalSignaturePath\template.htm


If(!$script:ADMobileNumber -or !$ADExtension2){

(Get-Content $LocalSignaturePath\template.htm) -replace '<b>M</b> MobileNumber', $NULL | Set-Content $LocalSignaturePath\template.htm}


{(Get-Content $LocalSignaturePath\template.htm) -replace 'MobileNumber', $script:ADMobileNumber | Set-Content $LocalSignaturePath\template.htm}



(Get-Content $LocalSignaturePath\template.htm) -replace ', Qualification', $NULL | Set-Content $LocalSignaturePath\template.htm}


{(Get-Content $LocalSignaturePath\template.htm) -replace 'Qualification', $ADExtension1 | Set-Content $LocalSignaturePath\template.htm}


If($ADOffice -ne 'Singapore'){


(Get-Content $LocalSignaturePath\template.htm) -replace 'ImageRow', '<img src="./logo.jpg" width="259" height="74" border="0" />' | Set-Content $LocalSignaturePath\template.htm}


{(Get-Content $LocalSignaturePath\template.htm) -replace 'ImageRow', $null | Set-Content $LocalSignaturePath\template.htm}


Rename-Item -Path $LocalSignaturePath\template.htm -NewName "$ADDisplayName.htm"


#Set company signature as default for New messages

[Void] [Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Interop.Word")

$MSWord = New-Object -com word.application

$EmailOptions = $MSWord.EmailOptions

$EmailSignature = $EmailOptions.EmailSignature

$EmailSignatureEntries = $EmailSignature.EmailSignatureEntries




#Set company signature as default for Reply messages

[Void] [Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Interop.Word")

$MSWord = New-Object -com word.application

$EmailOptions = $MSWord.EmailOptions

$EmailSignature = $EmailOptions.EmailSignature

$EmailSignatureEntries = $EmailSignature.EmailSignatureEntries




Script 2


Script 3

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Extract the ISO to a folder and run from the root folder

setup.exe /admin

to open this

Go through all the options especially above for the CD Key information and accepting License and Display Level None

Once this is done , Save this as an MSP file with any name in the UPDATES folder of the CD ( The installer runs all the MSP’s in here ) 


Next create a config.xml file in the same directory as setup.exe with the below config

<Configuration Product="PrjPror">
<!-- <Display Level="full" CompletionNotice="yes" SuppressModal="no" AcceptEula="no" /> -->
<!-- <Logging Type="standard" Path="%temp%" Template="Microsoft Office Project Professional Setup(*).txt" /> -->
<!-- <USERNAME Value="Customer" /> -->
<!-- <COMPANYNAME Value="MyCompany" /> -->
<!-- <INSTALLLOCATION Value="%programfiles%\Microsoft Office" /> -->
<!-- <LIS CACHEACTION="CacheOnly" /> -->
<!-- <LIS SOURCELIST="\\server1\share\Office;\\server2\share\Office" /> -->
<!-- <DistributionPoint Location="\\server\share\Office" /> -->
<!-- <OptionState Id="OptionID" State="absent" Children="force" /> -->
<!-- <Setting Id="SETUP_REBOOT" Value="IfNeeded" /> -->
<!-- <Command Path="%windir%\system32\msiexec.exe" Args="/i \\server\share\my.msi" QuietArg="/q" ChainPosition="after" Execute="install" /> -->
<Display Level="None" CompletionNotice="No" SuppressModal="No" AcceptEula="Yes" />
<Setting Id="SETUP_REBOOT" Value="Never" />
< /Configuration>


Next use IntuneWinAppUtil.exe to package the App Up

Please specify the source folder: “F:\Project2010\”
Please specify the setup file: setup.exe
Please specify the output folder: C:\TempPath\Project2010


Intune Settings

Install Command : setup.exe /config config.xml

Unintall Command : Setup.exe /uninstall 90140000-00B4-0409-0000-0000000FF1CE

Detection Rule  ( Check File ) : C:\Program Files (x86)\Microsoft Office\Office14\WINPROJ.EXE

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Recently a Webroot Bug :  and Had caused Netlogon service to not start on some machines which stops group policy running. We needed to deploy the following which ran a script when it detected netlogon stopped : 

SCHTASKS /Create  /TN “System_NETLOGON_5820” /TR c:\Scripts\netstartnetlogon.cmd /SC ONEVENT /RL Highest /RU SYSTEM /EC SYSTEM /MO “*[System[Provider[@Name=’NETLOGON’] and EventID=5820]]” /F

With netstartnetlogon.cmd stored on the local machine in C:\Scripts\containing “net start netlogon”

You can deploy a schedule task remotelty using : 

SCHTASKS /Create /s %machinename%  /TN “System_NETLOGON_5820” /TR c:\Scripts\netstartnetlogon.cmd /SC ONEVENT /RL Highest /RU SYSTEM /EC SYSTEM /MO “*[System[Provider[@Name=’NETLOGON’] and EventID=5820]]” /F

Then Run it remotely using 

SCHTASKS /run /s %machinename%  /TN “System_NETLOGON_5820”

However it seemed a long method to go through all the machines with this. I used BatchPatch to deploy the netstartnetlogon.cmd files into the Folder on each machine , then used the Deploy Software/Patch/Script/Regkey to deploy and run the file : 


Which containned : 

SCHTASKS /Create /TN “System_NETLOGON_5820” /TR c:\Scripts\netstartnetlogon.cmd /SC ONEVENT /RL Highest /RU SYSTEM /EC SYSTEM /MO “*[System[Provider[@Name=’NETLOGON’] and EventID=5820]]” /F
SCHTASKS /Run /TN “System_NETLOGON_5820”

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)