New-pssesion not working - unable to connect to remote host?
Hello guys and gals,I been runing into issue with powershell and that is, i am unable to create remote powershell session using new-pssesion cmdlet. The client and server are both Win Server 2012 R2...
View ArticleHowto Zip multiple files older than months with extension
Hi all. I need to make a script that make this: - In certain folder, look for file _YYYYMM.txt older than -1 month ,and in the same folder we have _YYYYMM.txt older than-5 month file also need to zip...
View ArticleHow to invoke a REST service using PowerShell Script
I have a REST service with below details - HttpVerb - POST URL - https://myhost/MyService/api/healthcheck Headers- Client-ID:ABC Client-Secret:123456 Request Body: { "Account":[{...
View ArticleHTML Output in mail for Physical memory Usage when it reaches certain limit
$machines = gc "D:\tool.txt" $Threshold = 80 ForEach($computername in $machines){ $Output = Get-WmiObject -Class Win32_Operatingsystem | Select-Object @{N="MemoryUsage"; Expression = {“{0:N2}” -f...
View ArticleReplace line in file that has a | in the line fails
I am trying to replace a line in a config file. The line has a | in it and when I try to run my script it inserts the new line after the first | instead of replacing the full line. Below is my...
View ArticleCompress the multiple files into one zip file from source to destination
Dear All, I am looking for Powershell script to do the following:- to compress the multiple files into one zip file from source to destination Can anyone help me on this?
View ArticleRemotely restarted service
Hi I want to Restarte remotely specific service that is restarted ,started and stop with credential .But How, Pleas Help Me.EXAMPLE :-Sql service name MSSQLSERVER with credential...
View Articleerror opening password file .ini (Code 2)
Hi All,I am have a PS which runs an exe using Start-Process cmd shell, the exe inturn opens password file which has an encrypted key in it, finally, the code runs but is exiting with error opening...
View ArticleImport-csv without header line
Geeks, im trying to import-csv a file without a header to process the data in a column, but unable to-Name ---- A B C DBut after importing the csv i'd need to skip the header and would need result as-A...
View Articleneed script for changing .webconfig value
Hi, I need to edit webconfig value by using script which is for IIS code move activity.This posting is provided "AS IS" with no warranties and confers no rights! Always test...
View ArticlePowershell, WMI and SCCM!
Hi!I would like to remotely Evaluate Machine policy via powershell! I can see in the WMI-tool that the class SMS_CLIENT in namespace "root\ccm" has a method called "EvaluateMachinePolicy".But i cant...
View ArticleIssue modifying local security policy with secedit
I'm having an issue modifying local security policy on my machine using SECEDITWhen I run:secedit /export /cfg c:\temp.cfg /areas SECURITYPOLICYI get a copy of the configuration just fine.However, when...
View ArticleSome help about languages and fields in sharepoint with powershell
Good afternoon, I need some help about languages and fields in sharepoint with powershell. I got a sharepoint site and a powershell having to set the 'Display name' of columns in lists foer either...
View Articlerow count on table header running sql
Hi I am using the following code to execute a query and have the result sent to the email in html format. But in the email i am automatically receiving a row count on top of the table. How to either...
View ArticlePowershell Invoke-WMIMethod on remote machine works for one user but not another
Hi,I have a powershell script that I can run on one machine in domain A that does an svn update on another machine in the same domain A. We are using Powershell 4 on windows 2012R2 servers....
View Articlehow to create mapped network drive in PowerShell (Running as an administrator)
HiUsing Windows Server 2012 R2 with Powershell 5 installed.Running PowerShell in a Non Elevated shell i cant run:New-PSDrive -Name g -PSProvider FileSystem -Root "\\vm01\share" -Credential $cred...
View ArticlePowershell Printer Export Configurations
I am trying to create a powershell script that will export the following bits of info from my print server to a CSV file. Printername, ShareName, PortName, IP Address, DriverName, Location,...
View ArticleChanging Computer Descriptions Remotely using Powershell
Hello,I am the Network Admin for a small college that has a little over 300 computers. I want to be able to use PowerShell to change the computer descriptions on those machines from my desk. I have...
View ArticleNeed script read database field (VARCHAR(MAX) line by line
Hi, I looking for a function to read the content of a database field line by line. The content of the column contains line feeds! I try to read the content of the database using get-content followed...
View Article[powershell] Help Deleting Rows in an excel document
Good afternoon everyone,I have tried everything to get this to work. I feel like I am getting the dumbest error and I know its going to be like change this one thing and it will work correctly. So...
View Article