Showing posts with label Documentation. Show all posts
Showing posts with label Documentation. Show all posts

Tuesday, July 28, 2015

Set-ExecutionPolicy: Can not set execution policy

Hello their maledetos nerds !!! ehehehehe
When trying to run a certain PS script remotely on an Exchange server, I came across the following error message:
. \ UpdateIndexAllMailboxDatabases.ps1: File C: \ Temp \ SCRIPTS \ EXCHANGE \UpdateIndexAllMailboxDatabases.ps1 can not be loaded. The file C: \ Temp \ SCRIPTS \ EXCHANGE \UpdateIndexAllMailboxDatabases.ps1 is not digitally signed. The script will not execute on the system. Please see "get-help about_signing" for more details ..
At line: 1 char: 37
... After a Get-ExecutionPolicy had the RemoteSigned return .There think twice !!! Set-ExecutionPolicy Unrestricted and was returned the following message:
Execution Policy Change
The execution policy helps protect you from scripts That You do not trust. Changing the execution policy might expose you to the security risks described in the help topic at about_Execution_Policies
http://go.microsoft.com/fwlink/?LinkID=135170 . Do you want to change the execution policy?
[Y] Yes [N] No [S] Suspend Help (default is "Y") [?] Y
Set-ExecutionPolicy: Windows PowerShell execution policy successfully updated your, but the setting is overridden by
the policy defined at a more specific scope. Due to the override, your shell will retain its current effective
execution of policy RemoteSigned. Type "Get-ExecutionPolicy -List" to view your execution policy settings.For more
information please see "Get-Help Set-ExecutionPolicy".
At line: 1 char: 1
+ Set-ExecutionPolicy Unrestricted
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo: PermissionDenied: (:) [Set-ExecutionPolicy] SecurityException
+ FullyQualifiedErrorId: ExecutionPolicyOverride, Microsoft.PowerShell.Commands.SetExecutionPolicyCommand
As recommended in the message, I ran the cmdlet to list the policy of execution policy by scope
Get-ExecutionPolicy -List
Scope ExecutionPolicy
- -----
MachinePolicy RemoteSigned
UserPolicy Undefined
Process Undefined
CurrentUser Undefined
LocalMachine RemoteSigned
... Immediately I performed the following Set-ExecutionPolicy -Scope MachinePolicy -executionpolicy Bypass command for the policy to be released ... ops:
Set-ExecutionPolicy: Can not set execution policy. Execution policies at the MachinePolicy or UserPolicy scopes must beset through Group Policy.
To correct this error, we are forced to make this modification directly in season record:
HKLM: \ Software \ Policies \ Microsoft \ Windows \ PowerShell and change the value ExecutionPolicy   toBypass.
By rerunning the command to list the scope for policy, we realize that now really the setting was uncommitted !!
Get-ExecutionPolicy -List
Scope ExecutionPolicy
- -----
MachinePolicy Bypass
UserPolicy Undefined
Process Undefined
CurrentUser Undefined
LocalMachine RemoteSigned
Then I could run my script and they all lived happily ever after!

Wednesday, February 1, 2012

Exchange Network Port Reference

Follow the link for all ports used by Exchange 2007 and 2010:

http://technet.microsoft.com/en-us/library/bb331973.aspx

Default permissions of the Sysvol folder

They follow a standard NTFS permissions of the SYSVOL folder:

% SystemRoot% \ Windows \ Sysvol

  • Clear the Allow inheritable permissions from parent to propagate to this object check box
  • Administrators: Full Control
  • Authenticated Users: Read, Read & Execute, List Folder Contents and
  • Creator Owner: Nothing selected
  • Server Operators: Read, Read & Execute, List Folder Contents and
  • System: Full Control

% SystemRoot% \ Windows \ Sysvol \ Sysvol

  • Clear the Allow inheritable permissions from parent to propagate to this object check box

% SystemRoot% \ Winnt \ Sysvol \ Sysvol \ domain

  • Clear the Allow inheritable permissions from parent to propagate to this object check box

% SystemRoot% \ Winnt \ Sysvol \ Sysvol \ domain \ Policies

  • Clear the Allow inheritable permissions from parent to propagate to this object check box
  • Administrators: Full Control
  • Authenticated Users: Read, Read & Execute, List Folder Contents and
  • Creator Owner: Nothing selected
  • Group Policy Creator Owners: Read, Read & Execute, List Folder Contents, Modify, and Write
  • Server Operators: Read, Read & Execute, List Folder Contents and
  • System: Full Control

For each file or folder that is located in the% SystemRoot% \ Winnt \ Sysvol \ Sysvol \ domain \ Policies

  • Check the Allow inheritable permissions from parent to propagate to this object check box

Sysvol share permissions:

  • Administrators: Full Control
  • Authenticated Users: Full Control
  • Everyone: Read

Reference: http://truetechsolutions.supersized.org/archives/8-Default-Permissions-for-Sysvol.html

Memory Limits for Windows Releases

The following documentation regarding the limit of physical memory for Windows versions:

http://msdn.microsoft.com/en-us/library/aa366778 (v = VS.85). aspx

Description of the status codes of Microsoft Internet Information Services (IIS) 5. 0 and 6.0

Follow the link for error codes displayed by IIS:

http://support.microsoft.com/?id=318380

Migrate Server Roles to Windows Server 2008 R2

Below is a URL that I think is very interesting, especially for computer consultants, where deployments and migrations are part of the day is dia.Trata tutorials migration of server roles in Windows Server 2003 and Windows Server 2008 to Windows Server 2008 R2.

http://technet.microsoft.com/en-us/library/dd365353 (WS.10). aspx

Errors related to disk partitioning during deploy Windows 7 images using SCCM 2007 / 2010 MDT

Follow the link for possible errors in the TS partitioning disks, and their possible causes and resolutions:

http://blogs.technet.com/b/configurationmgr/archive/2009/12/17/how-to-properly-set-up-a-task-sequence-to-deploy-windows-7-images-captured-via-an-sccm-2007-capture-cd.aspx