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

Custom Scripts.

Team,I would like to get a PS script to send emails to the user's personal email.Please note the users will have mailbox on-prem but I want the user credentials to be sent to their personal email...

View Article


Limiting session time

I have a Windows Server 2012 R2 on which a policy needs to be set. This policy should logoff a user if it is disconnected or idle for more than 2 hrs. One twist is, I have a user with name 'Invo'...

View Article


Powershell script to extract specific VM info from Hyper-V SCVMM

Hi Folks,Looking for some guidance here, here is my script: $Data = @() $VMs = "SOMEVM" foreach($VM in $VMs) {    $VMInfo = Get-VM -Name $VM    $VMNetwork = $VMInfo | Get-VMNetworkAdapter    $VMVHD =...

View Article

Get-ADComputer variables in SearchBase and Filter

Hi guys,Please help with the following question.I have the code in my script and it is working.$servers = (Get-ADComputer -SearchBase "OU=CRMBilling,OU=Servers,OU=KYIV,DC=corp,DC=ukrtelecom,DC=loc"...

View Article

Double quotes in cmd

Hi All,Hopefully this is a very straightforward question, and apologies for asking if so but despite a lot of googling I can't quite get to the bottom of it :(With the below code I'm simply trying to...

View Article


Registering a scheduled job via Powershell Remoting does not work if using...

Hey helpful people!I have an issue and I don't understand it:I want to register a scheduled job on a remote machine, using Credentials of a Local User on the remote Machine.$PSsession = New-PSSession...

View Article

WMI Query to retrieve only active IPv4 address

My turn to ask a question. I am running BGInfo for all workstations but at this stage want to only return the Active IPv4 address. I have a custom WMI query set up in BGInfo:SELECT IPAddress FROM...

View Article

calling a exe file from Powershell

HI ,I am trying to call a exe file using Start-process. When I use credential parameter, I can't use verb parameter and vice-versa.$path = "H:\soft_web\software\notepad++" $username = "MUMBAI\asharma"...

View Article


Reopen last used tabs in Powershell ISE

Hi Scripting GuysI use a lot of tabs in Powershell ISE console in my work, as an Administrator, and every time I close the ISE I need to reopen every tabs that I used before. So my question is:When I...

View Article


Scan Subnet Range and check Bitlocker status

I know I can do this:$computers = 'PC001','Laptop002' ForEach ($computer in $computers) { #$client = $Computer.Name if (Test-Connection -Computername $computer -BufferSize 16 -Count 1 -Quiet) {...

View Article

Printing using InvokeVerbEx("Print")

Hi all,I'm using InvokeVerbEx("Print") to print files. After banging my face on my keyboard for a full half an hour my script now works like a charm, printing all the files with specific extensions in...

View Article

Get Computer Names based on Active Directory Username

Hello!I am fairly new to power shell.  I am looking create a script that looks at a list of Active Directory user names from a csv file and then gets the computer names for each user.  I would like it...

View Article

windows server issue

i need script or one way to set the minimum or maximum size on Recycle Bin in windows server 2016?how can i set a maximum time to keap data for recycle bin ?and how can use the comman to show the...

View Article


How to Search All Fields in Active Directory for a String with Powershell

I can search for string in a specific field in AD like so: get-aduser -filter * -Properties * | Where-Object {$_.Company -match "string"} But how can I search all fields for all users for a specific...

View Article

notification icon using powershell

Ive got this code which works fine....[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")$objNotifyIcon = New-Object System.Windows.Forms.NotifyIcon$objNotifyIcon.Icon =...

View Article


How to pass 2 variables to a function in Powershell

Hi All, I am trying to pass the  two variables to a function in Powershell. The variables are being generated from two button clicks and they are called $ChosenItem1 and $ChosenItem2. It seems that I...

View Article

POWER SHELL ERROR

WE ARE PLANNING TO USE migration by below script but unable to achieve it , can u please let me know where is the issue with the script SCRIPT ; function Start-DbaMigration {...

View Article


How to analyze the PowerShell console output with tools such as Excel and...

In order to find out why system drive used up so fast, I modified the script described in https://blogs.technet.microsoft.com/heyscriptingguy/2012/05/25/getting-directory-sizes-in-powershell/  to...

View Article

Reading Lines from a Text File with a Command Line Batch File

Hi,I have a text file that has four lines of text as follows:HelloPlanetWelcomeGoodbyeI have a batch file that I would like to read in each line and set each line to a variable.  For example my batch...

View Article

怎么让设备管理窗口最大化

怎么让设备管理窗口最大化,谢谢

View Article
Browsing all 15028 articles
Browse latest View live


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