Weird error with VBscript and PCOMM V.14 Automation
I have some VBscripts that automate IBM Personal Communications This happens with VBscript but not with VBA Since I have to use the version 14 (64 bits) sometimes I get errors: If I use the function...
View ArticleAppend to CSV in PowerShell?
I'd like to find a way to append to an outputted csv file in Powershell. Out-File has too much wasted space and duplicate lines. Here's the script I'm trying to run:$a=Get-Content users.txtforeach...
View ArticleRefresh Windows Server 'Collection' connections via command line/PowerShell
Hi folks, Apologies if this has been asked before, I've been looking for a while and had no luck. As the title states i'm looking for a way to activate the 'refresh' button in Remote Desktop services...
View ArticleWSUS Cleanup script: cannot connect to WSUS Server
Hi guys,I'm trying to apply a script (already posted) which allows to perform the WSUS server cleanup with an unattended way.The script begins as...
View ArticleHow do you get the correct file mime types in .net?
Is it just as simple as comparing the file extension and searching online for the correct type, e.g. Content-Type: application/msword ?
View Article[WSH] How to properly run non English scripts in English Windows?
For example, below simple `test.vbs` code displays some Cyrillic characters, but was encoded using ANSI encoding with Cyrillic code page 1251.wscript.echo "БГДЖЗИЙ"The file's binary data:77 73 63 72 69...
View ArticleHow to use logical "OR" operator in batch script
Hi,Please can i know how to make use of logical OR operator in a batch script?For ex: When i want to check for a particular condition in "IF" statement how should i use it?if a==1 or b==1( )how do...
View ArticleGet-ClientWSUSSetting is not working. Nothing happends when running
When I am trying to run a cript (WS 2012 R2) nothing happends. No errors.
View ArticleWhy am I only getting 1 row in export-csv output
I have a need to verify if a list of IPs are found in a CIDR block. The script I created is only outputting the 1st IP address and 1st CIDR Block (there are two CSVs). I can see in the screen output...
View ArticleBatch script: echo array data back using for loop
How do I echo all the values back? Thanks.@ECHO OFF SETLOCAL EnableDelayedExpansion SET i=0 FOR %%d IN ( "abc" "xyz""123""456""abcdef""123xyz" ) DO ( SET /A i=i+1 SET DATA[!i!]=%%d ) for /L %%i in...
View ArticleError Connect-PNPOnline with app password
Hello,I am trying to log on to a SharePoint site with a user and app password using Connect-PnPOnline and I get the following error: PS C:\WINDOWS\system32> Add-PnPStoredCredential -Name PnPProv...
View ArticleHow to query event logs which has 5 million records?
Our server has 4GB size setting of security log. I tried to use vbscript to dump them all into a database. The script is as simple as followingConst wbemFlagReturnImmediately = &h10 Const...
View Article5145 events,
How get all 5145 events, that Access to shares G (RRHH) o H (ADMINISTRACION)?How to query event logs which has million records? Our server has 3-4GB size setting of security log. Sample:Nombre de...
View ArticleWhy do the outputs differ?
Hello, is there any reason, why there is different output of the second command in these two examples? (1)(Get-ADComputer -Filter 'Name -eq "[my computer name]"' -Properties Name).Name...
View ArticlePowershell - Easiest way to get output from different data structures
Hello, I have one list of objects[Collections.Generic.List[PSObject]]$computerArray = @() where I store some info about computers: $computerObject = [PSCustomObject][ordered]@{ ComputerName =...
View ArticleInstall-Script in startup script?
Anyone had trouble installing scripts via startup script? I am simply doingInstall-Script -Name Get-WindowsAutoPilotInfo -Force It doesn't error or anything, but isn't there in program files so I cant...
View ArticlePowershell script executes differently from the registry
I'm trying to use HKLM\Software\Microsoft\Active Setup\Installed Components\ to run a powershell script once for any user that logs on to a Windows 10 standalone machine.Here's an example of how I've...
View ArticleNeed help modifying a value in XML
Hi Scripting Guy, I am trying to figure out how to resolve a problem with an XML file used for configuring some software. Here is a snip of the XML:My goal is to read the Value of AutoLogin and if...
View ArticlePowershell to set Not configured to a GPO
Hi,I want to set a GPO "configure windows automatic update" to "Not configured". I tried to delete the regkey but it generates again.Thanks
View Article.bat script runs fine but hangs via scheduled task
have a .bat script which runs perfectly when manually running or calling via command line. The script calls a foxpro exe which outputs 10 csv files from a system then calls a powershell script to...
View Article