group-policy

How to get the PFN (package family names) for Microsoft Edge extensions?

◇◆丶佛笑我妖孽 提交于 2021-01-29 12:50:49
问题 I made an extension for Microsoft Edge. And I want to change a group policy in Local Group Policy Editor to prevent turning off required extensions. In the dialog indicated in the image below, I need to input the PFN (package family names) of the package. How can I get the PFN (package family names) for the extension of Edge? 回答1: you can refer steps below to get PFN (package family name) for the Extensions of MS Edge browser. (1) Open Windows PowerShell window. (2) Type below command. Get

Enable\Disable Local Group policies with powershell

北城以北 提交于 2021-01-29 10:10:06
问题 I have been trying to enable or disable a Local group policy with powershell to automate the process, I tried installing Remote Server Administration Tools but it's module in powershell needs the pc to be in a domain. Is there any way to enable\disable a Local group policy with powershell? 回答1: Use the registry (note that this requires elevation): Set-ItemProperty -Path <HKLM:RegistryPath> -Name <PropertyToChange> -Value <NewValue> Example (Enabling Search Suggestions from Edge): Set

How to pass Alternate Credentials to Active Directory GPO Command “New-GPLink”

穿精又带淫゛_ 提交于 2020-05-17 05:55:27
问题 Im trying to execute bellow command with the alternate credentials in my power-shell script. -credential $Cred is not working, below is the sample command. New-GPLink -Name "Security_Policy" -Target "OUPath" 来源: https://stackoverflow.com/questions/61682263/how-to-pass-alternate-credentials-to-active-directory-gpo-command-new-gplink

How to programatically refresh chrome policy 'ExtensionInstallBlacklist' on windows?

大城市里の小女人 提交于 2020-04-16 05:49:22
问题 I need to update the Chrome policy 'ExtensionInstallBlacklist' from a desktop application on windows. Im already able to modify the policy through the registry by adding values to HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome\ExtensionInstallBlacklist . However, to have an effect in chrome, I need to manually visit chrome://policy/ within Chrome and hit the "refresh policies"-button. What I already tried: According to this other question on SO, one can use gpupdate /force to trigger a

Why app installed using MSI installer would disappear from Windows

我的未来我决定 提交于 2020-02-04 05:08:22
问题 We made some changes to the installation and updating process of our Windows app recently, and some users are now complaining that Windows sometimes automatically deletes the main application .exe file. It usually occurs after users update app using built-in web update feature. The feature is implemented using .msi built in A dvanced Installer tool . We are struggling to figure out what is causing this, and haven't found a way to consistently reproduce the issue (though we've seen it happen

How to programatically get the Enforce Password History group policy setting?

大兔子大兔子 提交于 2020-01-01 18:17:38
问题 How can i programatically get the Enforce Password History group policy setting? Research Effort You can find the Group Policy option under: **Computer Configuration\Windows Settings\Security Settings\Account Policies\Password Policy** Enforce password history This security setting determines the number of unique new passwords that have to be associated with a user account before an old password can be reused. The value must be between 0 and 24 passwords. This policy enables administrators to

How to make an application GPO aware?

馋奶兔 提交于 2020-01-01 03:12:30
问题 I'm writing an application in Delphi 2010, and I'd like to provide the option to the administrator to configure it via Group Policy. Any recommendations on good ways to make my application GPO aware? Note, I am only looking to create a computer based GPO, not user. My current solution involves simply first determining if any values have been written to the registry at HKLM\software\policies\MyProgram . If they have, I assume that GPO has been applied and I use this location to read

How to programatically update group policy with C++?

天大地大妈咪最大 提交于 2019-12-29 08:22:39
问题 I am managing group policies programmatically, but I am not able to find any function which updates group policy programmatically. i.e. gpupdate /force 回答1: I have found the answer, IGroupPolicyObject - Windows API to create/update policies programmatically. I would recommend you to go through this links, they will explain in deep about accessing Group Policies programmatically. Working with Group Policy Objects Programmatically Programmatically updating local policy in Windows If you have

powershell: script to start a program with parameters?

淺唱寂寞╮ 提交于 2019-12-24 00:56:49
问题 When i run the Powershell script below i receive the error below. How do i run programs through powershell with parameters? The script will be a group policy logon. Invoke-Expression : A positional parameter cannot be found that accepts argument '\TBHSERVER\NETLOGON\BGInfo\BGIFILE.bgi /timer:0 /s ilent /nolicprompt '. At X:\Systems\scripts\PowerShell\UpdateDesktopWithBGInfo.ps1:6 char:18 + Invoke-Expression <<<< $logonpath $ArguList + CategoryInfo : InvalidArgument: (:) [Invoke-Expression],

C# SessionSwitchReason.SessionLock NOT triggering when machine is locked via Group Policy

别等时光非礼了梦想. 提交于 2019-12-23 05:24:00
问题 EDIT: The issue here wan't the fact it was locked via GP, it was that it was being run as a service under a service account and it didn't have access to the interactive desktop I have a C# application that needs to check for when a user's session is locked, I'm using Microsoft.Win32.SystemEvents.SessionSwitch and this works fine when a user manually locks the machine. The problem is that when the machine is locked via a group policy (User Configuration > Policies > Administrative Templates >