Skype for Business Generic Profile Config

From Michael's Information Zone
Revision as of 16:06, 8 August 2017 by Michael.mast (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

With the need to create computers dedicated to Skype conferences, and the fact Skype doesn't work well in Linux, I decided to see what I could do to put it all together.

First things first, what if you have an conference account without providing an email account?

sched.lync.com

Will allow you to log in and create scheduled meetings. The nice thing about this is you can set the meeting far into the future, and the link created is good for as many meetings as you want to host.

Next we need to have an account that auto logs in.

netplwiz

Next we need to clean up the account. Nothing fancy is needed, but we don't want left over files or cached data taking up space (some of these systems might be low end Windows 10 boxes with 32GB of storage). [1]Here we want to prepare Windows cleanup for removing as much data as possible. Running cleanmgr.exe /sageset:n (any number will work) will open a dialog box and allow us to set the cleanup options. After making your selection close out the window and run cleanmgr.exe /sagerun:n (the same number from before). This will confirm we are setup correctly.

Now we want to run a script at startup. Technically this does not need to be a powershell script. Originally going to use more advanced steps but decided to keep things simple. That said this is NOT the ideal method, instead you should just use batch scripts. For running daily, create powershell script cleanup.ps1

logoff 1
rm -Force -Recurse C:\Users\publicuser\Desktop\*
rm -Force -Recurse C:\Users\publicuser\Documents\*
rm -Force -Recurse C:\Users\publicuser\Downloads\*
rm -Force -Recurse C:\Users\publicuser\Music\*
rm -Force -Recurse C:\Users\publicuser\Pictures\*
rm -Force -Recurse C:\Users\publicuser\Videos\*
rm -Force -Recurse C:\Users\publicuser\AppData\Local\Google\Chrome\"User Data"\*
rm -Force -Recurse C:\Users\publicuser\AppData\Local\Mozilla\Firefox\Profiles\*
#taskkill.exe /F /IM iexplore.exe /T
#RunDll32.exe InetCpl.cpl,ResetIEtoDefaults
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351
cleanmgr.exe "/sagerun:6500"
Write-Host "Waiting five minutes for cleanup to finish..."
start-sleep -s 300
shutdown /r /t 0
  • Set daily script to run. I like running after possible Windows updates get applied. So early morning.
  • Create powershell script cleanup2.sh
rm -Force -Recurse C:\Users\publicuser\Desktop\*
rm -Force -Recurse C:\Users\publicuser\Documents\*
rm -Force -Recurse C:\Users\publicuser\Downloads\*
rm -Force -Recurse C:\Users\publicuser\Music\*
rm -Force -Recurse C:\Users\publicuser\Pictures\*
rm -Force -Recurse C:\Users\publicuser\Videos\*
rm -Force -Recurse C:\Users\publicuser\AppData\Local\Google\Chrome\"User Data"\*
rm -Force -Recurse C:\Users\publicuser\AppData\Local\Mozilla\Firefox\Profiles\*
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351
cleanmgr.exe "/sagerun:6500"
  • Create batch script startup.bat
powershell.exe -command "Set-ExecutionPolicy Unrestricted"
powershell.exe -command "C:\Users\Administrator\Desktop\cleanup2.ps1"
  • Create startup task to run startup.bat (this way if a user shutsdown the dedicated PC before going home, things will still get cleaned)
  • It's possible you will need to set the execution policy to unrestricted. Not something you want to do on a corporate network. However, for something as benign as this it should be ok.
  • https://support.microsoft.com/en-us/help/253597/automating-disk-cleanup-tool-in-windows