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

Image may be NSFW.
Clik here to view.

(Help Needed) Batch File: Copy a String of Piped Commands to Clipboard

Hello,I'm working on a batch script to assist out Help Desk with frequent needs to remove phishing emails from different client environment Exchange environments, both On-Prem and O365. The batch...

View Article


can a script change all the individual mouse pointers by just changing the...

The link below has great help for changing the mouse pointers with powershell. https://devblogs.microsoft.com/scripting/use-powershell-to-change-the-mouse-pointer-scheme/But I am hoping to simplify the...

View Article


PowerShell Hashtables

Hi All,i really need some help. I am pretty new to powershell.  Trying to solve a very manual task. for adding new hires  to adgroups. because our new hires dept and title depend on what active...

View Article

Script to look up user's SID and then delete entry from registry \ProfileList

Hello, this is based on another post that was posted some years back but in desperate need of help!I have the below but keep getting errors:$allusers = (ls c:\users | where {$_.LastWriteTime -ge...

View Article

Using For loop to get Prime Numbers between 1 to 10

Hi All,I am new to Powershell scripting and want to learn the same.I am trying to write a script to get list of prime numbers between 1 to 10 using for loop. However the result i am getting is totally...

View Article


How to specify local port on PowerShell?

Hi there.I would like to write a powershell script to test a connection.I have found this script which is almost perfect for me but it is missing one thing I don't know how to script. I want to be...

View Article

unable to access application using VIP network share

Hi all,I'm having trouble accessing unc path to the shared application. application is installed on two server app1 and app2 and they can be accessed using UNC path \\app1\application.exe or...

View Article

Powershell equivalent to Disable-LocalUser in Powershell V2

Hello,I am trying to figure out a way to disable local users on Windows 7 machines.Under Powershell V5 the command Disable-LocalUser makes this easy. I have not found anything in earlier versions that...

View Article


unable to access application using VIP network share

Hi all,I'm having trouble accessing unc path to the shared application. application is installed on two server app1 and app2 and they can be accessed using UNC path \\app1\application.exe or...

View Article


Search specific user in Local Administrators Group for all servers in Domain.

Hi Guys,I have a user "John" and i need to know which server has the user "John" as Local Admin privileges. Is there a script for that? There are over thousands of servers and i can't be looking at 1...

View Article

Or operation with a regular expression fails.

I have a array of a directory listing.  This listing has the full path of files.  It want to delete trivial files like "Thumbs.db" and *.temp and *.tmp.  I just use the -notmatch operator with a...

View Article

countdown automatically confirmed, and list item selected by default

1. I hope that when the form is loaded, In tabpage1, the list item, item1 and item3 are selected. In tabpage2, list item, item4 is selected 2. Add countdown, automatic confirmation function If there is...

View Article

import AD from .csv

for importing in a specific OU in AD(2012r2), i am using the following ps code:Import-Csv c:\export.csv | New-ADUser -Enabled $True -Path 'OU=company,OU=IT,DC=ad.mycompany,DC=local' -AccountPassword...

View Article


passing an array or read from txt file into a parameter

I got a txt file that has a bunch of computerspc1pc2pc3etc..I want to pass all these into a functionfunction getinfo {param(int[]$arraywrite-host $array)$computers = get-content computer.txtgetinfo.ps1...

View Article

Vbscript:: Auto fill visible cells (filtered range) with specific string

Need to fill specific string in filtered column....??

View Article


WMIC Win32_NetworkAdapter adaptertype CZECH translated

Hi, We have official DELL remote app that updates bios, Problem is that it searches available network adaper via similar comand - PowershellGet-WmiObject Win32_NetworkAdapter | Where-Object adaptertype...

View Article

Converting from Base64

Hi,I'm currently pulling down a Base64 string from an API and converting the string into a file.$Base64 = [Convert]::FromBase64String($Data) [IO.File]::WriteAllBytes($File, $Data) This has worked great...

View Article


Password Never Expires

Hello,i have this script;------------------------------------------------------------------------------------------------------------------------------ Import-Module ActiveDirectory $Resetpassword =...

View Article

Windows 7 Powershell Error Method invocation failed because...

Hello,First off I am not a scripter. I have dabbled in it for years but can't script for beans. I have been working with our company scripter for a week and have a user backup script that works but not...

View Article

powershell filter out AD users without 'sip' adress in proxyadresses attribute

Hi,what is wrong with my powershell command line?Get-ADUser -filter * -SearchBase $Searchbase -Properties proxyAddresses | Where -FilterScript {$_.proxyAddresses} | Where {$_.proxyAddresses...

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>