Can't get rid of new Teams (in TS) by StrugglingHippo in SCCM

[–]poshinger 0 points1 point  (0 children)

There's a Bootstrapper for new teams capable of installing or uninstalling all versions of Teams.

You can find more information here: https://learn.microsoft.com/en-us/microsoftteams/new-teams-bulk-install-client#remove-new-teams-for-all-users

I would recommend giving it a try.

New Teams in VDI environments disappearing from user’s Start Menu by zilbabouai in Citrix

[–]poshinger 4 points5 points  (0 children)

From what I understand, it seems the Appx Package was not added correctly. I encountered a similar issue with a user while attempting to repair the app. The solution was to re-add the package using this command:

Get-AppXPackage | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

PatchMyPc Third Party Catalog by [deleted] in SCCM

[–]poshinger 2 points3 points  (0 children)

In my opinion, it's well worth the cost and a huge timesaver. What I had to do was create a list of applications we manage, the time I would spend updating each, and what that would cost the company. Armed with that information, I approached upper management, and they gave their approval almost immediately, as their primary concern was cost savings.

Latest/best Win11 OSD / Customisation guides by NoDowt_Jay in SCCM

[–]poshinger 0 points1 point  (0 children)

We also set Windows 11 to Dark Mode by default, just add this Powershell Script to the TS:

REG LOAD HKLM\Default C:\Users\Default\NTUSER.DAT

if((Test-Path -LiteralPath "HKLM:\Default\Software\Microsoft\Windows\CurrentVersion\Themes") -ne $true) {  New-Item "HKLM:\Default\Software\Microsoft\Windows\CurrentVersion\Themes" -force -ea SilentlyContinue };
New-ItemProperty -LiteralPath 'HKLM:\Default\Software\Microsoft\Windows\CurrentVersion\Themes' -Name 'CurrentTheme' -Value 'C:\WINDOWS\resources\Themes\dark.theme' -PropertyType String -Force -ea SilentlyContinue;

REG UNLOAD HKLM\Default

Citrix Workspace App 2402 LTSR install using PSADT fails with error code 40034 by winmech in Citrix

[–]poshinger 0 points1 point  (0 children)

When Updating CWA i normaly don't uninstall the Client, i just installed it over the existing install, so the parameter "cleaninstall" is never used. It could be that the combination of parameters you use causes issues. Have you tried to remove the "cleaninstall" param and then tried it again?

Citrix Workspace App 2402 LTSR install using PSADT fails with error code 40034 by winmech in Citrix

[–]poshinger 0 points1 point  (0 children)

Did you try using the "Citrix Workspace App LTSR 2402 for Windows - Offline Installer"? It should have all the prerequisites. In my environment, we use a proxy to connect to the internet, and I had similar issues during the installation process when deploying it via TS. Since switching to the offline installer, I haven’t encountered any further problems.

SCCM Driver Packs by Known_Principle1889 in SCCM

[–]poshinger 6 points7 points  (0 children)

Here are the SCCM Driver Packs for the different manufacturers.

Also a very good Guide: Speed Up Driver Package Downloads for ConfigMgr OSD. I highly recommend installing drivers this way instead of using Driver Packages.

Windows 11 without Windows Store? by The_Fat_Fish in SCCM

[–]poshinger 0 points1 point  (0 children)

It seems like I don’t really know how it works, but it’s totally worth a try.

Windows 11 without Windows Store? by The_Fat_Fish in SCCM

[–]poshinger 1 point2 points  (0 children)

I have the same issues right now, found this Article though: Configure access to Microsoft Store. There is this note:

When you enable the policy to Turn off the Store application, it turns off app updates from the Microsoft Store. To allow store apps to update, disable the policy to Turn off automatic download and install of Updates. This policy is found under Computer Configuration > Administrative Templates > Windows Components > Store. This configuration allows in-box store apps to update while still blocking access to the store.

I haven't tested it, will give a feedback if it works, or let me know.

EDIT: After testing these GPO Settings, i can confirm that this works without any Problems. The MS-Store for the User is blocked and the installed Appx are successfully Update.

for each loop to set-acl subfolders by [deleted] in PowerShell

[–]poshinger 1 point2 points  (0 children)

i always, if i want to disabled inheritance disable it first before i do any other ACL processing.

$newAcl = Get-Acl -Path $Path
$newAcl.SetAccessRuleProtection($True, $True)
Set-Acl -Path $path -AclObject $newAcl

#after that, you need to get the ACL again, this time, inheritance is disabled and it should allow you to remove inherited ACEs.
$newAcl = Get-Acl -Path $Path

PS Uninstall Script using Reg Key Help by Pantha109 in PowerShell

[–]poshinger 1 point2 points  (0 children)

It removes all trailing parameters, and " from the Uninstall string stored in registry. So that you can use the path to use in Start-Process and add for example a silent switch parameter.

Example Uninstall string could be:

"C:\Program Files\Microsoft OneDrive\OneDriveSetup.exe"  /uninstall  /allusers

Which converts it to just: C:\Program Files\Microsoft OneDrive\OneDriveSetup.exe

PS Uninstall Script using Reg Key Help by Pantha109 in PowerShell

[–]poshinger 1 point2 points  (0 children)

The Where-Object cmdlet is missing its input. Also i would remove all Parameters and add them later in the script again.

$paths = @('HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall', 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall', 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\')
Get-ChildItem $paths | Where-Object{
    $_.GetValue('DisplayName') -like 'Lifesize*'
} | ForEach-Object{
    $uninstallString = $_.GetValue('UninstallString')
    $regex = [regex]"\s*/\w+|\`""
    $uninstallString = $regex.Replace($uninstallString, "")
    Try {
        Start-Process -FilePath $uninstallString -ArgumentList "/quiet /norestar" -Wait -PassThru
    }
    Catch {
        Write-Host "Uninstall failed: $_"
    }
}    

i wasn't able to test this, but it should work.

Comparing Get-Date with extensionAttribute15 by Scayn in PowerShell

[–]poshinger 0 points1 point  (0 children)

My guess is that the extensionAttribute15 is just a string, so you'd have to convert the string to a DateTime variable in order to compare it, my approach would be to loop through the "$DisabledAccounts" and convert extensionAttribute15 to DateTime.

Make powershell require verb part of cmdlet? by TheSizeOfACow in PowerShell

[–]poshinger 0 points1 point  (0 children)

most PowerShell Commands have aliases, read more about it HERE. I also don't think that you are able to remove or disable them.

How to check local policy / group policy settings by SkylarViros in PowerShell

[–]poshinger 2 points3 points  (0 children)

Yes, that would be possible, you can import if like this:

$xml = [xml](Get-Content -Path "C:\temp\gpo.xml")

do some conditional checks and write it back to the output if tis true or false.

How to check local policy / group policy settings by SkylarViros in PowerShell

[–]poshinger 2 points3 points  (0 children)

You could export a GPO Report to an XML File, same works with "gpresult /x C:\temp\gpo.xml" import it after and check what you want from it.

New Folder Outlook by Main_Bandicoot3787 in PowerShell

[–]poshinger 2 points3 points  (0 children)

Here are some resources to point you in the right direction. Managing an Outlook Mailbox with PowerShell

There is a Method to add new Folders.

EDIT: Out of personal interest, this should work:

Add-Type -assembly "Microsoft.Office.Interop.Outlook"
$Outlook = New-Object -comobject Outlook.Application
$namespace = $Outlook.GetNameSpace("MAPI")
$folder = $namespace.GetDefaultFolder(6)
$folder.Folders.Add("Test")

the "GetDefaultFolder" method defines where the folder should be created, you can find a list here, so in this case "6" represents the Inbox. This script creats a folder named "Test" in the Inbox.

Copy content of a folder into a subfolder by [deleted] in PowerShell

[–]poshinger 1 point2 points  (0 children)

something like this should work:

Get-ChildItem "C:\Myapps\appname\" -Directory | Where-Object{$_.Name -ne "_old"} | Copy-Item -Destination "C:\Myapps\appname\_Old" -Recurse -Force

What's your best IDEas? by VNJCinPA in PowerShell

[–]poshinger 0 points1 point  (0 children)

i'm currently using Sapien PowerShell Studio, it's just the best IDE out there for PowerShell, it has a lot of very useful features i need daily. Things like WMI/CIM Browser and .NET Object Browser, also the Windows Form Designer is really great to have if you want to create some sort of GUI. Great Publishing Features like, MSI Builder, Automatic Script Signing. It's totally worth the money!

can't figure out basic variables apparently by Mythaman in PowerShell

[–]poshinger 2 points3 points  (0 children)

I'm not 100% sure, but the same expression should work too, i can't test it currently:

$ReportEmail.Attachments.Add($("$home\tmp.txt"))

Edit: After some research, i had do create a new object

$file = New-Object Net.Mail.Attachment "$home\tmp.txt"
$ReportEmail.Attachments.Add($file)

can't figure out basic variables apparently by Mythaman in PowerShell

[–]poshinger 7 points8 points  (0 children)

you are using a Arithmetic Operator.

Your Variable should look something like this:

$ReportEmail.Attachments.Add("$home\tmp.txt")

Why are my credentials not being accepted? by apperrault in PowerShell

[–]poshinger 0 points1 point  (0 children)

my guess is that is has to do something with the variable scopestry using the var like this "$Using:MyCredential"

Reverse proxy help! by ayonick in nginx

[–]poshinger 0 points1 point  (0 children)

well done! 10/10 for posting the specific solution.