• The cmdlets are in in the AD FS module. Did you install AD FS on these servers?

  • I know this is a really old comment, but you could use Invoke-WebRequest with Head method. The Headers property contains basic file info like Content-Length, Content-Type, Date, Last-Modified, Server etc. So, using this approach, you could get the file size like this:

    (Invoke-WebRequest $downloadURI -Method Head).Headers."Content-Length"

    If the file size is in gigs, you could use PowerShell’s built-in math function like this to get the size:

    [Math]::Round((Invoke-WebRequest $downloadURI -Method Head).Headers."Content-Length"/1gb,2)

    Hope it can help someone in future.

  • Hi Micheal, I am trying to update our ADFS environment with the new Cert, however on some of the DCs I am missing ADFS cmdlet, and when I look for it on these servers it’s missing and I am not able to install it. Without it I cannot run any of the cmdlet for ADFS such as: Set-AdfsCertificate and others..

    I tried everything possible I could find online, but no luck..I have latest powershell instaled on these servers. Can u please give me some ideas of what I can do? I was only able to have the ADFS cmdlet on the ADFS server (which has the Role for ADFS).
    Thanks in advance,

  • Open the Event Viewer and search the security log for event ID 4656 with a task category of “File System” or “Removable Storage” and the string “Accesses: DELETE”. https://www.netwrix.com/how_to_detect_who_deleted_file.html#:~:text=Navigate%20to%20%E2%80%9CReports%E2%80%9D%20%E2%86%92%20Click,%E2%80%9D%20%E2%86%92%20Click%20%E2%80%9CView%E2%80%9D.

  • I had to turn on auditing on some of our server file shares due to either accidental or intentional file/folder deletions & have been experimenting with a couple scripts I found that launches when event id 4663 occurs in the Security log.  Unfortunately, along with some other processes that occur which generated 4663, this event id is also generated whenever a file is renamed & as a result, the log file is capturing a lot of superfluous information.  I have accessible template folder structures on the server which are used to store various files that relate to customer projects.  These templates are copied & then renamed to match whatever the project name is & so hence, each time this occurs, event id 4663 is generated and records each folder / subfolder into the .CSV file I use to import into PostgreSQL.  Is there a particular value within the generated array of values that is specific to only the file / folder being deleted?  It seems that the hex value 0x10000 (65536) array member doesn’t seem to be filtering as anticipated.

  • Hi Mike,

    I love the script. I have a question and i hope this isnt too difficult. I would like it to also spit out the indivitual members of the nested groups.

    i.e.

    If i run

    $selectprops = “ParentGroup”,”NestedGroup”,”NestedGroupMemberCount”

    Get-NestedGroup “Administrators” | Select-Object $selectprops | format-table

    i would like to get ParentGroup, Nested Group, NestedGroupMemberCount, and Nestedgroup members.

    Is this possible?

  • Faiz Qureshi posted an update in the group Group logo of PowerShellPowerShell 1 week ago

    Hello Experts ,
    I am looking for help with a Powershell script which lets me see all the users connected across the Network of servers. Please let me know if there is any such script which I can use or may be tweak a little bit.

    We need a simple report like

    User ID, Session_ID , Local Client_Host_ID, Remote Server_ID_Connected to, brief_descp_Activity performed

    avatar
  • Is there any PowerShell scripts to get the User Usage details (Metrics – Audit log) of the Microsoft Visio and Microsoft Projects or is there any other way to get those details

  • Is there any PowerShell scripts to get the User Usage details (Metrics or audit log) of the Microsoft Visio and Microsoft Projects or is there any other way to get those details

  • Kiran Sharma posted an update in the group Group logo of PowerShellPowerShell 2 weeks ago

    Hi Team, I’m using powershell to download a file from my github and place it in specific location on my laptop and it works fine. However when run the same command on windows Server, it throws an error. Exception calling “DownloadFile” with “2” argument(s): “An exception occurred during a WebClient request.” At line:3 char:1 + $WebClient.DownloadFile(“$Link”,”$env:C:Test_powershellBackupCI.xls … + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : WebException any suggestions on this would be highly appreciated

  • Hi,

    Thanks for the script.

    I have followed the instructions,however the extension I m trying to uninstall is still showing but is disabled not removed.

    I am missing somthing ?

  • I’ve used `cat` and `>>` to add the contents of the public key file to administrators_authorized_keys file but the contents were converted on the fly to utf16. The file looked ok in notepad but openssh could not read it. What is worse: there was no error in the logs neither on server side nor in client (`-vvv`). I’ve wasted hours on this! I’ve tried `LogLevel DEBUG` in `sshd_config` but the `__PROGRAMDATA__/ssh/logs` directory is empty.

  • Hello All,

    I’ve written a smile script to download a test file from my github and it works fine on my laptop powershell, however it throws below error when i run the same script on Windows Server 2012. The only thing i noticed is that version of Powershell is different only Laptop and the Server.

    Exception calling “DownloadFile” with “2” argument(s): “An exception occurred during a WebClient request.”
    At line:3 char:1
    + $WebClient.DownloadFile(“$Link”,”$env:C:Test_powershellBackupCI.xls …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

    any suggestions/help on this is highly appreciated

  • I’ll take a command line over a GUI any day since it’s batchable. Plus I like the keyboard so anything that keeps me away from the mouse is my preferred platform.

  • Be careful with admitting that you are a GUI lover. This is almost like being an anti royalist these days. 😉

  • Thanks Surender.

    I thought it was a profile issue and tried that earlier- no help.

    I even added Windows PowerShell to the exclusion in defender, no help.

    Its a lab machine where I had my Hyper-v server – I could refresh it but wanted to know the issue in case it affects a production server.

     

  • As per my experince , You mean SyncToy , the Microsoft tool , but for this comment
    “Try copying millions of files, possibly without keeping the same tree structure at the target as at the source, and logging errors (the most frequent being missing NTFS permissions at the source) ” ,
    Gs Richcopy 360 and Syncback are created exactly for such cases.
    Backup/sync GUI tools like Gs Richcopy 360 and Syncback have a nice and simple GUI, able to copy to local drives, remote servers, LANs, WANs, and clouds, able to copy all the permissions types from source to destination, and also able to copy time stamps.
    and as I remember, there are options to throttle the connection speed to prevent bandwidth consumption, a feature to email you after the job is finished, an excellent task scheduler and it will never crash while transferring a large amount of data.
    there are also other differences between such a GUI tools and CLI tools, just try to search

  • You are right Michael 🤣🤣

  • Load More
© 4sysops 2006 - 2022

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account