Jump to content

DJ-1701

AFK GNU
  • Posts

    7,556
  • Joined

Everything posted by DJ-1701

  1. Agree with that too, unless you include a \ at the end of the computer name in your csv, it should come before c$ other wise you are going to \\Computerc$\Program Files\Renato\senso.cloud... which obviously wouldn't exist.
  2. Na, that would require an account effort.
  3. I've decided to stick the latest version of the powershell script in my Edugeek blog for easier editing. Shortcut deployment script - Blogs - EduGeek.net
  4. The following is the latest powershell shortcut deployment script, first shown in http://www.edugeek.net/forums/windows-server-2000-2003/76664-cc3-vanilla-windows-without-wiping-4.html#post1404554 Updates include comment clarification, hiding errors when dealing with files with no shortcut path/MSI generated shortcuts. Latest script can be found here: https://github.com/DJ-1701/ShortcutDeploy # Specify source and destination of shortcut folders below. # **************************************************************************** # * Note: In the source location, create two folders named 32-Bit and 64-Bit * # * to host your Start Menu shortcuts (as shortcut paths may vary). * # **************************************************************************** $Source = "\\ABC-SVR-01\Applications$\StartMenu" $Destination="C:\ProgramData\FolderName\Windows\Start Menu" # Inform user if no Source or Destination has been provided. If (($Source -eq "") -or ($Destination -eq "")) { Write-Host "Missing Source and/or Destination, please check and try again." Exit } # If there is a trailing backslash for $Source and/or $Destination, remove the backslash. If ($Source.Substring($Source.Length-1) -eq "\") { $Source = $Source.Substring(0,$Source.Length-1) } If ($Destination.Substring($Destination.Length-1) -eq "\") { $Destination = $Destination.Substring(0,$Destination.Length-1) } # Update the Source path to include the OS Architecture type to the end of the path. # If no OS Architecture is returned, then use the 32-Bit shortcut folder. $Bit = ((Get-WMIObject Win32_OperatingSystem).OSArchitecture) If ($Bit -eq "") {$Bit = "32-Bit"} $Source = $Source + "\" + $Bit # Inform user if Source does not exist. If (!(Test-Path($Source))) { Write-Host "The Source location does not exist, please check and try again." Exit } # Get the latest last modified date on all shortcuts in Source and Destination paths. $NetworkStamp = Get-ChildItem "$Source\*" -Recurse -Force -include @("*.lnk","*.xml","*.appref-ms")` | Where {!$_.PsIsContainer} | select Name,DirctoryName, LastWriteTime ` | Sort LastWriteTime -descending | select -first 1 $LocalStamp = Get-ChildItem "$Destination\*" -Recurse -Force -include @("*.lnk","*.xml","*.appref-ms") -ErrorAction SilentlyContinue ` | Where {!$_.PsIsContainer} | select Name,DirctoryName, LastWriteTime ` | Sort LastWriteTime -descending | select -first 1 # If there are any differences in the last modified date: # 1) Delete files in Destination (if it exists). # 2) Copy files from Source to Destination. If ($NetworkStamp.LastWriteTime -ne $LocalStamp.LastWriteTime) { If (Test-Path($Destination)) { Remove-Item "$Destination" -Recurse -Force } New-Item -ItemType directory -Path "$Destination" Copy-Item "$Source\*" -Destination "$Destination" -Recurse } # Create a list of folders copied to the destination folder. $ListOfFolders = Get-ChildItem $Destination -Recurse -Force | Where-Object {$_.PSIsContainer} ` | Sort-Object FullName -Descending | % { $_.FullName } # Create a shell object, so we can check if the shortcuts are valid. $sh = New-Object -COM WScript.Shell # Check if Array is Null (Prevents ForEach null bug in PowerShell 2). If ($ListOfFolders -ne $null) { # Do the following for every folder we scanned. FOREACH ($Folder in $ListOfFolders) { # Set the hidden flag to True for the folder. # Note: This will hide the folder later on if applications do not exist. $AllItemsHidden = $true # Get a list of all shortcuts in the current folder. $ListOfShortcuts = Get-ChildItem "$Folder\*" -Force -include *.lnk ` | % { $_.FullName } # Check if Array is Null (Prevents ForEach null bug in PowerShell 2). If ($ListOfShortcuts -ne $null) { # Do the following for every shortcut we scanned. FOREACH ($Shortcut in $ListOfShortcuts) { # Find out if the shortcut is hidden. $Item = Get-Item $Shortcut -Force $CheckHidden = (Get-ItemProperty $Item).Attributes.ToString() -match "Hidden" # Get the target path of the shortcut (the path of the application). # If it refers to C drive (C:), check if it exists, and ensure the shortcut # is visible to the users, otherwise hide the shortcut. $PathOfApplication = $sh.CreateShortcut($Shortcut).TargetPath If ($PathOfApplication.Length -ge 2) { If ($PathOfApplication.Substring(0,2) -eq "C:") { If (Test-Path($PathOfApplication)) { $AllItemsHidden = $false If ($CheckHidden) { $Item.Attributes = $Item.Attributes -bxor [system.IO.FileAttributes]::Hidden } } ElseIf ((!(Test-Path($PathOfApplication))) -and (!($CheckHidden))) { $Item.Attributes = $Item.Attributes -bxor [system.IO.FileAttributes]::Hidden } } } If (($Item.Directory.Name -eq "Programs") -or ($Item.DirectoryName.ToLower().Contains("\Programs\".ToLower()))) { $CheckHidden = (Get-ItemProperty $Item).Attributes.ToString() -match "Hidden" If (!($CheckHidden)) { $Item.Attributes = $Item.Attributes -bxor [system.IO.FileAttributes]::Hidden } } } # List all files in the folder (excluding desktop.ini and thumbs.db, which aren't required). $ListOfSubFilesAndFolders = Get-ChildItem "$Folder\*" -Force -exclude "desktop.ini","thumbs.db" ` | % { $_.FullName } # Check if Array is Null (Prevents ForEach null bug in PowerShell 2). If ($ListOfSubFilesAndFolders -ne $null) { # Do the following for every file or subfolder we scanned. FOREACH ($SubFilesOrFolder in $ListOfSubFilesAndFolders) { # Find out if the file is hidden. If it is not, then it is a required resource. # inform the program not to hide the folder. $Item = Get-Item $SubFilesOrFolder -Force $CheckHidden = $Item.Attributes.ToString() -match "Hidden" If ($CheckHidden -eq $false) { $AllItemsHidden = $false } } } # If all of the files are hidden in the folder, then hide the unrequired folder. # If any file is unhidden in the folder, then unhide the required folder. $Item = Get-Item $Folder -Force $CheckHidden = (Get-ItemProperty $Item).Attributes.ToString() -match "Hidden" If (($AllItemsHidden -and !($CheckHidden)) -or (!($AllItemsHidden) -and $CheckHidden)) { $Item.Attributes = $Item.Attributes -bxor [system.IO.FileAttributes]::Hidden } } If (($Item.Directory.Name -ne $null) -or ($Item.DirectoryName -ne $null)) { If (($Item.Directory.Name -eq "Programs") -or ($Item.DirectoryName.ToLower().Contains("\Programs\".ToLower()))) { $CheckHidden = (Get-ItemProperty $Item).Attributes.ToString() -match "Hidden" If (!($CheckHidden)) { $Item.Attributes = $Item.Attributes -bxor [system.IO.FileAttributes]::Hidden } } } } }
  5. How about organising by book colour in decimal RGB value under reverse numerical order? As long as your system works for you, you can just sit back and say...
  6. Come on, join Twitter so I can follow you.
  7. Windows Defender.
  8. He's not even registered! Pedantic Geeks - Member List
  9. I don't think that would work, I am colour deficient.
  10. Oh come on, if it's the Dark side of the moon, joint with the SS domain name, surely we are going to find that Iron Sky was right...
  11. Let's think about this... it's pink... a google image search brings up a triangle... obviously it's referring to this: Which is PINK Floyd... and what are Pink Floyd known so well for? That's right Dark side of the moon! So... we just need to get Elon Musk to take us to the Dark side of the moon for that answer!
  12. Of course they are, how do they download a different browser otherwise?
  13. Oh dear... and you have Saturday to go too... get some notepads from other stands and make signs. - HI! Great to see you again. - Edugeek is a professional IT life line that helps not just IT Techs, but in Education, but a wide range of people. - For goodness sake, stop being immature and put the worm down, you're not suppose to put it there!
  14. DC, does that make me fictional... or just my puns more shocking?
  15. They have, but they haven't returned to tell.
  16. The sites I have allowed are: .azurewebsites.net .officedba.azurewebsites.net .SCHOOLO365NAMEHERE-my.sharepoint.com azurewebsites.net officedba.azurewebsites.net SCHOOLO365NAMEHERE-my.sharepoint.com Also made a reclassification of officedba.azurewebsites.net as 'Computing / Internet'
  17. I hate to say it, but... it just works for me on Quantum using the AD proxy. Willing to test anything or look up settings, but I think the only difference maybe that I don't have the proxy set via reg fragments in GPOs that some Quantum users have as part of the automated install, I removed them and just I use a wpad.dat file I created. function FindProxyForURL(url, host) { if (isPlainHostName(host) || shExpMatch(host,"*.addomain.school.county.sch.uk") || shExpMatch(host,"10.1.0.*")) { return "DIRECT"; } else { return "PROXY ad.quantum.exa-networks.co.uk:3128"; } }
  18. @Fazza, have you tried the option above? Also if you are using Windows 10 from VLSC, you can select English International in the language list for download, this sets UK English as default, might be helpful for future installs. Additional: You're not the only one with a Microsoft Store issue, the issue has also been raised here. http://www.edugeek.net/forums/internet-related-filtering-firewall/203314-surfprotect-quantum-accessing-microsoft-store-windows-10-a.html
  19. Yeah, and the public demand better quality news services.
  20. It's the annual freebie thread... This is obviously the big one: Free Microsoft certification at BETT 2019 (thanks @willtech) I have had an e-mail about the following. Lynx Networks - Stand A111 - Handing out free 8GB USB sticks to all of our existing contacts and their colleagues. (Although, aren't most of us locking down USB? )
  21. I think the question here is... what are you trying to do? Most things will ask for a root password when you tried to make system changes.
  22. Got forwarded the same message from the Primary here, but never setup HUP there though. Seems the Secondary has as well which was setup, but haven't used to my knowledge. We just let staff install Office from the Office 365 entitlement though so, not an issue for us.
  23. I already follow you on Twitter! Gosh, why are you so needy? Next you'll be asking for your own promotional channel in Discord...
×
×
  • Create New...