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

checking last logon across domain controllers - partial user list (not whole AD)

Hi all,I hope all is well wherever you may beI have been asked to check the last logon of around a thousand accounts, now listed in a csv. I can run Import-csv "d:\temp\path_to.csv" |foreach-object...

View Article


Batch File Rename

@echo off if not [%3]==[] (    goto usage ) if [%2]==[] (    goto usage ) if [%1]==[] (    goto usage ) CALL SET arg=%2% CALL SET ext=%%arg:~1%% if %arg%==* ( forfiles /S /M %1 /C "cmd /c rename @file...

View Article


PowerShell Search and Replace yaml

I am looking for some solution to this Problem Statement please Let say we have two files, one is in yaml format and have specific placeholder, for ex - (member_name). Please note, since the file...

View Article

PowerShell scripting

I need to add the get-credentials cmdlt to the code below, I want it to prompt for the users credentials and then pass those credentials to the rest of the script. In essence anything clicked would run...

View Article

Powershell script to edit Unattend.xml file

Hi! I have xml file with data like:<?xml version="1.0" encoding="UTF-8"?> -<unattend xmlns="urn:schemas-microsoft-com:unattend"> -<settings pass="specialize"> -<component...

View Article


Move-ADobject challenges

Hello, After struggeling a few day's I do not come any further : I build a basic script tjat iomports a csv with expired and/or disabled users. It checks if they reaily are disabled and if not it sets...

View Article

Invoke-SqlCmd with -Credential flag, cannot get it working

MyDomain\MyUser is a local admin account on my laptop, and a sysadmin on my local db instance, and is set to dbowner on mydatabase. I ran this command to enable the SqlServer module:Install-Module...

View Article

apply permissions automatically on databases using PS

Hi Team, I have dev environtment which consists of 100 databases. We used to take backup permissions of database users in share  and apply manually to new databases after refresh to ensure permissions...

View Article


Run PowerShell as admin from a batch script

HELP!!!! I have a PowerShell script located on a network share that I need to run as admin from a batch script to achieve this I have the following string of code below.PowerShell -noprofile -command...

View Article


Using invoke-webrequest to login to a website and then accessing the...

Hi Team,need to login to the website and accessing the information, but website using the JavaScript not having any forms,Please share the any working option with Invoke-RestMethod or...

View Article

Unable to get a value in an expression

Hello,     I am using the script given below to output all the system accounts soon to expire into a file. The code below is generating the file successfully but the value of the...

View Article

Script - Shutdown machines with messagebox to abort the shutdown

Hi folks, I need a script that shuts down all the computers in my environment. However, this script must have a button to abort the shutdown in the course. I'll deploy this script in a GPO. Thank you.

View Article

请问如何修改关于Password Expiry Email Notification的脚本?

脚本的链接:https://gallery.technet.microsoft.com/scriptcenter/Password-Expiry-Email-177c3e27我大致浏览了一遍,有些能看懂并修改,但不确定格式是否正确。还有就是脚本怎么测试?需要在域账号上更改哪些东西后执行脚本才会触发?有可能我发送不了含有链接的帖子。

View Article


a script for enabling a single user for on-prem sfb EV

would appreciate some one to help here. i'm trying to script these command lines so that all i need to do is enter a upn and their new tel uri. so, when the .ps1 is run, i get prompted for the user's...

View Article

Convert slmgr.vbs /ipk < Windows Activity Key > into a PowerShell script that...

New to scripting and would appreciate any assistance converting the following CMD: slmgr.vbs /ipk < Windows Activity Key > into a PowerShell script that runs without interrupting the user once...

View Article


Image may be NSFW.
Clik here to view.

Assistance required to add a new column to the output csv in this AD...

Pls find shortened down and testable powershell code at bottom of this post. The task is to amend this script so it adds another column called 'Printer Groups'. This will list all the AD groups named...

View Article

Compile scripts to independent .exe

HiI'm looking to compile my powershell scripts to an .exe so can distribute to other windows users.I've been using PowerGui and it delivers everything but the .exe's take up too much ram & cpu.An...

View Article


Powershell - force firewall profile to domain authenticated.

HiThe windows firewall is not realizing its on a domain network and it sets the profile incorrectly to public. e.g. vpn connections etc.I can create a script to determine when its domain connected and...

View Article

Changing the NS records for all DNS zones

I would think this would have been rather simple to find, but everything I see is for adding records not changing them. I have tries the set-dnsserverresourcerecord but i can't seem to get the syntax...

View Article

Script from GPO on some clients gpresult is "This script has not yet...

I have various logon/startup scripts configured in GPOs.  For the vast majority of clients, these run fine.  There are some clients (Windows 10 and 7) that will not run them.  GPResult /z shows them...

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>