Scheduled Task To Run A Batch File I recently ran into a problem where I’d scheduled a batch file to run on a Windows Server 2008 R2 server, task manager reported the task had run, but it hadn’t. The batch file was in F:\Folder1\ and the scheduled task screen was as below In order to get the batch file to run, I had to set the Program\script box to contain just the name of the script and place the folder path in the Start in (optional) box
Posts
Showing posts from 2015
Building simple regular expression
- Get link
- X
- Other Apps
Building simple regular expression Problem : I need to findout all the place holders starting & ending with ###'. Sample string --- config: application_config: app_server_name: ###app_server_name### database_config: databasename: Search databaseservername: ###databaseservername### sql_server_user: ###sql_server_user### sql_server_user_password: ###sql_server_user_password### usernames: - exporter_user - teamcity_user Regex : /###\w+###/g Few best editors http://regexr.com/ https://regex101.com/
Copy linux system file on windows using Winscp
- Get link
- X
- Other Apps
*Copy file from linux system to windows system *How to use winscp on windows Background : We have a AWS linux box on our extranet environment. I need to download a file from particular directory. I need private keys to access that box. I got the keys, now steps are straight forward. Step:1 Download latest version of winscp for following url. I took portable version. https://winscp.net/eng/download.php Step: 2 Click on the tool button Step:2 Click on "Run Pagent" option & add your private key for ssh session Step: 3 Insert following information & hit login. It will connect to remote box.
The process could not read file "C:\***filepath**** due to OS error 3
- Get link
- X
- Other Apps
The process could not read file due to OS error 3 Pull replication setup issue. In my scenario, I'm was trying to setup replication across the servers using SQL Server 2008 R2. I was setting up pull subscription on another server. When i encountered same issue. Reason behind this issue is that when you configure Pull subscription across server it expect snapshot replication to be shared folder. So I have created a shared folder & updated snapshot location at my publication. And then into my subscriber server as well. To configure snapshot folder with security, use link below:- https://msdn.microsoft.com/en-us/library/ms151151.aspx Details about distribution agent security:- https://msdn.microsoft.com/en-in/library/ms189691.aspx
Running powershell on new computer - Beginners
- Get link
- X
- Other Apps
Hi Some time when you have setup a new computer, you might need to run powershell on the same. By default Powershell execution policy is "Restricted". to set it unrestricted execute following command:- PS C:\> Set-ExecutionPolicy Unrestricted 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 about_Execution_Policies help topic. Do you want to change the execution policy? [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y After pressing 'Y', It will set execution policy unrestricted. Reference links:- https://technet.microsoft.com/en-us/library/ee176961.aspx https://technet.microsoft.com/en-us/library/hh849812.aspx
Enable PowerShell remoting on windows machine
- Get link
- X
- Other Apps
Use following command to enable remoting on window machine:- Enable-PSRemoting -force Set-Item wsman:\localhost\client\auth\CredSSP -value true -force Enable-WSManCredSSP -force -role server set-item wsman:localhost\client\trustedhosts -value * -force set-item wsman:\localhost\listener\listener*\port -value 80 -force restart-Service winrm winrm get winrm/config winrm enumerate winrm/config/listener Set-ExecutionPolicy RemoteSigned
Could not connect via HTTPS to https://forge.puppetlabs.com on windows
- Get link
- X
- Other Apps
Error: Could not connect via HTTPS to https://forge.puppetlabs.com Unable to verify the SSL certificate The certificate may not be signed by a valid CA The CA bundle included with OpenSSL may not be valid or up to date This issue occurred when your windows system ssl cert is not updated. Few links suggest that you need to take update & try opening forge website. But this doesn't work with me. I end up applying following solution :- Step 1: Put following content in a file name it as : geotrustglobal.pem -----BEGIN CERTIFICATE----- MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCB lzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3Qt SGFyZHdhcmUwHhcNOTkwNzA5MTgxMDQyWhcNMTkwNzA5MTgxOTIyWjCBlzELMAkG A1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEe MBwGA1UEC...
The WinRM client cannot process the request. If the authentication scheme is different from Kerberos, or if the client computer is not joined to a domain, then HTTPS transport must be used or the destination machine must be added to the TrustedHosts configuration setting. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. You can get more information about that by running the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic.
- Get link
- X
- Other Apps
PowerShell execution remotely Error New-PSSession : [10.53.191.167] Connecting to remote server 10.53.191.167 failed with the following error message : The WinRM client cannot process the request. If the authentication scheme is different from Kerberos, or if the client computer is not joined to a domain, then HTTPS transport must be used or the destination machine must be added to the TrustedHosts configuration setting. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. You can get more information about that by running the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic. At C:\BuildAgent\work\26c4aa5ad049462c\Build\Deploy\DeployToCI.ps1:76 char:11 + $rs = New-PSSession -ComputerName 10.53.191.167 -Credential $cred -Authentic ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...