Using For Loop with powershell to modify registry
If someone could help me out with this it would be great. I am trying to modify registry valuse using a for loop inside of a foreach statement. for some reason the for loop is only counting characters instead of the block of the string which represents the value or value data or value data type. below is a block of the code i have writen. please advise if possible.
CLC $env:userprofile\Desktop\regs.txt $mkeys = @() $mkeys = "SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" #,"keyname" $mvals = @() $mvals = "DisabledComponents;[inte]0xFFFFFFFF;DWORD" #,"name|value|valuetype" #$DWORDValue1 = 0xFFFFFFFF foreach($comp in (gc $env:userprofile\desktop\Test_Servers.txt)) { $comp for($i=0;$i -lt 1;$i++) { $mreg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("LocalMachine", $comp) $regkey = $mreg.OpenSubKey("$mkeys[$i]",$true) $getregkey = $regkey.Getvalue("$mvals[$i].split(",")[1]") if($getregkey -ne "$mvals[$i]") { $regkey.SetValue("$mvals[$i].split(",")[0])","$mvals[$i].split(",")[1])","$mvals[$i].split(",")[2])") #$regkey.close()#verify #release-ref $regkey } #"$comp";"$($mkeys[$i])";"$mvals[$i].split(",")[0]";"$mvals[$i].split(",")[1]";"$mvals[$i].split(",")[2]" | out-file $env:userprofile\desktop\regs.txt -append #"$comp";"$($mkeys[$i])";"$mvals[$i].split(",")[0]";"$mvals[$i].split(",")[1]";"$mVals[$i].split(",")[2]" | out-file $env:userprofile\desktop\regs.txt -append "$comp ; $($mvals[$i].split(",")[0]) ; $getregkey" | out-file $env:userprofile\desktop\regs.txt -append } } Reply:
In your example, mkeys is not an array, it's a string; so inside your for loop you are indexing into the string.
Try this line for the defining mkeys:
$mkeys = @("SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters") #,"keyname" You also need to do the same for mvals:
$mvals = @("DisabledComponents;[inte]0xFFFFFFFF;DWORD") #,"name|value|valuetype"
- Edited by jrjespersen Tuesday, January 29, 2013 3:41 PM fixed syntax issue
------------------------------------
Reply:
still getting below error.
You cannot call a method on a null-valued expression. At line:1 char:18 + ($mvals[$i].split <<<< (",")[1]) + CategoryInfo : InvalidOperation: (split:String) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull Cannot find an overload for "SetValue" and the argument count: "3". At c:\Powershell scripts\test.ps1:17 char:29 + $regkey.SetValue <<<< (($mvals[$i].split(",")[0]),($mvals[$i].split(",")[1]),($mvals[$i].split(",")[2])) + CategoryInfo : NotSpecified: (:) [], MethodException + FullyQualifiedErrorId : MethodCountCouldNotFindBest - Edited by Absent686 Sunday, January 27, 2013 12:15 AM adding additional error
------------------------------------
Reply:
Hi,
Please refer to the below link:
Edit registry keys with powershell
Regards,
Cataleya Li
TechNet Community Support
------------------------------------
Reply:
I missed an parenthesis in the assignment of $mvals. I've corrected it above. Now, when I call split as shown in your error message, it doesn't throw an exception. However, it does return a 0-length value because the delimiter is a ';' and not a ','.
- Edited by jrjespersen Tuesday, January 29, 2013 3:44 PM
------------------------------------
HDD/SDD has been lost on Windows 7 laptop student pack
need to fix HDD/SDD apparently lost windows 7 . how do i correct
- Changed type tracycai Tuesday, February 5, 2013 8:09 AM
Reply:
------------------------------------
BIDS Crashes after opening a Data Flow
I have a package with numerous data flows in it. (I know - this is not recommended as a best practice.) Anyway, one of the Data Flows just started giving me some trouble. When I opened that particular Data Flow, then BIDS would crash. I tried loading the project again, and opening that Data Flow task, and it just kept crashing. I rebooted - same deal.
The Data Flow was itself very simple. There was an OLE DB Source, and OLE DB Destination, a conditional split, a derived column, a data conversion and a Lookup. Pretty routine stuff. Out of the blue really, and long after I created it - it just starting crashing BIDS when I opened it.
My solution was to copy the Data Flow control flow component and paste it back into the same package. This worked perfectly fine, and didn't see any issues after. So, apparently something in the meta data became corrupt, and caused it to crash.
Anyway, just curious if others have seen this behavior, but also wanted to post this as a solution in case someone else has the same problem.
Reply:
------------------------------------
Reply:
I'm running 05 SP2.
------------------------------------
Reply:
------------------------------------
Reply:
Same thing has happened to me a few times, and your solution worked great. Thank you
I noticed sometimes when I upgrade system I start getting this... so your hypothesis that metadata is getting corrupt might be right.
I write sql on the source, and save all my queries, so my packages are simple looking. I can't imagine how frustrating this would be to someone creating huge complex packages.
------------------------------------
Reply:
------------------------------------
Frustration with Windows Mobile Device Centre 6.1 and earlier and Sync results - data
I have a HTC P5500 and it came with a disk with Windows Mobile Device Centre and Active Sync
I previously used an old machine HP Compaq Windows Vista 64 bit
I now have used the same program on my Windows 7 Home Premium to sync my data across to back it up.
I have lost all my data and perhaps my lack of knowledge about technology - I uploaded the contacts and synced across three different SIM cards mainly to gain the contacts to my new phone.
I am looking for the notes section and lost MMS/SMS that were on the phone.
I have tried disabled the phone for the time being as it kept on updating even without the USB cable.
I have numerous .vcf and .csv folders as a result.
I do not know where the notes went.
I can not access the - Manage offline files section in the Control Panel.
If I no longer have the various folders SMS/MMS on the device and no notes - would have I lost all the data?
I thought I would update with the times - as advised by a forum member and now I am in a mess.
The days of USB cables and Activesync seem to be old technology and I am snubbed when I go to a phyisical store
Melissa Lindsay
- Changed type MelissaConfused Wednesday, September 3, 2014 1:11 AM Not answered
Reply:
Hi,
Sorry for not too much help for the HTC using issue. It's seems that the proper forum to solve your issue should be HTC support forum. You can try to find the help from HTC support forum or make a call to HTC Tech. Thanks for your understanding.
http://www.htc.com/us/support/
Regards.
Spencer
TechNet Community Support
------------------------------------
Reply:
Hi,
Sorry for not too much help for the HTC using issue. It's seems that the proper forum to solve your issue should be HTC support forum. You can try to find the help from HTC support forum or make a call to HTC Tech. Thanks for your understanding.
http://www.htc.com/us/support/
Regards.
Spencer
TechNet Community Support
I have the issue logged in HTC.
They say since it is a Windows program and syncing - that is why someone in the Microsoft community has suggested that I contact this forum.
I have lost the notes and SMS/MMS - the subfolders as .vcf and .csv folders after each sync.
It keeps on updating - do I end the partnership.
I am very desperate after going to a psychical store and being told that it is an old phone and they can not assist.
I have tried to search the data on the storage card and trying to read the .vcf files and what the details are is very hard.
Thank you for the reply
I am in a hospital with no external contacts
Melissa Lindsay
------------------------------------
Reply:
I mainly get told that I have too old a phone and software when I go to pyschical store. Get told to only transfer from SIM card. Too bad if you have a couple.
Do you usually have the instance of lost notes with lost SMS and MMS's?
I am dispondent about retrieving the data.
I have several .csv files and .vcf files. But there are a few. Some duplicating the same contact many times and I do not want to loose any data that are on my computer - 1360 - which I am a limited user - so I will have to learn which one is which and how to open the folders to check the details.
I understand the reasoning of third party as a back up - but I wish to keep it simple as before touching the windows phone and taking the SIM card and syncing - then I had the data in the background.
It is only now some technology I have is old - I wish to wipe it or keep a back up somewhere.
If I knew this was going to happen - would have just kept the phone as is.
It is the old WMDC 6.1 and older - this also causing the issue with most of my issues.
Please contact me back to clarify any details.
I require details for about chemo etc.
Hence my sketchy details
Due to my illness and also frustration - I have decided to upload some screen shots of what I am seeing on my computer.
I have numerous files as you will see that are both .csv and .vcf properties.
I will try and read on what the PIMBackup does and ensure that I keep up with technology. I guess the way of the world is going the way of the cloud.
I did not know I had a Skydrive and skydrive folder on my computer until today.
I will back up everything in future. Which is what the purpose of the original sync's were to do in the first place.
I have been told that as I have too many .csv files - that it would be hard to know which file was for which.
I really created a mess. Pretty disappointed that I lost some important notes etc.
If the screen shots assist - I hope they do as I am not doing well at the moment
https://skydrive.live.com/redir?resid=7A797BF1CB645296!326
Melissa Lindsay
------------------------------------
CRL Publication and Validity
Hi
I have a issuing CA server in a lab environment to test a production configuration. I have a certificate policy determined by an external body, who operate the root CA server, which state a CRL validity of 48 hours. There are no restrictions on the publication period, but I plan to set this to 1 hour because of a certificate revocation and CRL publication latency of 1 hour. I will do this using a script to call certutil -crl.
When I set the publication to 48 hours, I seem to have a default 10% overlap added - which I don't want.
Is there a way to turn the overlap off, or is it a case of reducing the publication period to account for the default overlap. At this time I have the overlap set to 0.
From the wealth of experience on this formal, are there any better suggestions on how to do this?
Regards
Stuart
Reply:
My weblog: http://en-us.sysadmins.lv
PowerShell PKI Module: http://pspki.codeplex.com
Check out new: PowerShell FCIV tool.
------------------------------------
Reply:
If I use the CA configuration, how is it possible to set an hourly publication of a CRL but a validity of exactly 48 hours? If I set the publication under the revocation properties pane to 1 hour this sets the validity to also 1 hour.
Any guidance would be much appreciated.
------------------------------------
EWS -JAVA API 1.2 - File Attachment Processing above 4MB - Out of Memory
Hi All,
Myself Prabhu. I am using EWS Java API 1.2 for my requirement. My requirement is I have to connect to the exchange server and pull the mail between the time which is specified in the request. Am able to fetch the mails and send in the response. But when the mail has attachments am facing issue.
For attachments greater than 3MB, am facing out of memory issue in IBM websphere application server. Am using the below method of file attachment class.
fAttachment.load();
I took the heap dump and found that, eventhough the initial memory heap size of the server is 512MB, we are getting out of memory error at 205MB itself. This became a source stopper for us. Please help me in respolving this issue.
Thanks in advance.
Regards,
Prabhu
SBS 2011 Essentials server near death, need to rebuild server with minimal impact on connected clients.
I would really appreciate any help on this problem. I have a SBS 2011 Essentials server setup with 8 connected Win 7 clients and a few xp clients.
This is a new build, about 6 months old. I will keep the following description short as this post is not to ask how to repair the server install as I think it is beyond repair now, this is to ask the most painless way to slip a new installed SBS 2011e server into the network.
During the xmas holiday, the server installed the last set of Patch Tuesday updates and an update from N-able and then all kinds of problems started to slowly appear. Firstly, the 'roles' and 'features' sections in the Server Manager would error and not be able to show installed roles and features. Then the main admin account profile became corrupted and the server would log me in with a temp profile every time. Then ... I noticed that the windows backups had been failing .. panic! .. Then the entire server just started to slip into the sea.
Even though the server was set to create an incremental backup, the only available date to restore to was a date where the damage was already done .. disaster!
Slowly things were getting worse, after a restart more problems would occur, now certain profiles could not log on, many cmd commands will not run, the windows updates just time out, our iScsi target has vanished (thankfully this is not used yet) and now the server can no longer see the internet ... the list goes on and on...
But, the clients can still access all the shares and the internet so for now, the office can still function as normal. Also, thankfully, the sql service is still running so the clients can access there database application. Although we can no longer administer the sql database using sql express 2012 on the server, it still runs.
So, this is quite a mess! I have no idea what the cause was and I know from experience, when it is this bad, you can waste days/weeks trying to fix the problems or just commit to a rebuild, which is what I will do.
What I am asking though, is what is the simplest and least painful way to slip a new build of the server back into the network without having to transfer all the users documents and settings on each client PC all over again?
The setup is this..
10 users, each user needs access to the server shares (each user will have different permissions) and the SQL applications will need access the sql express 2012.
8 PC's are win 7 (mix of 32 and 64 bit), 2 PC's are win xp.
All users have a office 365 account so outlook is linked to this and the outlook files and outlook archive folders are stored locally on each PC.
The NK2 cache must be retained from outlook.
All current data for each user must be present when back on the re-installed server.
So I appreciate that once this new server goes in, I can have all the shares created, sql server setup, users created in the dashboard, sbs 2011 essentials windows 7 professional pack installed for folder redirection to work etc. But, the machines will not be present in the dashboard so I can only assume that I will have to remove the connector from all the clients, put them onto a workgroup, then run the connector again and re-join each PC...
This worries me though, because when I originally setup the network and installed the connector, I did not choose to 'move all files and settings to the server'. So the 'user' data is stored on each local PC . So I do not know quite how this will behave once I log on with the connector as the current user, will there local user account be wiped clean? Will there be permission issues?
I suppose you can see what I am hoping, that as the logon accounts are the same, the domain is the same, everything identical, even the 2nd server (we had a spare redundant server) that the connector will just see the existing user profile and link back to it???
Or do I have to have a huge Robocopy session and copy the user folder off of each pc again? Something I do not really want to do.
Any help would me much appreciated. I don't know how much longer the server will remain usuable. I am having to run manual backups of the shares twice a day which is taking up a lot of my time.
Thanks in advance.
Reply:
You should look at doing a swing migration to new hardware.
If you want to keep the hardware you are using - then do a swing out to 20008r2/2012 and then migrate back to Essentials.
Robert Pearman SBS MVP | www.titlerequired.com | www.itauthority.co.uk
------------------------------------
Reply:
Thanks for the fast reply Robert. I actually read your blog quite a bit, has proven very useful during my past few builds!
Thanks for the info regarding a swing migration, I will read up on this. What I am doing at the moment is setting up sbs 2011e on an identical server I have. It was actually cloned from the current server after I installed the o/s and ran windows updates back when I setup this network so it is identical in every way apart from MAC addresses and maybe a few other hardware identifiers.
I don't have the resources to swing migrate to another server using another o/s but if it is my only option I will look at investing in the kit. I was hoping that my method of slipstreaming an identical server/build into the network would be possible and not cause too much pain?
------------------------------------
Reply:
ok, i would try doing a system state backup on the source server - then doing an authoritative restore of AD to the new server.
You will also need the SSL from the Certificate Authority - as if it was a migration.
Robert Pearman SBS MVP | www.titlerequired.com | www.itauthority.co.uk
------------------------------------
Reply:
Thanks for the advice, I had to read up on the process. Just to check, when running ntdsutil in the cmd for the first time and executing 'ntdsutil: authoriative restore' .. what command would I use next? Along the lines of 'restore subtree ou=users' etc.
Also, would doing this populate the dashboard in the rebuilt server with the PC machine names so I can still connect with the connector and run client backups?
------------------------------------
Reply:
No, what populates the dashboard is the connector software talking to the server - which uses the SSLs etc.
To be honest i might be inclined to just rebuild the lot if you cant do a migration.
Robert Pearman SBS MVP | www.titlerequired.com | www.itauthority.co.uk
------------------------------------
Reply:
Sorry yes I realised the connector was the only way to initiate the populating of the dashboard. I have found an article to use powershell to populate the dashboard from computers added manually or exported into AD though, this is new ground for me though...
Yeah a rebuild was the immediate plan but I was hoping to find a way to not do that due to the time it would take and needing the office to down there tools so to speak.
Are there any tips you know of that could make a rebuild easier? The clients user folders are kept local (I did not choose to move all user data to the server when running the connector) and there pst/outlook data files are also local. I was hoping that upon creating the new users with the same usernames on the new server, that after joining with the connector, sbs 2011e would just use the local user profile of the same name (although I bet it won't be that simple).
I also have the win 7 pro pack installed on the server so that I can use FolderRedirection, all 10 clients are currently using this. Perhaps I could robocopy the contents of the current FolderRedirection folder over to the new server once all the users are joined, although again, I bet this won't be simple, I can imagine permission issues or maybe CA issues?
------------------------------------
Reply:
Share the PowerShell link :)
i would use ForenSits profileWiz to move the profile folders after the rebuild.
RoboCopy is a good way of copying that, but cross domain/forest yes you will have permission issues to work around.
You might have more luck rolling back the Folder Redirection to the client computers first.
Robert Pearman SBS MVP | www.titlerequired.com | www.itauthority.co.uk
------------------------------------
Reply:
Sure the link is http://technet.microsoft.com/en-us/library/gg186128.aspx
I noticed ForenSits mentioned on your blog, I will read up on it thank you.
When you say rolling back the folder redirection to the client computers, do you mean forcing the data back to the local clients user folder? I think I read you can do this by changing a group policy setting?
------------------------------------
Reply:
------------------------------------
Reply:
Thanks for the tip on WMF3.0, I am currently investigating to see if it was installed. Just to confim you mean this one ? .. http://support.microsoft.com/kb/2506143?wa=wsignin1.0 .
Also, I originally set the server up to backup to an iscsi target, incremental backups. I mentioned above how I could only see one possible backup being made available, which was after all the corruption had happened meaning it was not of any use sadly.. This was after I copied the WindowsBackup folder onto an external hard drive so that I could use it on the 2nd identical server.
However, when using 'wbadmin get versions' on the failing server, it shows many versions going back to a time that would be of great use and could save us a lot of money and time. So I am now wondering why if when copying (I have also tried with robocopy /copyall /b etc) and it only shows the 1 possible restore date.
Is there a documented way to copy these backup folders? Why would 'wbadmin get versions' on the failing server report all these possible dates to restore to and when copying the WindowsBackup folder to an ext hard drive it only shows the 1 date?
I am tempted to test the restore image with many dates on the failing server but we cannot even risk restarting it as it may not ever start again if the backups were to fail.
Scary times!
------------------------------------
Reply:
OK so I am going to be using ForensiT to try and make this job as easy as possible. Before I do that though, I need to push the profiles back down to the local machines from the server. I read that this has to be done with a Group Policy, which one would you recommend to achieve this?
Once all the user data is back on each local machine, I can then use ForensiT to move everything over to the new server.
------------------------------------
BizTalk 2013 - Approach
Hi
I planning for BizTalk production enviroment.
What should be the approach wrt to Versions Iam listing the various options available. It will be helpful if I get some suggestions regarding this:
1) Install BTS 2010 on Win 2008 Using SQL 2008. Do the Upgrade of OS, DB and Apps after BizTalk 2013 release.
2) Install BTS 2010 with SQL 2008 on Win 2012. Upgrade DB & BTS at a later stage
3) Install BTS 2010 with SQL 2012 on Win 2008.Upgrade BTS at a later stage.
I guess Option 2 & 3 are not supported.
If I go for option 1 will it support in-place upgrade of OS/DB/BTS?
Any other suggestions?
Thanks
Reply:
to help you try and find the answers to the following questions
- Is BTS 2010 supported on Windows 2012?
- Is SQL Server 2008 R2 supported on Windows 2012?
- Is BizTalk 2013 supported on SQL Server 2008 R2?
If the answers to these questions are yes then
- Setup BizTalk 2010 /w SQL Server 2008 R2 on Windows 2008 R2
- In place upgrade Windows 2008 R2 to Windows 2012
- In place upgrade from BizTalk 2010 to BizTalk 2013
- in place upgrade from SQL Server 2008 R2 to SQL Server 2012
Of course the apps will have to be recompiled for .Net 4.5 or if BTS 2013 supports .Net 4 then run as is.
Regards.
------------------------------------
Reply:
Just found out same discussion in http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/95f5e727-2ea2-4718-8315-6bfe0b0ab92f.
Rules out Biztalk 2010 on Win 2012.
I need to wait for BTS 2013 till then my config will be BTS 2010 with SQL 2008 on Win 2008.
Later I will go for in place upgrade in the following order:
BTS 2010 to BTS 2013 - Assuming backward compatiblity with SQL 2008 & Win 2008.
SQL 2008 to SQL 2012
Win 2008 to Win 2012.
Thanks
------------------------------------
User Profile Full Sync is getting failed with Event ID 6401
Hi,
We have configured multiple Synchronisation connection with multiple domains.This is the first time we are importing the user
profiles of different domains into sharepoint,
Full sync is running fine and its showing message at 8PM daily as the stopped-service-shutdown with an unexpected error.
When I looked at the event logs,Event ID 6401 logged as below
The management agent controller encountered an unexpected error.
"BAIL: MMS(5364): extensionmanager.cpp(546): 0x80230825 (The management agent run was terminated by the user.)
BAIL: MMS(5364): extensionmanager.cpp(1236): 0x80230825 (The management agent run was terminated by the user.)
BAIL: MMS(5364): export.cpp(814): 0x80230825 (The management agent run was terminated by the user.)
BAIL: MMS(5364): export.cpp(183): 0x80230808 (The management agent run was terminated as there were unspecified management agent errors.)
ERR: MMS(5364): cntrler.cpp(6085): Invalid export error code received: 0x 80230808
ERR: MMS(5364): cntrler.cpp(6982): Invalid error code from MA 'MOSS-<GUID>' while running run profile 'MOSS_EXPORT_<GUID>'.
ERR: MMS(5364): cntrler.cpp(6988): Additional information MA error string: <error-code>0x80230808</error-code><error-literal>Unknown error</error-literal>
Forefront Identity Manager 4.0.2450.34"
Does anyone have any idea about this error message? and none of the users terminated/stopped the sync
Looking forward for your cooperation.Thanks a lot .
- Edited by Venu545 Friday, April 13, 2012 9:44 AM
Reply:
Hello,
I assume that youare using different Sync connection for these other domains? Is there anyrelevant information in the ULS logs? i would start with changing the user for the Sync connection from DOMAIN\ACCOUNT to FQDN\ACCOUNT
------------------------------------
Reply:
Hi Considine,
Yes We configured diffrent sync connections for these other domains,There is no info logged in ULS logs related to this error ,The error message which I mentioned above is only getting logged in Event viewer.
------------------------------------
Reply:
Hi Venu,
May this help you http://blogs.technet.com/b/steve_chen/archive/2010/10/11/user-profile-import-from-bdc-fails-on-sharepoint-server-2010-with-event-id-6301.aspx
Regards
Senthil
------------------------------------
Reply:
Hi Senthil,
if this could be a known issue,its working fine in another farm.Not sure what is different from here to there
------------------------------------
Reply:
I'm sure this has long since been resolved but in case anyone else come across this in future, I beleive this happens when the Farm admin account (or the account used to run the User Profile Sync Service if you've been crazy enought to change it) is no longer a member of the local administrators group.
I can't be 100% and I know it's not supposed to need to stay in there but I've seen this after the account was taken out of this group but with no reboot to force the change to take effect.
Adding it back in and rebooting seemed to resolve the problem.
For what it's worth...
N03L.
------------------------------------
Agree, dreadfully bright, hopeless UI.
- Changed type Daisy Cao Tuesday, January 29, 2013 8:59 AM
Reply:
Best regards,
Daisy Cao
Forum Support
-----------------------------------------------------------------------------------------
Please take a moment to "Mark As Answer" if they help.
------------------------------------
Configuring VPN access on Windows SBS 2011
Hi folks,
I require some assistance setting up VPN access on SBS 2011. I've competed the following:
- Configured the server using the wizard.
- Opened port 1723 on the router
- From an external Windows 7 machine ran the VPN connection wizard. Connected and logged in with domain admin crdentials.
From there I recieve the connected notification, but I'm unable to ping the SBS server.
Any help much appreciated!
J
- Changed type Sean Zhu - Monday, June 18, 2012 6:08 AM no response
Reply:
------------------------------------
Reply:
Its not a good idea to have DHCP on anything other than SBS. I would assume that the external windows 7 machine is on a different subnet and therefore won't be able to ping the SBS server without setting up RRAS or NAT of some sort
http://blog.ronnypot.nl/?p=693
If you have already done all the above then there could be an issue with GRE 47 that some routers dont support which is required for a VPN connection
Hope this helps,
Jason
------------------------------------
Reply:
DHCP is running on the SBS server. Once the VPN connects it picks up an address, but I still can't ping anything. (Detials below)
I'm not sure on how to configure GRE 47 on my router, it may not be possible.
Windows IP Configuration
PPP adapter **********.local:
Connection-specific DNS Suffix . :
IPv4 Address. . . . . . . . . . . : 192.168.2.24
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 0.0.0.0
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
IPv4 Address. . . . . . . . . . . : 10.1.1.7
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.1.1.1
Tunnel adapter isatap.{F6C56267-070F-419B-ADAA-23FF6E57FE9E}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Tunnel adapter Local Area Connection* 9:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Tunnel adapter isatap.{C9BD6B06-6D49-4A71-8639-9045691875A0}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
------------------------------------
Reply:
------------------------------------
Reply:
Apologies it could be correct,what are the dns settings also
ipconfig /all
------------------------------------
Reply:
Windows IP Configuration
Host Name . . . . . . . . . . . . : *****-PC
Primary Dns Suffix . . . . . . . : ******.local
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : ******.local
PPP adapter pendragon.local:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : *******.local
Physical Address. . . . . . . . . :
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.2.24(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 0.0.0.0
DNS Servers . . . . . . . . . . . : 192.168.2.2
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Broadcom NetXtreme 57xx Gigabit Con
r
Physical Address. . . . . . . . . : 00-1E-C9-59-E1-78
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 10.1.1.7(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.1.1.1
DNS Servers . . . . . . . . . . . : 10.1.1.3
10.1.1.4
NetBIOS over Tcpip. . . . . . . . : Enabled
Tunnel adapter isatap.{F6C56267-070F-419B-ADAA-23FF6E57FE9E}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter Local Area Connection* 9:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Teredo Tunneling Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter isatap.{C9BD6B06-6D49-4A71-8639-9045691875A0}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
------------------------------------
Reply:
Did you change the DHCP allocation to static as Mohitkapoor advised? The router on the SBS network will have a setting to let VPN connections thru - this will enable the GRE 47
------------------------------------
Reply:
Have you made any progress on this issue?
Cheers
Jason
------------------------------------
Reply:
Sorry I've been tied up, will try the above suggestions tonight and report back!
------------------------------------
Reply:
Ah no probs, I think first and foremost you should confirm that your router at the SBS site supports GRE 47 and if it does enable it. Let us know how you get on.
Cheers
Jason
------------------------------------
Reply:
Static DHCP pool configured.
Unable to find the GRE 47 passthrough. Not sure if the router supports it and unable to find any documentation. Belkin F7D2401 v1
Any ideas?
Cheers,
------------------------------------
Reply:
I looked at the manual, the router should work as it supports vpn, pptp passthrough etc but wasnt very helpful in how to enable the feature. Look for PPTP passthrough, VPN passthrough settings or something similar to enable the feature in the configuration web page.
Are you pinging the sbs server IP and client IP's or are you pinging computer names, have you tried pinging external. Does that work?
------------------------------------
Reply:
Once connected to the VPN I'm unable to ping the server, router, or a external website by IP.
I've placed the server outside the firewall using DMZ.
Updated to latest firmware.
Still can't find anything relating to VPN/PPTP passthrough.
------------------------------------
Reply:
Can you confirm that the user account you are logging on with has vpn access
SBS Console - Users and Groups - Users - USERNAME - Edit user account properties -Remote Access
Checkbox "User can access virtual private network"
- Edited by Skinnez Tuesday, June 12, 2012 12:06 PM correction
------------------------------------
Reply:
------------------------------------
Reply:
Have you tried disabling client and SBS server machine firewalls to identify firewall issues.
On your Client machine what is ?
DNS Servers . . . . . . . . . . . : 192.168.2.2
- Edited by Skinnez Tuesday, June 12, 2012 12:12 PM
------------------------------------
Reply:
Firewall on SBS server disabled.
Client DNS set to 192.168.2.2
Still not able to ping ther server etc...
------------------------------------
Reply:
Also the Client firewall
I meant what does the IP point at - for example router/modem??
Have a look at the attached, refers to belkin router although not your exact model but might help
http://www.dslreports.com/forum/r14341511-how-to-assign-the-protocol-47-gre-to-the-port
http://forums.speedguide.net/showthread.php?199820-VPN-and-Router-problems
If you could try a different router or explore the router firewall i bit more that would eliminate that.
------------------------------------
Reply:
------------------------------------
Reply:
------------------------------------
Reply:
Client firewall disbaled.
192.168.2.2 points to the SBS Server
I can't find anything relating to VPN on the router, may have to try replacing
------------------------------------
Reply:
------------------------------------
Reply:
Hi guys,
Yes Skinnez tried that thanks.
Decided to invest in new router, hopefully that will resolve the VPN issue. Can anyone recommend a model?
Capable of VPN, also wireless connectivity.
------------------------------------
'Save As' dialog box slow to open when machine away from domain
Just a quick query here, before I go away and spend an hour or so on configuring something that may not solve the problem.
We have a user that is complaining of an extremely slow-to-load 'Save As' dialog box (using IE8), when saving images from the Internet, and when away from the domain (at home). When he uses the machine connected directly to the network, this isn't an issue.
He simply right-clicks an image, and chooses 'Save Image As'. He then said that he can wait anything up to 4-5 minutes for the dialog box to appear. Now, when connected to the network, the default save location would be the 'My Pictures' folder, which is folder redirected to an area of his homedrive.
My thinking is, if we make his homedrive available for offline use, would this alleviate the issue, perhaps?
Reply:
------------------------------------
how to set print area of SSRS report exported to Excel - my solution
during years i always searched for a solution about this problem. how to set print area of SSRS report exported to Excel. this is my solution.
you need two objects to solve the problem.
the first one is to put an hidden-code into your report. this code contains the info to set the print area to excel file.
the second object is a vba macro registred in the excel file that reads the hidden-code and automatically sets the page.
finished. very simple solution.
now i'll tell you how i've developed these objects, but maybe there's a better way to do it.
my hidden-code looks like this: prtcode$A$1:$M$72 V15A 10
you have to put it into the report and i think the best way is to put it into a textbox area with white background, white font and font size 2. in this way it will looks like not visible and it will be hidden in your report.
the code structure is:
PRTCODE the excel macro will look for the code in the excel file searching for text string "prtcode"
$A$1:$M$72 sets the print area (11 bytes)
V sets the orientation (1 byte, possible values: V, O)
15A sets the pagebreak (4 bytes)
1 fits colums to page (1 byte, possible values: 1, 0)
0 fits rows to page (1 byte, possible values: 1, 0)
the code has fixed position. and some of the parts can be NULL.
each page of the report needs an hidden-code to set its print area.
my excel macro is this:
' Dim Orientation As String Dim PrintArea As String Dim PageBreak As String Dim FitToColumns As Integer Dim FitToRows As Integer Dim SheetsCount As Integer Dim NoInfo As Integer Dim ErrorCheck As Integer Sub SetReportPrintArea() NoInfo = 0 ErrorCheck = 0 Call SeekPrintInfo If ErrorCheck = 1 Then Exit Sub End If If NoInfo = 0 Then MsgBox "no code found" Else MsgBox "print area setup ok" End If End Sub Sub SetPrintConfig() On Error GoTo ErrorHandler Application.PrintCommunication = False ActiveSheet.PageSetup.FitToPagesWide = FitToColumns ActiveSheet.PageSetup.FitToPagesTall = FitToRows Application.PrintCommunication = True ActiveWindow.View = xlPageBreakPreview If ActiveSheet.HPageBreaks.Count <> 0 Then ActiveSheet.HPageBreaks(1).DragOff Direction:=xlDown, RegionIndex:=1 End If If ActiveSheet.VPageBreaks.Count <> 0 Then ActiveSheet.VPageBreaks(1).DragOff Direction:=xlToRight, RegionIndex:=1 End If ActiveSheet.PageSetup.PrintArea = PrintArea If Orientation = "O" Then ActiveSheet.PageSetup.Orientation = xlLandscape ElseIf Orientation = "V" Then ActiveSheet.PageSetup.Orientation = xlPortrait End If If Not PageBreak = " " Then ActiveWindow.SelectedSheets.HPageBreaks.Add before:=Range(PageBreak) End If ActiveWindow.View = xlNormalView Exit Sub ErrorHandler: Call ErrorHandling End Sub Sub SeekPrintInfo() On Error GoTo ErrorHandler ' SheetsDone = 0 WorkingSheet = 0 ' SheetsCount = Worksheets.Count ' Do While SheetsCount - SheetsDone > 0 WorkingSheet = SheetsCount - SheetsDone SheetsDone = SheetsDone + 1 Sheets(WorkingSheet).Select If Not Cells.Find(What:="prtcode", After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False) Is Nothing Then NoInfo = 1 Cells.Find(What:="prtcode", After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate PrintArea = Mid((ActiveCell.Value), 8, 11) Orientation = Mid((ActiveCell.Value), 19, 1) PageBreak = Mid((ActiveCell.Value), 20, 4) FitToColumns = Mid((ActiveCell.Value), 24, 1) FitToRows = Mid((ActiveCell.Value), 25, 1) Call SetPrintConfig End If Loop Exit Sub ErrorHandler: Call ErrorHandling End Sub Sub ErrorHandling() MsgErr = MsgBox("Error. Sorry.", vbCritical) ErrorCheck = 1 End Sub
so, put in your excel file: macro and hidden-code.
you have to run
SetReportPrintArea()
to set the print area.
to share this solution with my SSRS's users i've created an excel add-in and i've distribuited it to everyone.
So, each time they open an excel report they have the macro ready to use.
hope you'll like it.
ciao
nicola
Is Cloud Computing a better Option then a Collocation server.
Is Cloud better then a collocation server?
if yes then how?
- Edited by Paresh Bhatia Wednesday, June 3, 2015 8:43 AM
Upgrade from SQL Server 2008 R2 to SQL Server 2012 SP1 Failure
This problem is solved, but I wanted to share the solution in case anybody else was having trouble.
I tried to upgrade from SQL Server 2008 R2 SP1 to SQL Server 2012 SP1. Unfortunately during the upgrade, I received two error messages:
"No mapping between account names and security IDs was done" <--I received this two or three times during the upgrade.
"Value cannot be null – Parameter Name: userGroupName" <--I received this once.
For each of these errors, I was forced to click "Cancel" but the installation would continue and eventually finish. Most components would install correctly except for the critical ones: The Database Engine and SSAS.
Fortunately my 2008 SQL instance was still functioning so I wasn't shut down (I ran another production day as is), but I still needed to upgrade to SQL 2012.
Running the upgrade again didn't work. It would appear to work, but it didn't even try upgrading the database engine or SSAS. Even uninstalling SQL 2012 and re-performing the upgrade would not work.
I came across this blog post:
http://blogs.msdn.com/b/baliles/archive/2012/04/27/how-to-fix-a-failed-sql-2005-2008-r2-or-2012-install-upgrade-mssqlserver-inactive.aspx
This gentleman described very well how to identify inactive instances and delete them. I followed his steps and was able to uninstall SQL 2012 and re-upgrade, but I ran into the same problem again with the error messages.
After uninstalling SQL 2012 as described in the blog, I tried repairing my SQL 2008 R2 install. The repair yielded the same error messages, and could not fix it. Frustrating, but at least I could run a repair to see if the error was fixed or not rather than installing/uninstalling SQL 2012 over and over.
I ran into a number of posts describing this error and linking it to domain controllers run on SQL servers (not recommended). During an emergency a couple of years back, one of our admins upgraded our SQL server to a DC for a week or so. I removed it from being a DC after the emergency had passed, but I think this was still carrying some SID issues in it.
The solution:
1. After a failed upgrade, follow the blog post above to remove SQL 2012 inactive instances and return to SQL 2008.
2. Temporarily change any service accounts on the SQL server (Database Engine account, SQL Server Agent account, SSAS, etc. - I only had three) that are running. These were domain accounts in my installation. I temporarily changed them to use my account (with admin rights), then after applying, I immediately changed them back to their original accounts.
3. I ran the SQL repair tool again (control panel -> uninstall/change the SQL Server program and click "Repair") and had no problems. I don't think repairing did anything, but it didn't hurt and when it ran without errors I knew I was ready for a SQL upgrade.
4. Run the SQL Server 2012 upgrade.
This worked for me. I hope it can save someone else some time and money.
- Edited by Lucky. _ Tuesday, January 29, 2013 6:52 AM
Windows 7 Network Printer
Reply:
Hi,
I would like suggest you try the methods from the link below and check if they are helpful:
Troubleshoot network printer problems
http://windows.microsoft.com/en-HK/windows-vista/Troubleshoot-network-printer-problems
Why can't I print?
http://windows.microsoft.com/en-HK/windows7/Why-cant-I-print
If above methods can not solve your issue. You may try to find the help from the Windows Server support forum for further help:
http://social.technet.microsoft.com/Forums/en/category/windowsserver/
Regards.
Spencer
TechNet Community Support
------------------------------------
hi please help me with this problem
Reply:
You may be able to get the DMP files without crashing by booting into safe mode (F8) with networking.
If you are overclocking stop. (chances are if you dont know if you are, you are not)
To enable us to assist you with your computer's BSOD symptoms, upload the contents of your "\Windows\Minidump" folder.
The procedure:
* Copy the contents of \Windows\Minidump to another (temporary) location somewhere on your machine.
* Zip up the copy.
* Attach the ZIP archive to your post using the "paperclip" (file attachments) button.
*Please upload them to a file sharing service like Skydrive or"Rapidshare" and put a link to them in your reply.
http://social.technet.microsoft.com/Forums/en-US/w7itproui/thread/4fc10639-02db-4665-993a-08d865088d65
To ensure minidumps are enabled:
* Go to Start, in the Search Box type: sysdm.cpl, press Enter.
* Under the Advanced tab, click on the Startup and Recovery Settings... button.
* Ensure that Automatically restart is unchecked.
* Under the Write Debugging Information header select Small memory dump (256 kB) in the dropdown box (the 256kb varies).
* Ensure that the Small Dump Directory is listed as %systemroot%\Minidump.
* OK your way out.
* Reboot if changes have been made.
Please also run MSinfo32 and upload the output as well.
To run MSinfo32 please go to start>run>MSinfo32
Go to "file" "save" and upload the saved file with the DMPS
(Instructions for XP, Vista, Win 7, Win 8)
Dyami & Wanikiya -Team-ZigZag.
------------------------------------
Reply:
Hi,
According to BSOD error codes, you can refer to Bug Check Code Reference.
To check the this issue, please locate the dump file in the \Windows\Minidump folder and upload it so that we can analyze it. Before we could get your Minidump files, you can check following:
1. Update your BIOS, chipset and the drivers
2. Scan the system to check for the virus
3. Test the issue in Clean Boot and Safe Mode
Hope this helps.
Vincent Wang
TechNet Community Support
------------------------------------
VB6 RunMe = Shell(exename) not working on Server 2008
Server2008 R2 - logged on as local admin:
An application that I've used for years is doing this:
My VB app uses "RunMe = shell(notepad.exe)" and Notepad opens just fine
Then "RunMe = Shell("c:\mydir\myapp.exe") and I get an error message stating that I don't have rights to run myapp.exe.
I can take the SAME command and use the Windows Run applet and myapp starts as intended so it is not a user rights issue ... it's an issue where Server 2008 will not let my VB program run another specific program (remember it can run Notepad, Write, Explorer ... )
- Changed type Vincent Wang-MCSC Tuesday, February 5, 2013 8:46 AM
Reply:
Hi,
The proper forum to solve your issue should be Windows Server 2008 support forum. I would like suggest you redirect the issue to that forum for further help.
http://social.technet.microsoft.com/Forums/en/category/windowsserver/
Thanks for your understanding.
Regards.
Spencer
TechNet Community Support
------------------------------------
Windows 7 Home Premium and PHP Mail Issues
Hello,
Im currently developing a website in PHP and wish to send out mail using PHPs mail function and my ISP's SMTP mail server however when i send out an email to my account I do not receive it.. after hours of disabling firewalls, playing around with previous versions of PHP testing my ISP's mail server the problem lies with Windows 7 Home Premium.
I setup the exact same system on Windows 7 Ultimate and sent out an email using PHP's mail function and woopydoo! I recieve the email... so why does Home Premium not send out emails but Ultimate does?
- Shaun
- Changed type Vincent Wang-MCSC Tuesday, February 5, 2013 8:46 AM
Reply:
Hi,
As far as I know there is not any differences between Preminum and Ultimate. I am not sure whether the issue is caused from your developping code. I would like suggest you try to find the help from MSDN support forum. This forum is about program development issue. Thanks for your understanding.
http://msdn.microsoft.com/en-us/hh361695.aspx
Regards.
Spencer
TechNet Community Support
------------------------------------
initialization failure
My other computer encounters an initialization failure and ended up with a blue screen showing technical information:
*** STOP: 0x0000006F (0xc0000020, 0x00000000, 0x00000000, 0x00000000)
I have tried set up mode many times but with no luck. Please help me with this problem. Thank you.
- Changed type tracycai Tuesday, February 5, 2013 7:51 AM
Reply:
You may be able to get the DMP files without crashing by booting into safe mode (F8) with networking.
If you are overclocking stop. (chances are if you dont know if you are, you are not)
To enable us to assist you with your computer's BSOD symptoms, upload the contents of your "\Windows\Minidump" folder.
The procedure:
* Copy the contents of \Windows\Minidump to another (temporary) location somewhere on your machine.
* Zip up the copy.
* Attach the ZIP archive to your post using the "paperclip" (file attachments) button.
*Please upload them to a file sharing service like Skydrive or"Rapidshare" and put a link to them in your reply.
http://social.technet.microsoft.com/Forums/en-US/w7itproui/thread/4fc10639-02db-4665-993a-08d865088d65
To ensure minidumps are enabled:
* Go to Start, in the Search Box type: sysdm.cpl, press Enter.
* Under the Advanced tab, click on the Startup and Recovery Settings... button.
* Ensure that Automatically restart is unchecked.
* Under the Write Debugging Information header select Small memory dump (256 kB) in the dropdown box (the 256kb varies).
* Ensure that the Small Dump Directory is listed as %systemroot%\Minidump.
* OK your way out.
* Reboot if changes have been made.
Please also run MSinfo32 and upload the output as well.
To run MSinfo32 please go to start>run>MSinfo32
Go to "file" "save" and upload the saved file with the DMPS
(Instructions for XP, Vista, Win 7, Win 8)
MS-MVP 2010, 2011, 2012 Team ZigZag
------------------------------------
Reply:
Hi,
Please upload your minidump files for analyzing the BSOD issue. Regarding the error code 0x1E, you can refer to Bug Check 0x6F: SESSION3_INITIALIZATION_FAILED (Windows Debuggers)
Tracy Cai
TechNet Community Support
------------------------------------

No comments:
Post a Comment