Quantcast
Channel: The Official Scripting Guys Forum! forum
Browsing all 15028 articles
Browse latest View live

Powershell - create new WMI namespace

Hey ,I have found the following script in VBS to create new WMI namespace...

View Article


How to catch a PowerShell remoting exception

Hi,I need to run a PowerShell script on a number of computers. Doing some sampling, I discovered that remoting is not necessarily running on all of the computers and causes the script to fail. Remoting...

View Article


Image may be NSFW.
Clik here to view.

New-NetNat : A parameter cannot be found that matches parameter name...

When I'm trying to create a NAT, I got the following error. New-NetNat : A parameter cannot be found that matches parameter name 'InternalIPInterfaceAddressPrefix'. At line:1 char:28Does anybody know...

View Article

Script Export To CSV

Hello Guys I am Executing the Script below, to get Logon History, but i dont know how to export into CSV the Results, guys help with the correct parameter to do that, another question is, how can add...

View Article

test path for remote registry in power shell

I am trying to use test path to see if a registry key exist and if so display that key Get-ItemProperty "hklm:\SOFTWARE\Updates\Microsoft Update - Slow Login Fix" The above command works fine on mine...

View Article


OneDrive on Demand Exclusion

Hi all,The PS-Script below works fine to set some directories and its data to offline. Would like to extend with the $Exlude Variable to exlude some type of files. Can somebody help?Thanks.$Exclude =...

View Article

Powershell - Invoke-webrequest - error while sending the request

Hello All,I'm using Invoke-webrequest code similar to below and this works fine across most sites.Invoke-WebRequest -Uri "https://www.bbc.com/" |select -ExpandProperty Content | Out-File...

View Article

Source files not deleted after the move

Hi Experts,I am trying to move log files from source to destination. I tried both Robocopy and move-Item (powershell). However, I am having issues with both. Could you please advise. Thank you.Issues...

View Article


netsh command without run as administrator

Hi,Is it possible to run netsh command without the build-in administrator or runas administrator?Have to run netsh command with an account which has local admin privileges(user is in local...

View Article


Powershell: get-content of ps1 but remove the comment block

Hi,I'd need to read the content of of ps1 file WITHOUT the comment blocks (everything between <# #> or everything which has # in front of it. Can you advise howto addres this? Thanks!F.e.ps1<#...

View Article

tracking users log on/off in last day vbscript

Hi,I would like to make a VBScript which realizes the next thing:looks at users who have logged in on a server in the past day (or at a specified time) and lists them (echo,txt etc...).and then adds...

View Article

PowerShell DSC File Resource Failing on "A general error occurred that is not...

Please help, I see no reason why this is failing, the configuration prior to the FileResource works OK accessing the fileshare and installing, so it is not to do with permissions, does anyone have any...

View Article

Tools to create simple PS classes

We have several tools to create POJO using json schema. Is there a way for powershell developers to create PS classes using json schemas defined?

View Article


Copy and Install windows updates through Batch File

Hi Experts,My requirement is to copy multiple windows patches from a network location(where offline downloaded patches already placed) to the client machine and install them one by one with single...

View Article

getting error while calling a api post method

Hi All,I am calling an API for doing some stuff. I am getting error invoke-restmethod : The remote server returned an error: (400) Bad Request.{ "timestamp":1596728550480,"status":400,"error":"Bad...

View Article


unable to enable winrm over https

I am trying to enable winrm over https but keep getting error Connecting to remote server xxx  failed with the following error message : The client cannot connect to the destination specified  in the...

View Article

Powershell find users last logon time with multiple properties

HiI found the below script which works well but I would like to modify it so that instead of getting all users it only extracts user accounts that have specific words in the description field of there...

View Article


List the Manager of Users in AD - Using Powershell - Get-ADuser Syntax issue

Hello Everyone, Need one help, as i stuck in powershell Get-ADuser sytax error.  The ForEach loop is giving the real issue while retriving the details from the source file (List.csv).Import-Module...

View Article

Powershell -replace challenge

Hello Scripting Guys world...My first post here...I need to remove hyphen in specific case (only if surrounded by other characters). Content of MyFile.txt Jean-Francois1 - Title - Year - Country -...

View Article

Changing Directory within Powershell

Within Powershell, I want to change directory from PS C:\WINDOWS\system32 to PS C:\Program Files\WindowsPowerShell\Scripts,  What would be specific command for this?I've been using the Set-Location...

View Article
Browsing all 15028 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>