Dialout policy

%3CLINGO-SUB%20id%3D%22lingo-sub-1319230%22%20slang%3D%22en-US%22%3EDialout%20policy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1319230%22%20slang%3D%22en-US%22%3E%3CP%3Eimport-csv%20C%3A%5CUsers%5Cashis%5CDesktop%5Cconf.csv%20-Header%20userprincipalname%20%7C%20ForEach-Object%20%7BGrant-CsDialoutPolicy%20-PolicyName%20%22DialoutCPCDisabledPSTNInternational%22%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20running%20above%20command%20to%20disable%20dialout%20for%20selected%20users%2C%20however%20getting%20attached%20error%20each%20time%20I%20run%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESecond%20Question%3A-%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3EAlso%2C%20I%20want%20to%20know%20how%20can%20I%20have%20dial%20out%20disabled%20automatically%20for%20all%20new%20users%20that%20get's%20provisioned.%20I%20thought%20I%20could%20do%20it%20set-csdialoutpolicy%20but%20there%20is%20no%20such%20command.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20of%20now%2C%20any%20users%20that%20get%20provisioned%20have%20dialoutpolicy%20set%20to%20blank%2C%20I%20want%20to%20by%20default%20set%20it%20to%26nbsp%3B%3C%2FP%3E%3CP%3EDialoutCPCDisabledPSTNInternational.%20Please%20help%20me%20with%20the%20powershell%20command%20for%20that.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1319230%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeployment%20%26amp%3B%20Operations%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1319742%22%20slang%3D%22en-US%22%3ERe%3A%20Dialout%20policy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1319742%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F147222%22%20target%3D%22_blank%22%3E%40Ashish%20Mangtani%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Edoes%20the%20command%20(%3CSPAN%3EGrant-CsDialoutPolicy)%26nbsp%3B%3C%2FSPAN%3Ework%20for%20a%20single%20user%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22hljs-pscommand%22%3EGrant-CsDialoutPolicy%3C%2FSPAN%3E%3CSPAN%20class%3D%22hljs-parameter%22%3E%20-Identity%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E%22ken.myer%40contoso.com%22%3C%2FSPAN%3E%3CSPAN%20class%3D%22hljs-parameter%22%3E%20-PolicyName%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E%22%3CSPAN%3EDialoutCPCDisabledPSTNInternational%3C%2FSPAN%3E%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EIf%20you%20want%20to%20update%20multiple%20users%20I%20would%20recommend%20that%20you%20use%20the%20new%20%22%3CSPAN%3ENew-CsBatchPolicyAssignmentOperation%22%20cmd'let.%20I%20have%20written%20down%20the%20necessary%20steps%20to%20get%20there.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fpaul-lange.net%2Fassign-policies-in-microsoft-teams-the-easy-way%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fpaul-lange.net%2Fassign-policies-in-microsoft-teams-the-easy-way%2F%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20heard%20the%20feature%20is%20now%20GA%20but%20haven't%20tested%20if%20it%20is%20now%20working%20without%20the%20Teams%20preview%20module.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ERegarding%20the%20second%20question%2C%20I%20would%20recommend%20that%20you%20grant%20this%20policy%20during%20user%20provisioning%20in%20a%20script.%20We%20are%20doing%20it%20the%20same%20way.%20To%20my%20knowledge%2C%20there%20is%20no%20way%20of%20setting%20a%20more%20restricted%20policy%20as%20a%20default.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ERegards%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EPaul%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

import-csv C:\Users\ashis\Desktop\conf.csv -Header userprincipalname | ForEach-Object {Grant-CsDialoutPolicy -PolicyName "DialoutCPCDisabledPSTNInternational"}

 

I am running above command to disable dialout for selected users, however getting attached error each time I run it.

 

Second Question:- 

 

Also, I want to know how can I have dial out disabled automatically for all new users that get's provisioned. I thought I could do it set-csdialoutpolicy but there is no such command.

 

As of now, any users that get provisioned have dialoutpolicy set to blank, I want to by default set it to 

DialoutCPCDisabledPSTNInternational. Please help me with the powershell command for that.

 

 

 

1 Reply

Hi @Ashish Mangtani,

 

does the command (Grant-CsDialoutPolicy) work for a single user?

Grant-CsDialoutPolicy -Identity "ken.myer@contoso.com" -PolicyName "DialoutCPCDisabledPSTNInternational"

If you want to update multiple users I would recommend that you use the new "New-CsBatchPolicyAssignmentOperation" cmd'let. I have written down the necessary steps to get there.

https://paul-lange.net/assign-policies-in-microsoft-teams-the-easy-way/

I heard the feature is now GA but haven't tested if it is now working without the Teams preview module.

 

Regarding the second question, I would recommend that you grant this policy during user provisioning in a script. We are doing it the same way. To my knowledge, there is no way of setting a more restricted policy as a default.

 

Regards,

Paul