ChrisMiles
Members-
Posts
410 -
Joined
-
Last visited
Content Type
Forums
News
20th
EduGeek EDIT Conference
Blogs
Everything posted by ChrisMiles
-
Deleted Item Retention in Exchange refers to how long the server will keep items in the database that have been completely deleted by the user, ie deleted from the "Deleted Items" folder or shift-deleted before recovering the space for re-use. It does not affect mail in your Deleted Items folders at all, that it down to the user to manage.
-
You need an RDS Gateway to use Remote Desktop Services externally period. Remote Apps and Remote Desktop sessions accessed through the RDS Web Access service connect through SSL on 443 to the gateway server. The web access server does absolutely nothing except display the web page interface. You can use a gateway server to access remote desktop sessions externally just by entering the correct details into the RDP client, you dont even need the web access interface, although its user friendly.
-
The normal way to do this is to create a primary DNS zone on your domain DNS for your external domain name and add A records with the internal IP address.
-
Computers not using new DHCP Option 66 & 67 setting...
ChrisMiles replied to CyBeRkId2002's topic in Windows Server 2008
I assume your using SCCM 2012. SCCM does not use those dhcp options at all, they are not required. SCCM snoops all dhcp requests and responses, interjecting where approperite. If your clients are not getting a PXE boot from your SCCM server it's likely because you don't have any jobs deployed to them. (SCCM only offers PXE boot when theres something deployed). This could be because you need to deploy your task sequence to the All Unknown Computers collection. WDS may also be doing this, you should try disabling your WDS server if you cannot proceed. -
May I suggest you consider if virtualising it is an option.
-
This script will output the information you requested from AD: On Error Resume Next ' Mehtod Constants Const adUseClient = 3 Const adCmdText = 1 Const adSecureAuthentication = 1 Const adLockReadOnly = 1 ' Declare Variables Dim shell, fso, adoConnection, adoCommand, adoRecordset Dim organisationUnit Dim textStream ' Set Configuration Variables organisationUnit = "DC=school,DC=local" ' Create System Objects Set shell = CreateObject("Wscript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") ' Ensure the script runs via cscript instead of wscript If Instr(1, WScript.FullName, "CScript", vbTextCompare) = 0 Then shell.Run "cscript """ & WScript.ScriptFullName & """", 1, False WScript.Quit End If ' Clear the error state Err.Clear '===================================================' ' Connect to Active Directory ' '===================================================' WScript.Stdout.Write "Connecting to Active Directory... " Set adoConnection = CreateObject("ADODB.Connection") adoConnection.Provider = "ADsDSOObject" adoConnection.Properties("Encrypt Password") = True adoConnection.Properties("ADSI Flag") = adSecureAuthentication adoConnection.Open "Active Directory Provider" If Err.Number <> 0 Then WScript.Stdout.WriteLine "Failed!" WScript.Stdout.WriteLine WScript.Stdout.WriteLine "Error: " & Err.Number & ": " & Err.Description WScript.Stdout.WriteLine WScript.Quit End If WScript.Stdout.WriteLine "Done." '===================================================' ' Open Output File ' '===================================================' WScript.Stdout.Write "Opening output file 'computers.csv'... " Set textStream = fso.CreateTextFile("computers.csv", true) If Err.Number <> 0 Then WScript.Stdout.WriteLine "Failed!" WScript.Stdout.WriteLine WScript.Stdout.WriteLine "Error: " & Err.Number & ": " & Err.Description WScript.Stdout.WriteLine WScript.Quit End If textStream.WriteLine("""Name"",""OS"",""OS Service Pack"",""OS Version""") If Err.Number <> 0 Then WScript.Stdout.WriteLine "Failed!" WScript.Stdout.WriteLine WScript.Stdout.WriteLine "Error: " & Err.Number & ": " & Err.Description WScript.Stdout.WriteLine WScript.Quit End If WScript.Stdout.WriteLine "Done." '===================================================' ' Query Active Directory for Computers ' '===================================================' WScript.Stdout.Write "Querying Active Directory for computers... " Set adoCommand = CreateObject("ADODB.Command") Set adoRecordset = CreateObject("ADODB.Recordset") adoCommand.ActiveConnection = adoConnection adoCommand.Properties("Page Size") = 1000000 adoCommand.Properties("Sort On") = "cn" adoCommand.CommandType = adCmdText adoCommand.CommandText = ";(objectCategory=Computer);name,operatingSystem,operatingSystemServicePack,operatingSystemVersion;subtree" adoRecordset.Open adoCommand, , adUseClient, adLockReadOnly If Err.Number <> 0 Then WScript.Stdout.WriteLine "Failed!" WScript.Stdout.WriteLine WScript.Stdout.WriteLine "Error: " & Err.Number & ": " & Err.Description WScript.Stdout.WriteLine WScript.Quit End If '===================================================' ' Process Computers ' '===================================================' WScript.Stdout.WriteLine adoRecordset.RecordCount & " Found." While Not adoRecordset.EOF And Not adoRecordset.BOF ' Write computer information textStream.Write("""") textStream.Write(adoRecordSet("name")) textStream.Write(""",""") textStream.Write(adoRecordSet("operatingSystem")) textStream.Write(""",""") textStream.Write(adoRecordSet("operatingSystemServicePack")) textStream.Write(""",""") textStream.Write(adoRecordSet("operatingSystemVersion")) textStream.WriteLine("""") adoRecordset.MoveNext Wend Err.Clear '===================================================' ' Close Active Directory Connection ' '===================================================' WScript.Stdout.Write "Closing Active Directory Connection... " adoConnection.Close If Err.Number <> 0 Then WScript.Stdout.WriteLine "Failed!" WScript.Stdout.WriteLine WScript.Stdout.WriteLine "Error: " & Err.Number & ": " & Err.Description WScript.Stdout.WriteLine WScript.Quit End If WScript.Stdout.WriteLine "Done." '===================================================' ' Close Output File ' '===================================================' WScript.Stdout.Write "Closing output file... " textStream.Close() If Err.Number <> 0 Then WScript.Stdout.WriteLine "Failed!" WScript.Stdout.WriteLine WScript.Stdout.WriteLine "Error: " & Err.Number & ": " & Err.Description WScript.Stdout.WriteLine WScript.Quit End If WScript.Stdout.WriteLine "Done."
-
We don't have this problem quite that often but when we do it is nearly always caused by laptops being powered off half way through the log off process out of impatience.
-
If you want to use a cursor, this is more efficient: USE Students DECLARE ImagesCursor CURSOR FAST_FORWARD FOR SELECT 'c:\photo\' + Second_Name + Left(First_Name,1) + '.jpg' as ImagePath, CONVERT(VARBINARY(MAX), Photo, 1) as ImageData FROM dbo.Staff_card_info WHERE UpdateTime > GETDATE()-0.04 DECLARE @ImagePath NVARCHAR(MAX); DECLARE @ImageData VARBINARY(MAX); OPEN ImagesCursor FETCH NEXT FROM ImagesCursor INTO @ImagePath, @ImageData WHILE (@@FETCH_STATUS <> -1) BEGIN DECLARE @ObjectToken INT EXEC sp_OACreate 'ADODB.Stream', @ObjectToken OUTPUT; EXEC sp_OASetProperty @ObjectToken, 'Type', 1; EXEC sp_OAMethod @ObjectToken, 'Open'; EXEC sp_OAMethod @ObjectToken, 'Write', NULL, @ImageData; EXEC sp_OAMethod @ObjectToken, 'SaveToFile', NULL, @ImagePath, 2; EXEC sp_OAMethod @ObjectToken, 'Close'; EXEC sp_OADestroy @ObjectToken; PRINT @ProductId PRINT @filename PRINT ' ' FETCH NEXT FROM ImagesCursor INTO @ImagePath, @ImageData END CLOSE ImagesCursor DEALLOCATE ImagesCursor
-
If it must be done in SQL, this is how I'd do it. You'd need to switch to a temporary table rather than a table variable if the binary data was very large, but as they're jpgs I'd imagine it wont be too bad. USE Students DECLARE @studentData TABLE ( ImageID INT IDENTITY PRIMARY KEY, ImagePath VARCHAR(MAX), ImageData VARBINARY(MAX) ) DECLARE @CurrentRow INT DECLARE @RowCount INT DECLARE @ImagePath VARCHAR(MAX) DECLARE @ImageData VARBINARY(MAX) DECLARE @ObjectToken INT INSERT INTO @studentData (ImagePath, ImageData) SELECT 'C:\photo\' + Second_Name + LEFT(First_Name, 1) + '.jpg', CONVERT(VARBINARY(MAX), Photo, 1) FROM dbo.staff_card_info SELECT @CurrentRow = 1 SELECT @RowCount = COUNT(*) FROM @studentData WHILE (@CurrentRow < @RowCount) BEGIN SELECT @ImagePath = ImagePath, @ImageData = ImageData FROM @studentData WHERE (ImageID = @CurrentRow) EXEC sp_OACreate 'ADODB.Stream', @ObjectToken OUTPUT; EXEC sp_OASetProperty @ObjectToken, 'Type', 1; EXEC sp_OAMethod @ObjectToken, 'Open'; EXEC sp_OAMethod @ObjectToken, 'Write', NULL, @ImageData; EXEC sp_OAMethod @ObjectToken, 'SaveToFile', NULL, @ImagePath, 2; EXEC sp_OAMethod @ObjectToken, 'Close'; EXEC sp_OADestroy @ObjectToken; PRINT @ProductId PRINT @filename PRINT ' ' SELECT @CurrentRow = @CurrentRow + 1 END Note: Don't have a database to test so you may have to check for bugs.
-
I agree with this, except that its personal preference, its not, it's good practice. The SQL service account shouldn't even have permissions to write those files to the disk in the first place. I'm more than happy to supply vbscript, powershell or .net app to replace this process, but if you absolutely have to do it all on the SQL server, I'll have a look at it and get back to you.
-
Cursors are terrible, don't use them unless there is absolutely no other alternative. If you absolutely must use one, make sure you declare it properly, so it's read only and forward moving only to speed things up. Maybe post full source in a new thread and we'll see what we can do.
-
SQL Guru's I Need some guidance ( OR GLPI HELPDESK!! )
ChrisMiles replied to twin--turbo's topic in Coding
Cant test it but this looks right to me: SELECT glpi_tickets_users.* FROM glpi_tickets_users LEFT OUTER JOIN ( SELECT DISTINCT ticket FROM glpi_tickets_users WHERE TYPE = 2 ) TicketsWithType2User ON glpi_tickets_users.ticket = TicketsWithType2User.ticket WHERE (TicketsWithType2User.ticket IS NULL) -
Have you added the Windows 2012/Windows 8 KMS key to your KMS server? The KB2757817 artical here Update adds support for Windows 8 and Windows Server 2012 to Windows Server 2008, Windows 7, and Windows Server 2008 R2 KMS hosts seems to suggest you still need to update the key.
- 8 replies
-
- kms
- server 2008 r2
-
(and 2 more)
Tagged with:
-
For starter's I can tell you that the differences in keys is not a problem. The KMS key your windows 8 pro reports is NG4HW-VH26C-733KW-K6F98-J8CK4 which is the KMS client key. It does nothing except tell windows to activate against an available KMS server and is the same for all copies of windows 8 pro. To be honest, I'm surprised at the possibility that a Windows 2008 R2 kms key would ever activate windows 8 clients, I would have thought a windows 2012 server running a 2012 kms key would be required.
- 8 replies
-
- kms
- server 2008 r2
-
(and 2 more)
Tagged with:
-
Well, your internal active directory domain might be randomcompany.local and the server might be remote.randomcompany.local, but your website might be www.randomcompany.com and your remote external address could then be remote.randomcompany.com. You should then purchase an external ssl certificate for the server to sign the remote apps/for web access etc with that external address. You only need to do this if your remote apps are to be available form outside the network though. Otherwise just issue your own.
-
Create Popup every time internet is clicked for pupils?
ChrisMiles replied to titch's topic in How do you do....it?
Host the page on an internal website and set it as the homepage is probably your best bet. -
%USERNAME% will return the username of the account used to run the task and will never be blank.
-
Roaming profile recreation and Folder Redirection
ChrisMiles replied to googlemad's topic in Windows 7
The server copy of the profile can just be deleted through explorer, it's nothing special at all. Cached copies on computers must be deleted properly using the windows profile manager or some other application because they have information also held in the registry. I wrote a tool that can do this remotely using WMI, rather than the dirty registry hacks needed otherwise. I thought the OP was talking about server profiles copies to be honest. Didn't mean any offence. -
Roaming profile recreation and Folder Redirection
ChrisMiles replied to googlemad's topic in Windows 7
See my message above, that is why. -
Yes every link in the chain needs to be configured to carry tagged traffic for the admin vlan.
-
Yes, configure an uplink from the switch to the router on the admin VLAN only, configure the port in the switch where the wireless access point is connect to be tagged for the admin vlan, and then configure a new profile to tag data for the admin vlan.
-
Roaming profile recreation and Folder Redirection
ChrisMiles replied to googlemad's topic in Windows 7
Did you also delete the hidden registry files that you can only see by showing hidden files and disabling the "hide opperating system files" option? I assume you didnt delete the whole folder. -
This vbscript will do it: strComputer = "." Set objWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set objShell = WScript.CreateObject("WScript.Shell") Set colSessions = objWMI.ExecQuery("SELECT * FROM Win32_LogonSession WHERE LogonType = 2") strCmd = "" If colSessions.Count = 0 Then ' No interactive users found strCmd = "shutdown /s /t 0 /f" Else ' Interactive users found strCmd = "shutdown /r /t 0 /f" End If objShell.Run strCmd
