
Tags: - SharePoint On-premises – PowerShell script to unlock all site.

Non-domain machines connect without a problem. Us='MsiExec.Your network administrator has blocked access sharepoint. Print "Please blacklist Valid Installed Software" Rklist=[(_winreg.HKEY_LOCAL_MACHINE,uninstallkey_32,_winreg.KEY_READ), (_winreg.HKEY_CURRENT_USER,uninstallkey_32,_winreg.KEY_WOW64_64KEY | _winreg.KEY_READ)] (_winreg.HKEY_CURRENT_USER,uninstallkey_32,_winreg.KEY_WOW64_32KEY | _winreg.KEY_READ),

(_winreg.HKEY_LOCAL_MACHINE,uninstallkey_32,_winreg.KEY_WOW64_64KEY | _winreg.KEY_READ), Rklist=[(_winreg.HKEY_LOCAL_MACHINE,uninstallkey_32,_winreg.KEY_WOW64_32KEY | _winreg.KEY_READ), If 'PROGRAMFILES(X86)' in os.environ.keys(): Uninstallkey_32='SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall' Lr.append('success: is installed'.format(a))ĭN,bla=_winreg.QueryValueEx(oK1,'DisplayName') OpenedKey = _winreg.OpenKey(rK, sK, 0, _winreg.KEY_READ)Īrch, bla = _winreg.QueryValueEx(openedKey, 'PROCESSOR_ARCHITECTURE')įList = DNDS(_winreg.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall', _winreg.KEY_WOW64_32KEY | _winreg.KEY_READ)įList.extend(DNDS(_winreg.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall', _winreg.KEY_WOW64_64KEY | _winreg.KEY_READ))įList.extend(DNDS(_winreg.HKEY_CURRENT_USER, r'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall', _winreg.KEY_WOW64_32KEY | _winreg.KEY_READ))įList.extend(DNDS(_winreg.HKEY_CURRENT_USER, r'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall', _winreg.KEY_WOW64_64KEY | _winreg.KEY_READ))įList = DNDS(_winreg.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall', _winreg.KEY_READ)įList.extend(DNDS(_winreg.HKEY_CURRENT_USER, r'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall', _winreg.KEY_READ))

SK = r'SYSTEM\CurrentControlSet\Control\Session Manager\Environment' OK1 = _winreg.OpenKey(rtkey, vkey, 0, kA)ĭN, bla = _winreg.QueryValueEx(oK1, 'DisplayName')ĭV, bla = _winreg.QueryValueEx(oK1, 'DisplayVersion') Self.success = self._disable(ref(self.old_value))ĭef _exit_(self, type, value, traceback): Import os,ctypes,re,_winreg,time,platform,shutil
