Code Monkey home page Code Monkey logo

scloud's Introduction

Hi, I am Florian Salzmann

Typing SVG

... I also run the blog scloud.work.

My primary area of work is with the Microsoft cloud platforms, with a strong focus on endpoint management (Intune). I started working in IT years ago in 2012 and love any excuse to write a PowerShell script. My blog scloud.work is the place where I share my ideas and solutions to common problems in the modern workplace.

🖥️ Fav Tech

  • Microsft Intune
  • PowerShell
  • MS Defender (pick one)
  • SmartHome with Home Assisatnt

FlorianSLZ

Connect with me

florianslz fsalzmann florianslz_ https://scloud.work/en

scloud's People

Contributors

akosbakos avatar cbeckr avatar danhalensri avatar florianslz avatar gambitc90 avatar hobbithardcase avatar jgudmundson-retsd avatar m1lkman avatar niiwiicamo avatar tomcollis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scloud's Issues

Dell Command Update Install Script Update

We ran into an issue trying to deploy the Dell Command Update application, if different Dell Update utilities are installed it will fail the install.

Currently the install script checks for other installations of Dell Command with the following lines:
Search for UWP App edition and uninstall
$DellCUPackage = Get-Package "Dell Command*" -ErrorAction SilentlyContinue
if($DellCUPackage){$DellCUPackage | Uninstall-Package -Force}

I'd recommend adding the following line to include removing all of the Dell Update utilities that may cause Dell Command install to fail:

$DellCUPackage = Get-Package "Dell Update*" -ErrorAction SilentlyContinue
if($DellCUPackage){$DellCUPackage | Uninstall-Package -Force}

Great blog/repo!

~Phil

Dell BIOS password settings

Hello. It is not a real issue , it is a question.
How can I set BIOS password in the update script, if every computer has the same BIOS passord in the company?

License

Would you add GPL or MIT license?

Uninstalling Fonts via Intune

Hello Florian,

Thank you for your job, it is fantastic!

Everything works fine, the only problem I have is when I try to remove fonts through Intune - it removes the fonts and registry entries, but I get the following errors (In Intune it is also marked as "Uninstall failed"):

PS>TerminatingError(Remove-Item): "A parameter cannot be found that matches parameter name 'ItemType'."
Remove-Item : A parameter cannot be found that matches parameter name 'ItemType'.
At C:\WINDOWS\IMECache\08964a18-e2dc-4099-9107-e4d60ad53759_1\uninstall.ps1:24 char:70

  • ... "$Path_FontsIntune\Validation$PackageName" -ItemType "file" ...
  • CategoryInfo : InvalidArgument: (:) [Remove-Item], ParameterBindingException
  • FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
    Remove-Item : A parameter cannot be found that matches parameter name 'ItemType'.
    At C:\WINDOWS\IMECache\08964a18-e2dc-4099-9107-e4d60ad53759_1\uninstall.ps1:24 char:70
  • ... "$Path_FontsIntune\Validation$PackageName" -ItemType "file" ...
  • CategoryInfo : InvalidArgument: (:) [Remove-Item], ParameterBindingException
  • FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand

The "Company-Fonts" file is also was not deleted from "Validation" folder.

Another thing I've noticed that the "$Version = "1" " string is missing in uninstall.ps1, or is that correct?

All help is much appreciated!

Install.ps1 Uninstall-TeamsClassic : Uninstallation failed with exit code -1.

Removing Teams Machine-wide Installer

Processing user: *****

Teams installation not found for user *****

Processing user: *****

Teams installation not found for user *****

Processing user: *****

Uninstall Teams for user *****

Uninstall-TeamsClassic : Uninstallation failed with exit code -1.

Au caractère C:\windows\Local\Uninstall_Teams_Classic\UninstallTeams.ps1:54 : 9

  •     Uninstall-TeamsClassic -TeamsPath $localAppData
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException

    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Uninstall-TeamsClassic

Uninstall-TeamsClassic : Uninstallation failed with exit code -1.

Au caractère C:\windows\Local\Uninstall_Teams_Classic\UninstallTeams.ps1:54 : 9

  •     Uninstall-TeamsClassic -TeamsPath $localAppData
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException

    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Uninstall-TeamsClassic

Processing user: *****

Uninstall Teams for user *****

Uninstall-TeamsClassic : Uninstallation failed with exit code -1.

Au caractère C:\windows\Local\Uninstall_Teams_Classic\UninstallTeams.ps1:54 : 9

  •     Uninstall-TeamsClassic -TeamsPath $localAppData
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException

    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Uninstall-TeamsClassic

Uninstall-TeamsClassic : Uninstallation failed with exit code -1.

Au caractère C:\windows\Local\Uninstall_Teams_Classic\UninstallTeams.ps1:54 : 9

  •     Uninstall-TeamsClassic -TeamsPath $localAppData
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException

    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Uninstall-TeamsClassic

Processing user: *****

Teams installation not found for user *****

Processing user: *****

Uninstall Teams for user *****

Uninstall-TeamsClassic : Uninstallation failed with exit code -1.

Au caractère C:\windows\Local\Uninstall_Teams_Classic\UninstallTeams.ps1:54 : 9

  •     Uninstall-TeamsClassic -TeamsPath $localAppData
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException

    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Uninstall-TeamsClassic

Uninstall-TeamsClassic : Uninstallation failed with exit code -1.

Au caractère C:\windows\Local\Uninstall_Teams_Classic\UninstallTeams.ps1:54 : 9

  •     Uninstall-TeamsClassic -TeamsPath $localAppData
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException

    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Uninstall-TeamsClassic

Installing new Teams


Open Teams in background: TerminatingError

Hi Florian,

I pasted the log below to your blog post, however it's awaiting moderation: https://scloud.work/en/teams-open-background/
Sorry for the duplication. Just wondering if you have any insight to this?

I ran the script without modification: https://github.com/FlorianSLZ/scloud/blob/main/Teams/Teams_open-in-background.ps1

**********************
Windows PowerShell transcript start
Start time: 20230627192611
Username: AzureAD\PradeepGupta
RunAs User: AzureAD\PradeepGupta
Configuration Name: 
Machine: DESKTOP-BKT10RN (Microsoft Windows NT 10.0.22621.0)
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -executionPolicy bypass -file C:\Program Files (x86)\Microsoft Intune Management Extension\Policies\Scripts\3fc8f061-f0ed-4f48-bfe0-d29118d7f069_7c4a12ae-d019-44ce-a4ce-18544fc83b57.ps1
Process ID: 6096
PSVersion: 5.1.22621.1778
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.22621.1778
BuildVersion: 10.0.22621.1778
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
Transcript started, output file is C:\Users\PradeepGupta\AppData\Local\4net\EndpointManager\Log\Teams_open-in-background.log
PS>TerminatingError(Out-File): "Could not find a part of the path 'C:\Users\PradeepGupta\AppData\Local\4net\EndpointManager\Data\Teams_open-in-background.ps1'."
C:\Program Files (x86)\Microsoft Intune Management 
Extension\Policies\Scripts\3fc8f061-f0ed-4f48-bfe0-d29118d7f069_7c4a12ae-d019-44ce-a4ce-18544fc83b57.ps1 : Could not 
find a part of the path 'C:\Users\PradeepGupta\AppData\Local\4net\EndpointManager\Data\Teams_open-in-background.ps1'.
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,3fc8f061-f0ed-4f48-bfe0-d29118d7f069_7c4
a12ae-d019-44ce-a4ce-18544fc83b57.ps1
C:\Program Files (x86)\Microsoft Intune Management
Extension\Policies\Scripts\3fc8f061-f0ed-4f48-bfe0-d29118d7f069_7c4a12ae-d019-44ce-a4ce-18544fc83b57.ps1 : Could not
find a part of the path 'C:\Users\PradeepGupta\AppData\Local\4net\EndpointManager\Data\Teams_open-in-background.ps1'.
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,3fc8f061-f0ed-4f48-bfe0-d29118d7f069_7
   c4a12ae-d019-44ce-a4ce-18544fc83b57.ps1

**********************
Windows PowerShell transcript end
End time: 20230627192611
**********************

Assistance

Hey, I need assistance in creating 1 for Microsoft edge password sync disable, I couldn't find how to do it for Multisession VDI am thinking maybe Proactive remediations might help.

Thanks in advance

$Path = "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\SettingSync"
$Name = "DisableCredentialsSettingSync"
$Type = "DWORD"
$Value = 2

Try {
$Registry = Get-ItemProperty -Path $Path -Name $Name -ErrorAction Stop | Select-Object -ExpandProperty $Name
If ($Registry -eq $Value){
Write-Output "Compliant"
Exit 0
}
Write-Warning "Not Compliant"
Exit 1
}
Catch {
Write-Warning "Not Compliant"
Exit 1
}

SendToHelpDesk modified Script

Hey,
I changed the webhook URL of Teams in the script.
However, Intune still uses the "default" file. The URL is not stored there.
Can I change that?

Proactive Remediation for Business: "AtLogin" does not work

Great tools and scripts, I really appreciate the work you put into it.

I found an issue when using the "AtLogin" configuration in the "Proactive Remediation for Business"-scripts:
When I deploy the script as "user" in Intunes, it failes to create the scheduled task for all users which do not have local admin rights. ("Register-Scheduler: access denied") - both on Win 10 and 11.

When I deploy it as "system" in Intune, it creates a task for "SYSTEM" with the packagename and machine name, but not for the respective logged-in user.

Happy to provide more logs or help debugging

Winget.exe not located - empty $winget variable

(Thanks for sharing your hardwork!)

for the script: procative-remediation-creation.ps1

testing on a new Windows 11 23H2 machine, I found that the following code the $winget variable is returning empty.

$Winget = Get-ChildItem -Path (Join-Path -Path (Join-Path -Path $env:ProgramFiles -ChildPath "WindowsApps") -ChildPath "Microsoft.DesktopAppInstaller*_x64*\winget.exe")

I've replaced the variable with just the command and this seems to work.

so this:
if ($(&winget upgrade) -like "* $app_2upgrade *") {

instead of this
if ($(&$winget upgrade) -like "* $app_2upgrade *") {

no sure if this is something related to new winget release or and update?

Optimize WinGet Detection even further

Hi.

I think you could replace

$winget_exe = Resolve-Path "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe\winget.exe"
if ($winget_exe.count -gt 1){
        $winget_exe = $winget_exe[-1].Path
}

with a one-liner, if I understand your intent correctly.

$winget_exe = Resolve-Path "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe\winget.exe" | Select -Last 1
Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.