gpo

Active Directory user password expiration date .NET/OU Group Policy

孤人 提交于 2019-12-17 07:33:35
问题 I have searched the site for information and found this: ASP.NET C# Active Directory - See how long before a user's password expires which explains how to get the value of when the password expires as per Domain Policy. My question is this: what if the user has an OU Group Policy that has a different MaxPasswordAge value, overriding the one specified in Domain Group Policy? How to programatically get the OU's Group Policy Object? Edit: To make this question a little bit more clear, I am

Update the Local Computer Policy in Windows 7 with IGroupPolicyObject

六眼飞鱼酱① 提交于 2019-12-13 16:35:56
问题 I just want to be able to programmatically do what gpedit.msc does. I'm trying to set the value of these keys to 1 and Update the Local Group Registry. In gpedit.msc: Local Computer Policy/Computer Configuration/Administrative Templates/System/Removable Storage Access ValueName: All Removable Storage classes: Deny all access Value: 1 (set this to 1) Local Computer Policy/Computer Configuration/Administrative Templates/Windows Components/AutoPlay Policies ValueName : Turn off Autoplay Value: 1

Let my Application be controlled by GPOs

我们两清 提交于 2019-12-13 13:26:20
问题 I am developing a windows application. I want my application to be configurable via own-defined GPOs, that the system administrator can manage my application behaviour for each group and user individually. I've done some research, but I just could not find a proper solution. If I create some custom policies, how do they get on the server? I think the policies should consist of "changing registry entries". After that, my application uses these entries on the local machine to configure itselft.

visual studio generated msi vs gpo: This advertised application will not be installed because it might be unsafe

心已入冬 提交于 2019-12-13 05:36:18
问题 I have outlook vsto addin with oneclick installer (vsto manifests etc) that is bundled with MSI. This is done to be able to install it with Group Policy (as I learned oneclick cannot be really deployed with GPO, it needs MSI). This msi works fine if I run it from limited account (UAC prompts) or admin account. Problem is that if it is deployed via GPO it shows: "This advertised application will not be installed because it might be unsafe (...)" I looked to stackoverflow and found that it

Passing parameters from Group Policy to VBScript

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 05:09:58
问题 So i need to push a batch script out as a login script through Group Policy Batch Script Example: @echo off Set USPS=%1 %2 Command %USPS% I'm using a VB Script to call the .bat file VB Script Dim var1, var2 Set objShell = WScript.CreateObject("WScript.Shell") 'Parameter1, begin with index0 var1 = WScript.Arguments(0) 'Parameter2 var2 = WScript.Arguments(1) objShell.Run "Script.bat" var1 & var2, 0, True I'm placing parameters in the script parameters text box in group policy So what im trying

Backup GPOs basing on GPO DisplayName rather than Id

吃可爱长大的小学妹 提交于 2019-12-10 17:53:35
问题 So I am backing up all the GPOs of a Domain Controller and I noticed that the way Backup-GPO cmdlet backs up the GPOS is so unfriendly. By default it creates a folder for every single GPO named after the "ID" which doesn't even match its "GPOID/GUID". Here is an example, I will just backup a specific GPO: backup-gpo -guid ff8de365-0842-46ab-9ac7-64ebd8dd4614 -path C:\ DisplayName : N12 Workstation Policy GpoId : ff8de365-0842-46ab-9ac7-64ebd8dd4614 Id : dd33c220-bac8-4ebd-a9d9-7729fcea9c38

Start hidden Internet Explorer

大城市里の小女人 提交于 2019-12-10 14:45:19
问题 my company is using Sharepoint and ADFS. For the use of WebDav however we need the users to get some tokens which they only get by opening the Internet Explorer and navigate to two sites. However they will lose the token every ~30 Minutes, so it has to be a recurring task. So now my job is to: Open 2 Websites with IE Every 30 Minutes Don't annoy the user My current solution is "kinda" working but I am not really satisfied with it. I have only VSExpress so no Services. I have a minimized max

How to Programmatically Set GPO to Not Configured or Disabled

强颜欢笑 提交于 2019-12-05 12:24:39
I'm looking for a programmatic solution that has the same effect as setting the "Configure Windows NTP Client" state in GPOE Administrative Templates > System > Windows Time Service > Time Providers > Configure Windows NTP Client to Not Configured or Disabled , but I'll take any help I can get at this point. Is there a registry key I can modify using the .NET Registry class or a property I can modify using the RSoP WMI classes? I've been looking in both places for days, but haven't found anything that will effectively disable the GPO or have the same effect as disabling or setting it to Not

Schedule Task with schtasks

自作多情 提交于 2019-12-02 12:29:23
I created a script that creates a scheduled task GPUpdate /Force to be executed from a Windows server machine to a Windows 10 machine "Beta" but the script is not executed and an error shows up: starttime is not valid Below you will find my script: schtasks /Create /S Client.Admin.6NLG-AD /U Admin.6NLG-AD\Beta /P ******** /SC MINUTE /MO 1 /TN Update /TR "GPUpdate /Force" /ST defaults 来源: https://stackoverflow.com/questions/55140048/schedule-task-with-schtasks

Suppress errors for the whole script

╄→гoц情女王★ 提交于 2019-12-01 04:41:48
I am want to suppress all the errors that could appear in my VBS logon script. Can I surround the WHOLE 500 lines script with : On Error Resume Next '[... whole script (~500 lines of code) ...] On Error GoTo 0 You can do it - even without the OEG0 line - but you shouldn't, because the script will continue to execute lines i ... last, even if an error in line i-1 invalidates all your assumptions about necessary pre-conditions of the actions in those lines. Your strategy is comparable to driving with your eyes shut to avoid being dazzled by the headlights of other cars. If you can't do locally